Question: Exercise 1. Let: y=f$:1f(r)d$ This integral can be interpreted as the area under the curve f(z) from z to z;. To estimate this integral, we

Exercise 1. Let: y=f$:1f(r)d$ This integral can be interpreted as the area under the curve f(z) from z to z;. To estimate this integral, we choose a box from y = 0 to some y; f(x) for all x on the interval, z, to z1. We can then estimate the integral by the fraction of points falling below the curve f(x) multiplied by the area of the bounding box: N below Y = T(yl o) (1 Zo) (a) Calculate the indefinite integral of f(z) = (sin(5z) + (cos(30x))?. (b) Write a code routine (in MATLAB, python, etc.) which simulates N = 10,000 random points to estimate the value of the integral from (a) on the interval [0, 1]. Plot: (1) The integral estimates as a function of steps used to estimate the integral. (2) The function on the interval with the 10,000 random points colored red if above the curve and blue if below. (c) Does the relative error converge with N, and if so, to what function? Why? (d) Is this approach for this problem the most efficient? If not, what other applications would benefit from Monte Carlo methods

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