1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Monte Carlo integration

  1. Apr 9, 2015 #1
    1. The problem statement, all variables and given/known data
    Perform a Monte Carlo integration of:

    ∫ xdx/(2+3x)^2 with the bounds of 0 and 1 on the integral

    You should use 10 trials of at least 100 data pairs per trial and average the result

    I guess I am supposed to generate a x and y random number between 0 and 100 and if the output of
    y=x/(2+3x)^2 is equal to the y ran I count it

    I really only know and have been shown how to use libre calc not sure how to do this

    2. Relevant equations


    3. The attempt at a solution
     
  2. jcsd
  3. Apr 9, 2015 #2

    mfb

    User Avatar
    2016 Award

    Staff: Mentor

    What is between 0 and 100?
    It won't be equal exactly, there is a different condition (hint: you are approximating an integral).

    Every spreadsheet can do that, programming languages would be better for larger samples but for just 100 data pairs it does not matter.
     
  4. Apr 10, 2015 #3
    okay so I pick an x value between 0 and 1 (random) and what do I pick the y value between?
     
  5. Apr 10, 2015 #4
    I have the actual value of the integral and I know it is a ratio of y≤x/(2+3x)^2 count as success/ of total # of trials for each x value
     
  6. Apr 10, 2015 #5
    Never mind, I understand the process now and have solved the problem. Thank you for the input.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: Monte Carlo integration
  1. Monte Carlo methods (Replies: 0)

Loading...