Question: Taylor Series Errors All source code is needed in MATLAB In this problem, we approximate f(x) = sin(x) using Taylor series. How many terms in

Taylor Series Errors
All source code is needed in MATLAB
In this problem, we approximate f(x) = sin(x) using Taylor series. How many terms in the Taylor series approximation to f(x) = sin(x) do I need to make sure my error is less than 2 times 10^-8 for x [0, pi/2]? Use the Taylor approximation error, E_n(x) = (x - c)^n + 1/(n + 1)! f^(n + 1) (xi) to derive your answer. If you expand sin(x) around c = 0, then Taylor series will have some zero terms. You should count these terms towards the answer. Write a function called my_sin which takes in two arguments: a number x and a positive integer n. Your function should approximate sin(x) using a Taylor series approximation of order n. The function should return the approximate value. Now we experimentally verify the bound from part (a) in Matlab using your function from part (b). Define a vector x of 100 equally spaced points between [0, pi/2]. For each of these points, compute the error, | sin(x) - my_sin(x, n)|, using two different values of n: n = 3 Value of n that you compute in part (a) Plot the errors for both these values of n against the vector x. Is your error below the bound in part (a) at all these points for the two values of n? In this problem, we approximate f(x) = sin(x) using Taylor series. How many terms in the Taylor series approximation to f(x) = sin(x) do I need to make sure my error is less than 2 times 10^-8 for x [0, pi/2]? Use the Taylor approximation error, E_n(x) = (x - c)^n + 1/(n + 1)! f^(n + 1) (xi) to derive your answer. If you expand sin(x) around c = 0, then Taylor series will have some zero terms. You should count these terms towards the answer. Write a function called my_sin which takes in two arguments: a number x and a positive integer n. Your function should approximate sin(x) using a Taylor series approximation of order n. The function should return the approximate value. Now we experimentally verify the bound from part (a) in Matlab using your function from part (b). Define a vector x of 100 equally spaced points between [0, pi/2]. For each of these points, compute the error, | sin(x) - my_sin(x, n)|, using two different values of n: n = 3 Value of n that you compute in part (a) Plot the errors for both these values of n against the vector x. Is your error below the bound in part (a) at all these points for the two values of n
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
