# Some problems solving an ODE

Given $$y'=\frac{e^{-y^2}}{y(2x+x^2)}$$

What is the best method to solve this equation? I thought write it in seperable notation, obtaining $$\frac{X_1(x)}{X_2(x)}+\frac{Y_2(y)}{Y_1(y)}y'=0,$$ which has a solution $$\int\frac{X_1(x)}{X_2(x)}dx+\int\frac{Y_2(y)}{Y_1(y)}dy=c$$ I defined $$X_1=1; \quad X_2=2x+x^2; \quad Y_2=-y; \quad Y_1= e^{y^2}.$$ My solution is $$\frac 1 2 \log(x)-\log(x+2) -\frac 1 2 e^{y^2}=c.$$ Is this the correct solution?

-
You've made a mistake. \begin{align} Y_2&=-y\exp(y^2) \\ Y_1&=1 \end{align} – Egor Skriptunoff Nov 25 '12 at 16:22
If you take the derivative of your solution, do you get what you started with? In other words, you can always test your solution. You've made an error in your answer. – Amzoti Nov 25 '12 at 17:05
How can I test it if it is in implicit form? – Applied mathematician Nov 25 '12 at 17:21
@Hempo: implicit differentiation, for example: math.ucdavis.edu/~kouba/CalcOneDIRECTORY/implicitdiffdirectory/… – Amzoti Nov 25 '12 at 17:28
Seems to me the $1/2$ should apply to both of the logarithms. – Gerry Myerson Nov 26 '12 at 0:27

You have $y'=\frac{e^{-y^2}}{y(2x+x^2)}$, which is separable, confirming your comment.

If we separate we have:

$$\int ye^{y^2}dy=\int\frac{1}{2x+x^2}dx$$

For $dy$ you can use the method of substitution and for $dx$ you can factor out an $x$ out of the denominator and use partial fractions.

-
I get $$\frac 1 2 (log(x) -log(x+2))- \frac 1 2 e^{y^2}=c$$. This implicit solution is the only way to write it? I get a very strange solution if I solve it for y (+- square root of ln(ln(...)etc – Applied mathematician Nov 26 '12 at 10:28
Hempo, you are correct on your integrate. I doubt your instructor would want you to simply it more because when I had these types of problems the instructor told me to leave as is because it will be too complex to simplify it using elementary functions. You are correct though. – diimension Nov 26 '12 at 20:25
great, tyvm for helping me – Applied mathematician Nov 26 '12 at 20:31