Comment #6 on issue 3638 by [email protected]: Automatic series expansion while applying a function?
http://code.google.com/p/sympy/issues/detail?id=3638

I don't really deal with series expansions, so I can't comment on the mathematical desirability of representing functions of series expansions, but I think that the fact that this can be expensive in general should automatically discounted.

Basically, stuff that happens automatically can be very annoying if you ever don't want it done. One instance of that is if you just want to represent log(x + O(x**2)) unevaluated, but another instance is if it's expensive, and you don't necessarily want to evaluate it when you create the log.

Applying a function is a bad example. A much simpler thing to think of is just adding an Order term to an expression (this is applying the Add function). Under your scheme, any_expression_at_all + O(x**2) would automatically call series() on any_expression_at_all, even if it's very expensive. We could make it more efficient by calling series(1), because we already know that we don't care about terms above x**2. But conversely, if we did some_expression + O(x**100), to be consistant, we would need to compute some_expression.series(99).

I want to point out that in the simple cases, this *does* work. More specifically, any polynomial plus an order term or times an order term automatically combines with it. In this case, "calling series" is not expensive, because you basically don't have to call series at all (actually, I just found a counterexample to that, see issue 3654).

BTW, that's not a bug?!

Yeah, I guess it is. But note that my actual example doesn't really make sense, because it is trying to expand log(x) at x = 0. But if you use cos(x) instead of sin(x) it still doesn't work.

--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

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


Reply via email to