Hi, I think it this way,
If you will use
f(m).series(x,0,n) , where m is a function of x.
then it will return the series till the nth power of m.(#not x)

On Wed, Mar 14, 2012 at 7:34 PM, Gaurav Sathe <gaurav.sath...@gmail.com>wrote:

> I'm a little confused with the .series method.
>
> In [8]: sin(x).series(x,0,10)
> Out[8]:
>         3        5         7             9
>       x        x         x             x
> x - ── + ─── - ──── + ────── + O(x**10)
>       6      120     5040       362880
>



> In [9]: cos(x).series(x,0,10)
> Out[9]:
>         2       4       6           8
>       x       x       x           x
> 1 - ── + ── - ─── + ───── + O(x**10)
>       2      24    720      40320
>
> From this it seems that .series(x,point,n) calculates the series expansion
> of f(x) till the nth exponent of x...
>
> In both of the above cases, x==m.Hence it appears that it calculates the
series expansion of f(x) till the nth exponent of x.



> But,
> In [17]: exp(x**2).series(x,0,10)
> Out[17]:
>                 4       6       8        10      12         14          16
>             18
>         2    x       x       x        x        x           x            x
>              x
> 1 + x  + ── + ── + ── + ─── + ─── + ──── + ───── + ────── + O(x**20)
>               2       6     24      120     720      5040       40320
>  362880
>
> This doesnt seem to match up... Does the parameter 'n' mean 'the no of
> terms in the series expansion' or ' the last exponent of x in the
> expansion'  ?
>
>
>
> Thanks
Rhythm Gupta


>
>  --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/sympy/-/iPZ8Z-N8jH0J.
> To post to this group, send email to sympy@googlegroups.com.
> To unsubscribe from this group, send email to
> sympy+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/sympy?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to sympy@googlegroups.com.
To unsubscribe from this group, send email to 
sympy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.

Reply via email to