Taylor polynomial of a not infinitely differentiable function.
Show older comments
Hello everyone,
First, I would like to thank any help provided, I truly appreciated.
Here's my problem:
Consider the function 𝑓(𝑥)=3𝑥^3+𝑥.
a. Without MATLAB, compute the first 5 (𝑛 = 0,1,2,3,4) Taylor Series coefficients (Cn) for the function about 𝑎=2.
After computation I got:
3x^3+x approx 26 + 37(x-2) + 18(x-2)^2 + 3(x-2)^3 + 0(x-2)^4
So, the first thing I noticed was that the fuction is not infinitely differentiable since the fourth derivative is zero and so on.
b. How many terms in the Taylor Series would you need for a good approximation of this target function? Justify your answer in three sentences or less.
HERE is where I'm having trouble and is simply because I might be missing something about Taylor Series, but I understand that having 5 and 4 terms would be exacly the same since the last of the 5 term is zero, regardless, I have tried 3 terms, got the relative error, and it is soo similar to having 4 terms. The difference is so big between the function and the taylor polynomial when x=0 or any other number, that is not even an approximation...
Thanks for the help!
4 Comments
John D'Errico
on 22 Sep 2020
Why do you think that a function which is everywhere zero is not differentiable? That the 4th and higher order derivatives are zero means nothing, only that those higher order derivatives are zero.
Yency Perez
on 22 Sep 2020
John D'Errico
on 22 Sep 2020
It did not fail. You appear to have gotten it right. Once you get past the terms with a cubic in it, the Taylor series for a cubic polynomial is identically the same as the original cubic. The expansion point is not really important here, because if you then expand those terms, you will see it all reduces to that original polynomial. I showed this works in my answer. At least, I let MATLAB show it for me, since I'm far too lazy to do real algebra anymore. :)
Yency Perez
on 22 Sep 2020
Accepted Answer
More Answers (0)
Categories
Find more on Mathematics in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!