Question: Modify the code to verify numerically that the approximation of f ' ( x 0 ) given by the formula f ( x 0 -
Modify the code to verify numerically that the approximation of given by the formula
is of order namely the truncation error goes to zero as
from numpy import sin cos
from matplotlib import pyplot as plt
err
for in range :
err
pltclf
plt for in
plt legenderror 'slope 'slope loc'upper right'
pltshow
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
