Applied Numerical Analysis with MATLAB The Taylor Series expansion for cos(x) is: 00 x4 x6 (-1)^ of cos(x) = 1 — + ... =
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
Applied Numerical Analysis with MATLAB The Taylor Series expansion for cos(x) is: 00 x4 x6 (-1)^ of cos(x) = 1 — + ... =
Applied Numerical Analysis with MATLAB The Taylor Series expansion for cos(x) is: 00 x4 x6 (-1)^ of cos(x) = 1 — + ... = + 4! Σ (2η)! xan 2! 6! n=0 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. Then the program uses a loop for adding the terms of the Taylor series. If an is the nth term in the series, then the sum Sn of then terms is Sn Sn-1 + an. In each pass calculate the estimated error E given by E = S5 S-1. Stop adding terms when E = 0.000001. The program displays the value of cos(x). Sn-1 Use the program for calculating: (a) cos(40) (b) cos(130°)
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!