The Taylor series expansion for cos(x) is:
wherex 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 anis the nth term in the series, then the sum Snof the n terms is
- Cos(35°)
- sin(125°)
Compare the values with those obtained by using a calculator.
Want to see the full answer?
Check out a sample textbook solutionChapter 6 Solutions
EBK MATLAB: AN INTRODUCTION WITH APPLIC
- Algebra & Trigonometry with Analytic GeometryAlgebraISBN:9781133382119Author:SwokowskiPublisher:CengageAlgebra for College StudentsAlgebraISBN:9781285195780Author:Jerome E. Kaufmann, Karen L. SchwittersPublisher:Cengage Learning