Question: By using Matlab Please this is the third time I post the question. There was an issue with the x value in every solution. The
The Taylor's series expansion of cos(x) is 4 1. ? (-1)" y2n cos(x)-1--+ + = 2! 4 6! where x is in radians. Write a user-defined function that determines cos(x) using Taylor's series expansion. For function name and arguments use y=cosTaylor(s), where the input argument x is the angle in degrees and the output argument y is the value for cos(x). In the program use a loop for adding the terms of the Taylor's series. If an is the nth term in the In each pass, calculate the estimated error E series, then the sum Sn of the n terms is S Snt given by the equation: Sn-Sn-1 Sn-1 Stop adding terms when E s 0.000001. Use cosTaylor for calculating a) cos(60) b) cos(11o)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
