# What is the general solution of the differential equation  dy/dx + y^2=4?

Sep 16, 2017

$y = 2 \frac{{e}^{4 x} - 16}{{e}^{4 x} + 16}$

#### Explanation:

We have:

$\frac{\mathrm{dy}}{\mathrm{dx}} + {y}^{2} = 4$

We can rearrange this Differential Equation as follows:

$\frac{\mathrm{dy}}{\mathrm{dx}} = 4 - {y}^{2}$
$\therefore \frac{1}{4 - {y}^{2}} \frac{\mathrm{dy}}{\mathrm{dx}} = 1$

This is a First Order separable Differential Equation, so we can "seperate the variables" to get:

$\int \setminus \frac{1}{{2}^{2} - {y}^{2}} \setminus \mathrm{dy} = \int \setminus \mathrm{dx}$ ..... [A]

Using the standard result:

$\int \setminus \frac{1}{{a}^{2} - {t}^{2}} \setminus \mathrm{dt} = \frac{1}{2 a} \ln \left\mid \frac{a + t}{a - t} \right\mid$

we can integrate [A], to get:

$\frac{1}{4} \ln \left\mid \frac{2 + y}{2 - y} \right\mid = x + {C}_{1}$
$\therefore \ln \left\mid \frac{2 + y}{2 - y} \right\mid = 4 x + C$

Using the initial condition, $x = \ln 2$ when $y = 0$ then:

$- \ln \left\mid \frac{2 + 0}{2 - 0} \right\mid = 4 \ln 2 + C$
$\therefore 0 = 4 \ln 2 + C$
$\therefore C = - 4 \ln 2 = - \ln 16$

Thus, the (implicit) solution is:

$\ln \left\mid \frac{2 + y}{2 - y} \right\mid = 4 x - \ln 16$

We can rearrange to get an explicit solution:

$\therefore \left\mid \frac{2 + y}{2 - y} \right\mid = {e}^{4 x - \ln 16}$

Noting that ${e}^{x} > 0 \forall x \in \mathbb{R}$, then:

$\frac{2 + y}{2 - y} = {e}^{4 x} {e}^{- \ln 16}$
$\therefore \frac{2 + y}{2 - y} = {e}^{4 x} / 16$

For simplicity, Put $A = {e}^{4 x} / 16$ so that:

$\frac{2 + y}{2 - y} = A$
$\therefore 2 + y = A \left(2 - y\right)$
$\therefore 2 + y = 2 A - A y$
$\therefore y + A y = 2 A - 2$
$\therefore y \left(A + 1\right) = 2 \left(A - 1\right)$
$\therefore y = 2 \frac{A - 1}{A + 1}$

Thus, the solution is:

$y = 2 \frac{{e}^{4 x} / 16 - 1}{{e}^{4 x} / 16 + 1}$
$\setminus \setminus = 2 \frac{{e}^{4 x} / 16 - 1}{{e}^{4 x} / 16 + 1} \times \frac{16}{16}$
$\setminus \setminus = 2 \frac{{e}^{4 x} - 16}{{e}^{4 x} + 16}$