Question: Use first - order Taylor series expansion ( n = 1 ) to predict the function value of x = 3 for the following equation.
Use firstorder Taylor series expansion n to predict the function value of x for the following equation. The initial point will be x
a Calculate fx values between x and x with increments using the equation above. These will be the true values.
Save the calculated true values fx values for all x values in one row vector called ytrue".
b Use nfirstorder Taylor expansion to predict the function values for x values between x and x Start the step size from h Decrease the step size by half ie h until satisfying the following two conditions:
i the absolute true relative percent error between the true function value and predicted function value is below for x Assign the final true error as etfinal"
ii The absolute approximate percent error between the current and previous function value is below for x Assign the final approximate error as eafinal"
Write MATLAB code for this using a "while" loop to continue until both the true and approximate relative percent error condition is below for x The while loop will stop when both the errors are below for x Save all taylor expansion predictions for each step size for all values between x and x
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
