taylor series in matlab

1 Ansicht (letzte 30 Tage)
Ronald Aono
Ronald Aono am 20 Okt. 2019
Kommentiert: the cyclist am 20 Okt. 2019
Given the function: 5 4 2 f (x) = x^5 - 2x^4 + 3x^2- 1
a. Compute the exact derivative of f(x) at x = 2.1.
b. Estimate the first derivative of f(x) at x = 2.1 using a forward Taylor series approximation with the following step sizes: h [10^-4 10^-3 10^-2 10^-1 10^0 10^1 ]
Using the exact result from Part a, make a plot of the magnitude of the relative error in f '(x)x=2.1 versus step size -- use a log-log plot. From the plot or generated table (part b), determine the value of n (by hand calculation, or typed) in the error expression = h O(h ) . Explain!!!
c. Repeat Part b using a central Taylor series approximation for x f '(x)x=2.1 What is the “order of error” in this case? Plot the error vs. step size for this case in the same plot as above.

Antworten (0)

Kategorien

Mehr zu Linear and Nonlinear Regression finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by