Question: Please use Python language for this question! Recall that random numbers can be used to compute the area or volume of a region. This is

 Please use Python language for this question! Recall that random numbers

Please use Python language for this question!

Recall that random numbers can be used to compute the area or volume of a region. This is done by picking many points at random and counting how many of them tall in the desired region, which can then be used to approximate the area For example, if we want to compute the area of a particular region that can be enclosed by a 2x2 square, we would choose random points within the 2x2 square and keep track of how many fall within our region of interest. If we find that half of the random points are contained within the region then the estimated area would be 4=2. 1) Compute the volume enclosed by the function, z x4 y by placing random points within a rectangular volume bounded by and 0 z 10. Use a large number of points and compare your estimated volume to the real volume of the integral. Vral 9.55. r O ?y In [ ]: # Put your code here Follow-up question: How many points do you need until the error in the volume is reliably less then 1% of the real value? Put your answer here 2) Compute the volume of a sphere of radius 3 using random numbers. Try using 100 points, and increase the number of points by a factor of 10 until you reach 100000 points. Print out the approximate volume for each experiment and make sure they converge to the real value of the volume: As a reminder, a sphere of radius 3 is defined by: x2 +y +2-9 In [ ]: # Put your code here

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!