# Thread: Solution of the ODE

1. ## Solution of the ODE

Solution of the ODE, dy/dx = 2xy^2, for which y(0)=1?
And what is x when y reaches infinity?

2. ## Re: Solution of the ODE

Originally Posted by tykim
Solution of the ODE, dy/dx = 2xy^2, for which y(0)=1?
And what is x when y reaches infinity?
\displaystyle \displaystyle \begin{align*} \frac{dy}{dx} &= 2x\,y^2 \\ y^{-2}\,\frac{dy}{dx} &= 2x \\ \int{y^{-2}\,\frac{dy}{dx}\,dx} &= \int{2x\,dx} \\ \int{y^{-2}\,dy} &= x^2 + C_1 \\ -y^{-1} + C_2 &= x^2 + C_1 \\ y^{-1} &= C - x^2 \textrm{ where }C = C_2 - C_1 \\ y &= \frac{1}{C - x^2} \end{align*}

When \displaystyle \displaystyle \begin{align*} x = 0, y = 1 \end{align*}, so

\displaystyle \displaystyle \begin{align*} 1 &= \frac{1}{ C - 0^2 } \\ 1 &= \frac{1}{C} \\ 1 &= C \end{align*}

So the solution is \displaystyle \displaystyle \begin{align*} y = \frac{1}{1 - x^2} = \frac{1}{(1 - x)(1 + x)} \end{align*}, and if \displaystyle \displaystyle \begin{align*} y \to \infty, x \to -1 \textrm{ or }x \to 1 \end{align*}.