How to evaluate A Taylor series at a specific value

08222018, 06:56 PM
(This post was last modified: 08222018 08:14 PM by Albert Chan.)
Post: #20




RE: How to evaluate A Taylor series at a specific value
(05122018 02:56 PM)Joe Horn Wrote:(05122018 02:44 PM)DrD Wrote: taylor(sin(x))x = 0.5 This is a bug. Evaluate a taylor series while carrying the O[x] term is meaningless. This is how Mathematica hande it: In[1]:= taylor = Series[Sin[x], {x, 0, 5}] Out[1]= x  x^3/6 + x^5/120 + O[x]^6 In[2]:= taylor /. x > 0.5 SeriesData::ssdn: Attempt to evaluate a series at the number 0.5; returning Indeterminate. Out[2]= Indeterminate In[3]:=Normal[taylor] /. x > 0.5 (* Drop the O[x] term, then substitute *) Out[3]= 0.479427 BTW, Mathematica (v 4.0) had the bug too, if x had Pi in it. In[4]:= taylor /. x> 1/2 + Pi/10^10 // N Out[4]= 1. 0.5  0.166667 0.125 + .00833333 0.03125 + O[0.5]^6 In[5]:= % // Normal (* above should be Indeterminate too ! *) Out[5]= 0.479427 BTW, you can test evaluation order with this: (x/x) x = 0 For Mathematica, it is evaluation before substitution, result = 1, not 0/0 

« Next Oldest  Next Newest »

User(s) browsing this thread: 1 Guest(s)