Question: Please solve all question parts. The cosine function can be evaluated by the following infinite series: cos(x) = 1 - x^2/2! + x^4/4! - x^6/6!
The cosine function can be evaluated by the following infinite series: cos(x) = 1 - x^2/2! + x^4/4! - x^6/6! + Write a MATLAB code to implement this formula so that it computes and prints the value of cos(pi/3) using 5 terms of approximation function above. where cos(x) =1 (1 term) cos(x) = 1 - x^2/2! cos(x) = 1 - x^2/2! + x^4/4! and so on. Also, compute and display the percent relative error % error = true - series approximation/true times 100% What is the type of error resulted from this approximation (Name of the error). Plot your solution for cos(x) in MATLAB and attach the plot
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
