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.

I've been baffled by a lot of the behaviours of Mathematica 9 — so much that I regret upgrading my copy of Mathematica 8 (I would downgrade but I'm currently on vacation). Here is an example:

DSolve[{x^2*y''[x] + x*y'[x] - y[x] == 0}, y[x], x]

should return the simple answer of C1*x + C2/x. In fact, this is what Wolfram Alpha returns and also Mupad (a Maple within Matlab). However, Mathematica returns

Mathematica picture

Yes, I know you can simplify this for real output, but it baffles me why it doesn't do it in the first place. Moreover, once your differential equations become messy, this can be hard to do. I have encountered other examples where the output from Mathematica's DSolve seems to very strange indeed. This isn't an isolated example, and I encounter examples of these very simple DEs that Mathematica fails to simplify in any sort of obvious way.

I don't remember these difficulties in Mathematica 8 or previous versions. Does anybody know what is an easy fix or what's going on? I have also documented similar bugs in the series expansions here and here.

share|improve this question
add comment

1 Answer

Constrain your assumptions:

Assuming[x \[Element] Reals, DSolve[{x^2*y''[x] + x*y'[x] - y[x] == 0}, y[x], x]]

{{y[x] -> 1/2 x C[1] + C[2]/x}}

share|improve this answer
2  
nguns ;-) –  Vitaliy Kaurov Jul 29 '13 at 7:11
add comment

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.