Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle RMAN For Absolute Beginners

Authors: Darl Kuhn

1st Edition

1484207637, 9781484207635

More Books

Students also viewed these Databases questions

Question

Demonstrate how to use the Gaps Model for diagnosing and

Answered: 1 week ago

Question

Differentiate between hard and soft measures of service quality.

Answered: 1 week ago