taylor series expansion for acos(1-x)

6 ビュー (過去 30 日間)
Robert Tzou
Robert Tzou 2019 年 10 月 30 日
編集済み: John D'Errico 2019 年 11 月 4 日
MatLab gave error messages for taylor(acos(1-x),x) (after syms x) while the expansion does exist?

採用された回答

John D'Errico
John D'Errico 2019 年 10 月 30 日
編集済み: John D'Errico 2019 年 10 月 30 日
Actually, the expansion you ask for does NOT exist. Why not? Because. I hope that is a good enough answer.. ;-)
Seriously, the expansion fails, because at x==0, there is a singularity, so you cannot write a Taylor series. Think about it. What is the first derivative of acos(1-x), evaluated at x==0?
fprime = diff(acos(1-x),x)
fprime =
1/(1 - (x - 1)^2)^(1/2)
>> subs(fprime,x,0)
Error using symengine
Division by zero.
Error in sym/subs>mupadsubs (line 160)
G = mupadmex('symobj::fullsubs',F.s,X2,Y2);
Error in sym/subs (line 145)
G = mupadsubs(F,X,Y);
So can you write a Taylor series, expanded around x==0? NO! NO! NO!
But does that mean no expansion exists? A Tsaylor series expansion DOES exist, as long as you use an expansion point where the function is not singular. The default expansion point for the function Taylor is at x==0. So, in one line, we can get a series expansion as you seem to want, as long as you override the default for the expansion point.
taylor(acos(1-x),x,'expansionpoint',0.5)
ans =
pi/3 + (2*3^(1/2)*(x - 1/2))/3 - (2*3^(1/2)*(x - 1/2)^2)/9 + (8*3^(1/2)*(x - 1/2)^3)/27 - (28*3^(1/2)*(x - 1/2)^4)/81 + (608*3^(1/2)*(x - 1/2)^5)/1215
Will the Taylor series give anything meaningful, if you then tried to use it at x==0? NO! It won't work well, not in trying to predict the value at x==0. But that just reflects the idea that trying to predict the value of a function with an infinite slope at the prediction point using a polynomial approximation is likely to be a really bad idea.
Not all functions are well approximated by Taylor series. (You might want to re-read your class notes about convergence of a series.)

その他の回答 (1 件)

Robert Tzou
Robert Tzou 2019 年 10 月 30 日
Singularity of derivatives of acos(x-1) at x = 0 is well taken. What I was looking for, more appropriately to put, is a power series approximation of acos(x-1) as x approches zero, which can also include Laurent series or Puiseux series approximation. Matlab does have this option, series(acos(x-1),x) instead of taylor(acos(x-1),x), which describes the asymptotic behavior that I am looking for. Thank you again for your time and effort that goes into the resolutions to my question!
  1 件のコメント
John D'Errico
John D'Errico 2019 年 11 月 4 日
編集済み: John D'Errico 2019 年 11 月 4 日
Please don't use answers to make a comment. Use comments to make comment.
Of course, If you knew what you wnted - that A Taylor series will fail when expanded around zero, then why are you complaining that a Taylor series won't work?

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeCalculus についてさらに検索

タグ

製品


リリース

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by