# Separable equation, initial condition

I am confused about this example that I am trying to understand.

We solve the initial value problem $$x' = \frac{te^{x^2}}{x}, \space x(0) = 1,$$ and we do it "the usual way" by writing the equation as $x'xe^{-x^2} = t$ and integrating both sides. We end up with $x^2 = \mathrm{ln}\frac{1}{e^{-1}-t^2} \iff x = \pm \sqrt{\mathrm{ln}\frac{1}{e^{-1}-t^2}}.$ Then the text says that we know, because of the initial condition, which sign to choose in front of the root expression, so it should be $+\sqrt{\mathrm{ln}\frac{1}{e^{-1}-t^2}}.$ That is what confuses me.

I have learned that if there is a constant solution $x(t) \equiv k$, then any nonconstant solution cannot cross the line $x=k$. But from what I can gather, there is no constant solution to this equation. Because $x\equiv k \iff \frac{e^{x^2}}{x} = 0,$ which cannot happen for any $x$. Other than that I have no idea what the initial condition could possibly tell me about which sign to choose.

After integrating both sides, we find

$$-e^{-x^2}=t^2+C$$

but for $t=0$ we should have $x (0)=1$ thus $C=-e^{-1}$.

finally $$x^2 (t)=-\ln \left(-t^2+\frac {1}{e}\right)$$ $$=\ln \left(\frac {1}{-t^2+\frac {1}{e}}\right)$$

and $$x (t)=\sqrt {\ln \left( \frac {1}{-t^2+\frac {1}{e}} \right)}$$

if we take negative root, we will have $x (0)=-1$ instead of $1$.

• It seems so obvious now that you did it. :p Aug 14 '17 at 22:00