Monte Carlo Integration for ∫ xdx/(2+3x)^2 with Bounds of 0 and 1

chimath35
Messages
110
Reaction score
0

Homework Statement


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

Homework Equations

The Attempt at a Solution

 
Physics news on Phys.org
chimath35 said:
I guess I am supposed to generate a x and y random number between 0 and 100
What is between 0 and 100?
chimath35 said:
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.
 
okay so I pick an x value between 0 and 1 (random) and what do I pick the y value between?
 
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
 
Never mind, I understand the process now and have solved the problem. Thank you for the input.
 
There are two things I don't understand about this problem. First, when finding the nth root of a number, there should in theory be n solutions. However, the formula produces n+1 roots. Here is how. The first root is simply ##\left(r\right)^{\left(\frac{1}{n}\right)}##. Then you multiply this first root by n additional expressions given by the formula, as you go through k=0,1,...n-1. So you end up with n+1 roots, which cannot be correct. Let me illustrate what I mean. For this...
Back
Top