taylor series in matlab

6 次查看(过去 30 天)
Ronald Aono
Ronald Aono 2019-10-20
评论: the cyclist 2019-10-20
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.

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Linear and Nonlinear Regression 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by