Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Expand sin(9x) to Maclaurin series up to including 6th order terms. Prepare a MatLab code that can be used to approximate the above function. Your
Expand sin(9x) to Maclaurin series up to including 6th order terms. Prepare a MatLab code that can be used to approximate the above function. Your script should include a function which returns the output, approximate and true errors. The input of this function should be the value of x, significant figures for the required accuracy and the maximum number of iterations. Use stopping criteria in your code such that the result is correct to at least the number of significant digits input by the user. Your function should stop if the maximum number of iterations is exceeded and should return a message stating that the solution did not converge. Calculate the relative percent approximate and true errors after the addition of new terms to the approximation. Code a plot table and show your results including the true and approximate values and the errors at each step. In addition, x value could be any number. Expand sin(9x) to Maclaurin series up to including 6th order terms. Prepare a MatLab code that can be used to approximate the above function. Your script should include a function which returns the output, approximate and true errors. The input of this function should be the value of x, significant figures for the required accuracy and the maximum number of iterations. Use stopping criteria in your code such that the result is correct to at least the number of significant digits input by the user. Your function should stop if the maximum number of iterations is exceeded and should return a message stating that the solution did not converge. Calculate the relative percent approximate and true errors after the addition of new terms to the approximation. Code a plot table and show your results including the true and approximate values and the errors at each step. In addition, x value could be any number
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