Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

For some reason Mathematica will not evaluate this asymptotic series to the requested order.

Inputting:

1/x ( x ((1 - x)^2) + E^x);
Series[%, {x, \[Infinity], 0}]

Yields:

$ \left( x^2 + \frac{1}{\mathcal{O} \left( \frac{1}{x} \right)} \right) + e^x \left( \frac{1}{x} + \mathcal{O} \left( \frac{1}{x} \right)^2 \right)$

The problem being that in the first term it doesn't give me the $\mathcal{O} (x^1)$ and $\mathcal{O} (x^0)$ that I requested.

Mathematica does not make this error for simpler expressions, but I haven't been able to nail down what exactly about this expression is giving me problems.

A couple things I have tried:

(1) I could simply go to a higher order in x in order to get the 'missing' terms, but this is computationally expensive on more complicated expressions.

(2) If I Expand[%] the expression prior to the series expansion that gives me the correct terms, the only thing is, I would never have guessed that I have to put that in there. Plus I often deal with expressions much more complicated than this and it is hard to visually inspect all the $\mathcal{O}(1/\Lambda)$'s all over the place

Is there a simple reason I should have anticipated this being a problem for Mathematica? And is there a simple command to use that doesn't slow things down? - sometimes using Expand[%] prior to doing a computation can slow down when dealing with large expressions.

share|improve this question
    
Interesting. Not sure if it's a bug or a feature. I'll take a look. –  Daniel Lichtblau Jul 28 at 23:00

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.