Question: We approximate the function cos(x) on the interval -r/6, /6] by its Taylor polynomial P,(x) of degree n about a 0 given in Table 3.1
![We approximate the function cos(x) on the interval -r/6, /6] by](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f3ba10c963f_91266f3ba1058d84.jpg)
We approximate the function cos(x) on the interval -r/6, /6] by its Taylor polynomial P,(x) of degree n about a 0 given in Table 3.1 on p. 16 of the class notes. Find the smallest odd value n such that the absolute error of P, (z) satisfies l cos(x)-P, (z)! 10-6 for all x [-r/6, /6 , i.e., find the smallest n odd such that Give explicitly the corresponding Taylor polynomial P() for this value of n Write your own short MATLAB function Pex5(x,n) returning the value at r of the Taylor polynomial Pn() of degree n about a 0 of the function In((1 +x)/(1-x (see formula (3.10) on p. 17 of the class notes). Print your code and give 16 significant digits of the value P13 (0.5)-Pex5 (0.5,13) that your code obtains. Print the absolute error | In(3)-P3(0.5)| expressed in MATLAB by abs(1og(3) - Pex5(0.5, 13)) Hints . To minimize the number of multiplications when n 2 3 you should use the value t:2 e Create a file called Pex5.m and start the file as follows function y-Pex5(x,n) if (n
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
