Question: Problem 1 - modified Problem 23 The Taylor series expansion for cos(x) is: cos(x)=12!x2+4!x46!x6+=n=0(2n)!(1)nx2n where x is in radians. Write a MATLAB program that determines
Problem 1 - modified Problem 23 The Taylor series expansion for cos(x) is: cos(x)=12!x2+4!x46!x6+=n=0(2n)!(1)nx2n where x is in radians. Write a MATLAB program that determines cos(x) using the Taylor series expansion. The program asks the user to type a value for an angle in degrees. (a) Use a for loop to compute the value of cos(x) for total numbers of terms, 10, 100, and 1000. (b) Plot the value of cos(x) calculated by your code as a function of iteration number n
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
