# What is the general solution of the differential equation? :  dy/dx + (2x)/(x^2+1)y=1/(x^2+1)

Aug 16, 2017

$y = \frac{x}{{x}^{2} + 1} + \frac{C}{{x}^{2} + 1}$

#### Explanation:

We have:

$\frac{\mathrm{dy}}{\mathrm{dx}} + \frac{2 x}{{x}^{2} + 1} y = \frac{1}{{x}^{2} + 1}$ ..... [A]

This is a first order linear differential equation of the form:

$\frac{d \zeta}{\mathrm{dx}} + P \left(x\right) \zeta = Q \left(x\right)$

We solve this using an Integrating Factor

$I = \exp \left(\setminus \int \setminus P \left(x\right) \setminus \mathrm{dx}\right)$
 \ \ = exp( int \ (2x)/(x^2+1) ) \ dx )
$\setminus \setminus = \exp \left(\ln | {x}^{2} + 1 |\right)$
$\setminus \setminus = \exp \left(\ln \left({x}^{2} + 1\right)\right)$ as ${x}^{2} + 1 > 0$
$\setminus \setminus = {x}^{2} + 1$

And if we multiply the DE [A] by this Integrating Factor, $I$, we will (by virtue of the IF) have a perfect product differential;

$\left({x}^{2} + 1\right) \frac{\mathrm{dy}}{\mathrm{dx}} + \left(2 x\right) y = 1$

$\therefore \frac{d}{\mathrm{dx}} \left(\left({x}^{2} + 1\right) y\right) = 1$

Which is now a trivial separable DE, so we can "separate the variables" to get:

$\left({x}^{2} + 1\right) y = \int \setminus \mathrm{dx}$

And integrating gives us:

$\left({x}^{2} + 1\right) y = x + C$

Which we can rearrange to get:

$y = \frac{x}{{x}^{2} + 1} + \frac{C}{{x}^{2} + 1}$

Aug 16, 2017

$y \left(x\right) = \frac{x + C}{{x}^{2} + 1}$

#### Explanation:

GIven: $\frac{\mathrm{dy}}{\mathrm{dx}} + \frac{2 x}{{x}^{2} + 1} y = \frac{1}{{x}^{2} + 1}$

I am going to make a slight change of notation and mark it as equation :

$y ' \left(x\right) + \frac{2 x}{{x}^{2} + 1} y \left(x\right) = \frac{1}{{x}^{2} + 1} \text{ }$

Equation  is in the form:

$y ' \left(x\right) + P \left(x\right) y \left(x\right) = Q \left(x\right)$

where $P \left(x\right) = \frac{2 x}{{x}^{2} + 1}$ and $Q \left(x\right) = \frac{1}{{x}^{2} + 1}$

This type of equation is known to have an integrating factor:

mu(x) = e^(intP(x)dx

Substitute for $P \left(x\right)$

mu(x) = e^(int(2x)/(x^2+1)dx

Integrate:

$\mu \left(x\right) = {e}^{\ln \left({x}^{2} + 1\right)}$

Simplify:

$\mu \left(x\right) = {x}^{2} + 1$

Multiply both sides of the equation  by $\mu \left(x\right)$:

$\left({x}^{2} + 1\right) y ' \left(x\right) + \left(2 x\right) y \left(x\right) = 1$

Set up both sides for integration:

$\int \left(\left({x}^{2} + 1\right) y ' \left(x\right) + \left(2 x\right) y \left(x\right)\right) \mathrm{dx} = \int \mathrm{dx}$

We do not actually integrate the left side integrates, because multiplication by the integrating factor assures that the left side integrates to $\mu \left(x\right) y \left(x\right)$. We do integrate right side but the integral is trivial:

$\left({x}^{2} + 1\right) y \left(x\right) = x + C$

Solve for $y \left(x\right)$:

$y \left(x\right) = \frac{x + C}{{x}^{2} + 1}$

Aug 16, 2017

$y = \frac{x + {C}_{3}}{{x}^{2} + 1}$

#### Explanation:

This differential equation is completely equivalent to

$\left({x}^{2} + 1\right) \frac{\mathrm{dy}}{\mathrm{dx}} + 2 x y = 1$ because ${x}^{2} + 1 > 0 \forall x \in \mathbb{R}$

The homogeneous part of this linear differential equation is

$\left({x}^{2} + 1\right) y {'}_{h} + 2 x {y}_{y} = 0$ which is separable

$\frac{2 x}{{x}^{2} + 1} \mathrm{dx} = - {\mathrm{dy}}_{h} / \left({y}_{h}\right)$ and integrating

${\log}_{e} \left({x}^{2} + 1\right) = - {\log}_{e} {y}_{h} + {C}_{1}$ then

${x}^{2} + 1 = {C}_{2} / {y}_{h}$ or

${y}_{h} = {C}_{2} / \left({x}^{2} + 1\right)$

Substituting now ${y}_{p} = \frac{{C}_{2} \left(x\right)}{{x}^{2} + 1}$ into the complete equation we obtain

${C}_{2} ' \left(x\right) = 1$ and then

${C}_{2} \left(x\right) = x + {C}_{3}$

Now the complete solution is obtained as $y = {y}_{h} + {y}_{p}$ and then

$y = \frac{x + {C}_{3}}{{x}^{2} + 1}$