Question: Question in Picture. Need a matlab code. Thank you. Tavlor series, while loop and error calculation 6. Consider the function f(x) = x + 2
Question in Picture. Need a matlab code. Thank you.

Tavlor series, while loop and error calculation 6. Consider the function f(x) = x + 2 0.152 sin x. around the point is xo- Develop a Matlab script to determine the lowest order of Taylor expansion resulting in a maximum error of 0.00001% for all values on the interval specified below. Write the Maltab script (using a while loop) so that the approximate function value and true relative error (Et) is calculated for each order Taylor expansion, i.e from zeroth-order to the highest order needed, for the values [0. /6, 2/6, 3/6, 416, 5t/6, ]. The result should be two 2D arrays where each row is a specific order in the Taylor expansion, and one array holds the function value at each x point (the columns), and the other array hold the error value at each x point Matlab functions and scripts may be utilized, but the parent calling program should be a Matlab script (the parent script run from the command line is sometimes called the wrapper since it wraps around the other scripts and functions) Below is an example of the 2D arrays for 0h through 5th order calculations. Your maximum order could be different Taylor x values Order T11 T12 T13 T21 T22 14 15 16 st f(x) T(6 rows x 7 columns) 3r 4 th Order 12 16 17 1S st E21 E22 True Error in T(x) = (6x7) = nd 3
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
