Question: This homework shows effects o f errors caused because computer representations o f numbers have finite precision. [ I t uses a n example from

This homework shows effects of errors caused because computer representations of numbers have finite precision. [It uses an example from numerical differentiation, which is covered after the midterm.]In numerical differentiation, the approximate first derivative of a continuous function f can be calculated from values at two points using the formula f'~~f'=f(x+h)-f(x)h PART 1 Where the notation ?? means the first derivative and his the distance between the two points. The absolute difference between f' and f'isAD=|f'(x)-f'|=|f'(x)-f(x+h)-f(x)h| and this gives us some idea of the error in approximating the derivative using f' instead off'.A.[2 points] Set x=3 and say that fis the sin function. Write down an appropriate expression for the ADin this case. B.[3 points] Now, write a python function that can compute the AD for any value ofxorh.C.[3 points] Using a suitable graph, show the output of the function with x fixed at3 and with values ofh ranging from 10-1to10-18. PART 2An expression for an upper limitof the AD can be found from a Taylor series approximation. This isIJ=h|f''(x)|?
A.[2 points] Set x=3 and say that fis the sin function. Write down an appropriate expression for the
ADin this case.
B.[3 points] Now, write a python function that can compute the AD for any value ofxorh.
C.[3 points] Using a suitable graph, show the output of the function with x fixed at3 and with values ofh
ranging from 10-1to10-18.
PART 2
An expression for an upper limitof the AD can be found from a Taylor series approximation. This is
UL=h|f''(x)|2
where " denotes the exact second derivative off.
A.[3 points] Calculate and plot the expression ULon top of your estimate for ADatx=3, using the
same range ofh values.
B.[2 points total] Describe where on the graph UL and AD plots are different. If they don't look different
make sure you are plotting enough points.
I. [1 points]Is there a part of the graph where ULis larger than AD?Ifso, over which range?
II.[1 points]Is there a part of the graph where ULis smaller than AD?Ifso, over which range?
C.[2 points]Is there an
This homework shows effects o f errors caused

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 Mathematics Questions!