# I was wondering why I got the different answer of the same differential equation in two different ways?

Cross-posted in https://www.zhihu.com/question/40784580

In Mathematica I got the different answer of the same differential equation respectively in analytical method and numerical method. At the beginning I think it is queer and later I know that this different equation has more than one answers and this two answer are all right and now it is queer that why each method can only get one answer and why they didn't get the same one answer and what can we do to get all answers of this equation in any one method? Thank you!

• 同学，请不要贴截图，贴代码文本。 – xzczd Feb 28 '16 at 3:31
• It is always appreciated when one includes actual code in questions rather than, or at least in addition to, a screen capture of the Notebook. – Mr.Wizard Feb 28 '16 at 3:32
• DSolve picks the generic solution and specializes to the initial condition; NDSolve starts from the initial condition, and because the singular solution is already rectified, NDSolve never strays from it. – Michael E2 Feb 28 '16 at 4:01
• Related: mathematica.stackexchange.com/a/89385 (with F[x, y, p] == p^2 - y; also mathematica.stackexchange.com/a/57912 -- I'm pretty sure this same equation has come up before, but I can't find it. – Michael E2 Feb 28 '16 at 4:06