Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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