Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please Post Matlab code and answeres 4. Consider the following function: g (x) = x + cos(x) A. Use MATLAB to compute the 8th order
Please Post Matlab code and answeres
4. Consider the following function: g (x) = x + cos(x) A. Use MATLAB to compute the 8th order Maclaurin series approximation of g(x) about a - 0. Note: The 'Order' parameter of the taylor function creates a series with an order of Order-1 B. Use MATLAB to compute the Pad approximation of g(x) about a = 0 with orders n-m-4 (the total number of parameters will be comparable to the Taylor series expansion). Note: The 'Order' parameter of the pade function creates a rational function with orders of n and m ( is not subtracted) C. Plot the two approximations and the original function on the same graph for x =-10 to 10. Give each line a distinct color, and use the legend command to add an identifying legend to the plot. Use the axis command to zoom the plot to show the y-axis from -20 to 20 D. From the graph, estimate the x-domain over which each of the approximations is relatively accurate E. Calculate the absolute true error of each approximation at x = 3, x = 4, and x = 5 F. Increase the order of the Taylor series approximation to 12 and regenerate the plot of the 3 lines. Describe the strengths and weaknesses of the 12th order Taylor series approximation when compared to the n -m 4 Pad approximation
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