## Solving Non Linear Differential Equations Example

Solving non linear differential equations is generally much harder than solving linear differential equations, but sometimes an exact analytical solution is possible.
Example:
$2y \frac{d^2y}{dx^2}=($$\frac{dy}{dx}$$^2-1$
. Let
$u= \frac{dy}{dx}$
then the equation becomes
$\frac{du}{dx}=u^2-1 \rightarrow \int \frac{1}{u^2-1}du = \int 1dx$
.
$\frac{1}{u^2-1}d = \frac{1/2}{u-1} - \frac{1/2}{u+1}$
so the integral becomes
$\frac{du}{dx}=u^2-1 \rightarrow \int \frac{1/2}{u-1} - \frac{1/2}{u+1} du = \int 1dx$
.
$\frac{ln(\frac{u-1}{u+1})}{2}=x+c \rightarrow \frac{u-1}{u+1}=2x+2c \rightarrow \frac{u-1}{u+1}=e^{2x+2c}=Ae^{2x} \rightarrow u= \frac{1+Ae^{2x}}{1-Ae^{2x}}$
.
Hence
$\frac{dy}{dx}= \frac{1+Ae^{2x}}{1-Ae^{2x}}=1+\frac{2Ae^{2x}}{1-Ae^{2x}}=1-\frac{-2Ae^{2x}}{1-Ae^{2x}}$
.
Integrating again gives
$y=x+-ln(1-Ae^{2x})+B$
.