Answered step by step
Verified Expert Solution
Question
1 Approved Answer
please help me solve this matlab problem. thank you very much! 3. Consider a series approximation of sin(x) as k-1 ,(2k-l) x+(-1) sin(x) = x
please help me solve this matlab problem. thank you very much!
3. Consider a series approximation of sin(x) as k-1 ,(2k-l) x+(-1) sin(x) = x + 3! 5! 7! (2k-1) ! where N is the total number of terms in the series. Write a MATLAB code to find the value of sin(x) using the above series by successive adding terms. That is, vary N from 2 up to 200 in step of 1. Then consider x-10. The exact value can be directly obtained MATLAB built-in function sin. The approximate result is obtained by the above series. Define error as Error=exact-approximate l . (a) Tabulate the values of the Error as N varies from 2 to 200. (b) What happens when k>155 and why? (c) A Tolerance is the amount of Relative Error that is allowed. The Relative Error is defined as Relative Error I(exact - approximate)/exact| Specify the tolerance to be 109. Set a condition that when the Relative Error is less than the tolerance, we have reached sufficient accuracy to stop adding terms in the series. How many terms are needed to reach this accuracy
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