# What is a solution to the differential equation y'+y/x^2=2/x^3?

Jul 17, 2016

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

#### Explanation:

$y ' + \frac{y}{x} ^ 2 = \frac{2}{x} ^ 3$

let's try separating,...., $y ' = \frac{2}{x} ^ 3 - \frac{y}{x} ^ 2$ ie NOT separable, so in wrong category

BUT we can still do it! by writing it in this form we look for the Integrating Factor $\eta \left(x\right)$

$y ' + \textcolor{b l u e}{\frac{1}{x} ^ 2} y = \frac{2}{x} ^ 3$

So here $\eta \left(x\right) = {e}^{\int \textcolor{b l u e}{\frac{1}{x} ^ 2} \setminus \mathrm{dx}} = {e}^{- \frac{1}{x}}$

${e}^{- \frac{1}{x}} y ' + {e}^{- \frac{1}{x}} \textcolor{b l u e}{\frac{1}{x} ^ 2} y = {e}^{- \frac{1}{x}} \frac{2}{x} ^ 3$

or

$\frac{d}{\mathrm{dx}} \left(y {e}^{- \frac{1}{x}}\right) = {e}^{- \frac{1}{x}} \frac{2}{x} ^ 3$

$\int \setminus \frac{d}{\mathrm{dx}} \left(y {e}^{- \frac{1}{x}}\right) \setminus \mathrm{dx} = \int \setminus {e}^{- \frac{1}{x}} \frac{2}{x} ^ 3 \setminus \mathrm{dx}$

So

$y {e}^{- \frac{1}{x}} = \textcolor{red}{\int \setminus {e}^{- \frac{1}{x}} \frac{2}{x} ^ 3 \mathrm{dx}} q \quad \triangle$

we'll try IBP on the red bit

$\int \setminus {e}^{- \frac{1}{x}} \frac{2}{x} ^ 3 \mathrm{dx}$

$= \int \setminus \frac{1}{x} ^ 2 {e}^{- \frac{1}{x}} \cdot \frac{2}{x} \setminus \mathrm{dx}$

$= \int \setminus \frac{d}{\mathrm{dx}} \left({e}^{- \frac{1}{x}}\right) \cdot \frac{2}{x} \setminus \mathrm{dx}$

which by IBP: $\int u v ' = u v - \int u ' v$

$= {e}^{- \frac{1}{x}} \frac{2}{x} - \int \setminus {e}^{- \frac{1}{x}} \frac{d}{\mathrm{dx}} \left(\frac{2}{x}\right) \setminus \mathrm{dx}$

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

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

going back to $\triangle$
$\implies y {e}^{- \frac{1}{x}} = 2 {e}^{- \frac{1}{x}} \left(\frac{1}{x} + 1\right) + C$

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

Jul 17, 2016

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

#### Explanation:

This is a linear homogeneus differential equation. Its solution can be assembled as

$y \left(x\right) = {y}_{h} \left(x\right) + {y}_{p} \left(x\right)$

where

$y {'}_{h} \left(x\right) + \frac{{y}_{h} \left(x\right)}{x} ^ 2 = 0$ and
$y {'}_{p} \left(x\right) + \frac{{y}_{p} \left(x\right)}{x} ^ 2 = \frac{2}{x} ^ 3$

The homogeneus solution is straightforward. Grouping

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

For the obtention of ${y}_{p} \left(x\right)$ we will use the Lagrange's variation of constants technique.

Supposing that ${y}_{p} \left(x\right) = C \left(x\right) {e}^{\frac{1}{x}}$ and substituting in the complete equation we obtain

$C ' \left(x\right) = \frac{2 {e}^{- \frac{1}{x}}}{x} ^ 3 \to C \left(x\right) = 2 {e}^{- \frac{1}{x}} \left(1 + \frac{1}{x}\right) + {C}_{2}$

so

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

Finally

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