Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Question: + .. 2. Write A Function That Computes The Approximate Value Of Cos X Using Taylor's Series X X X Cos X = 1
Question: + .. 2. Write A Function That Computes The Approximate Value Of Cos X Using Taylor's Series X² X X Cos X = 1 - 2! ' 4! 6! The
2. Write a function that computes the approximate value of cos x using Taylor's series x x x cosx=1 2! 4! 6! The function should use the while loop, which is terminated when the magnitude of the last term becomes smaller than 10%. The function should output the value of the truncated series as well as, as an option, the number of terms that were used in the calculation. Use your function for x = myvec (1) and compare the result to cos (x) evaluated in Matlab. Is the difference smaller than 10-8?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started