Le mercredi 23 février 2011 à 09:40 +0545, Chris Smith a écrit :
> Ronan Lamy wrote:
> >> Also while writing it, I've noticed 2 additional problems with
> >> Expr.series:
> >> * The order is off by one.
> >> * Its name is misleading since it doesn't return a series.
> 
> Can you give examples? In 2084 I get:
> 
>     >>> cos(x).series(n=3)
>     1 - x**2/2 + O(x**3)
> 
> terms valid up TO n=3 are returned (which is consistent with sympy
> range behavior).

The conventional definition of the order of the expansion is that it's
the degree of the last term included in the polynomial approximation, so
one less than the order of the excluded terms. Your example is a
second-order expansion, because it gives a second-order approximation.

Our definition might be more convenient, but it's not the usual one.
Maybe this is just a documentation issue.

> 
> What do you call the thing that is being returned? Is this what you
> refer to as an "asymptotic expansion"?

I call anything with a O() in it an asymptotic expansion, but this is
more precisely the 2nd-order Taylor expansion of cos(x).

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

Reply via email to