• Support PF! Buy your school textbooks, materials and every day products via PF Here!

Monte Carlo integration

  • Thread starter chimath35
  • Start date
110
0
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
 
32,825
8,670
I guess I am supposed to generate a x and y random number between 0 and 100
What is between 0 and 100?
and if the output of
y=x/(2+3x)^2 is equal to the y ran I count it
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.
 
110
0
okay so I pick an x value between 0 and 1 (random) and what do I pick the y value between?
 
110
0
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
 
110
0
Never mind, I understand the process now and have solved the problem. Thank you for the input.
 

Want to reply to this thread?

"Monte Carlo integration" You must log in or register to reply here.

Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving
Top