Re: Bug with Series[] - help wanted
- To: mathgroup at smc.vnet.net
- Subject: [mg65416] Re: [mg65394] Bug with Series[] - help wanted
- From: Bruce Miller <brucem at wolfram.com>
- Date: Fri, 31 Mar 2006 06:09:09 -0500 (EST)
- References: <200603301029.FAA18297@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
The order notation O[1/r] is part of how the output of Series
is formatted. It does not closely correspond to the internal
form of a series.
In[1]:= $VersionNumber
Out[1]= 5.2
In[2]:= s=Series[1/(r+1), {r, Infinity,3}]
Out[2]=
1 -2 -3 1 4
- - r + r + O[-]
r r
Look at the internal structure of the Series output:
In[3]:= FullForm[s]
Out[3]//FullForm=
SeriesData[r, DirectedInfinity[1], List[1, -1, 1], 1, 4, 1]
Turn it into a polynomial. Note that the O term goes away.
In[4]:= Normal[s]
Out[4]=
-3 -2 1
r - r + -
r
In[5]:= FullForm[%]
Out[5]//FullForm=
Plus[Power[r, -3], Times[-1, Power[r, -2]], Power[r, -1]]
I hope this is helpful.
Bruce Miller
Technical Support
Wolfram Research, Inc.
support at wolfram.com
On Mar 30, 2006, at 4:29 AM, GidiL wrote:
> Hello all!
>
> I would really appreciate some help.
>
> Mathematica has a built-in function called Series:
> Series[x,x_0,n],
> which allows to expand functions into power series where x is the
> variable, x_0 is the point about which we expand, and n is the desired
> order of expansion.
>
> It also allows x_0 to be infinity, which is very useful when one needs
> multiple expansion (as in gravitational waves and electromagnetic
> radiation).
>
> Although is allows to expand series in terms of 1/x and writes O(1/x)
> (and its powers) in the output, it does not allow this to be entered in
> the input. To convince yourselves, try it out. Enter in the input,
> e.g., 1+ 1/r+ (O(1/r))^2, and it will tell you that 1/r is not a
> variable.
>
> If, on the other hand, you entered:
> In=Series[1/(r+1), {r, Infinity,3}]//Simplify
> you will get
> Out=1/r-(1/r)^2+(1/r)^3+(O(1/r))^4
>
> which shows that the output is possible, but the input is impossible.
>
> Can anyone offer some assistance?
>
> Thanks,
> Gideon
- References:
- Bug with Series[] - help wanted
- From: "GidiL" <gidienator@gmail.com>
- Bug with Series[] - help wanted