using two approaches
epower−x=1/e power x=1/(1+x+(xpower2/2)+(xpower3/3!))+……
and compare with the true value of
Use 20 terms to evaluate each series and compute true and approximate relative errors as terms are added.
2.The derivative of f(x)=1/(1-3x power2) is given by
6x/(1=3x power 2)whole power2
Do you expect to have difficulties evaluating this function at x =0.577? Try it using 3- and 4-digit arithmetic with chopping.
3.(a)Evaluate the polynomial
at x =1.37. Use 3-digit arithmetic with chopping. Evaluate thepercent relative error.
(b)Repeat(a) but express y as
Evaluate the error and compare with part(a).
4.Use 5-digit arithmetic with chopping to determine the roots of the following equation with Eqs. (3.12) and (3.13)
Compute percent relative errors for your results.
5.The “divide and average” method, an old-time method for approximating the square root of any positive number
a, can be formulated as
Write a well-structured function to implement this algorithm basedon the algorithm outlined in Fig. 3.3