coexpennan

2021-01-13

Solve differential equation $\frac{dy}{dx}+xy=x{y}^{2}$

ottcomn

$\frac{dy}{dx}+xy=x{y}^{2}$
$⇒\frac{dy}{dx}=x{y}^{2}-xy$
$⇒\frac{dy}{dx}=xy\left(y-1\right)$
$⇒\frac{dy}{y\left(y-1\right)}=xdx$
$\frac{1}{y\left(y-1\right)}=\frac{A}{y}+\frac{B}{y-1}$
$⇒1=A\left(y-1\right)+By$
$⇒1=\left(A+B\right)y-A$
Comparing the coefficient of y and constant term on both side, we get

So, we write
$\frac{1}{y\left(y-1\right)}=-\frac{1}{y}+\frac{1}{\left(y-1\right)}$
So, we have
$\left(-\frac{1}{y}+\frac{1}{\left(y-1\right)}\right)dy=xdx$
Now, we will integrate this equation on both the side
$\int \left(-\frac{1}{y}+\frac{1}{\left(y-1\right)}\right)dy=\int xdx$ $⇒-\mathrm{ln}\left(y\right)+\mathrm{ln}\left(y-1\right)={x}^{\frac{2}{2}+C}$
$⇒\frac{y-1}{y}={x}^{\frac{2}{2}+C}$
$⇒\frac{y-1}{y}={e}^{{x}^{\frac{2}{2}+C}}$
$⇒\frac{y-1}{y}={e}^{{x}^{\frac{2}{2}}}{e}^{C}$
$⇒\frac{y-1}{y}={C}_{1}{e}^{{x}^{\frac{2}{2}}}$, ${C}_{1}={e}^{C}$
where C and ${C}_{1}$ are arbitrary constant
$⇒y-1={C}_{1}{e}^{\frac{{x}^{\frac{2}{2}}}{y}}$
$⇒y={C}_{1}{e}^{{x}^{\frac{2}{2}}y}+1$
$⇒y-C{e}^{{x}^{\frac{2}{2}}}y=1$
$⇒y\left(1-{C}_{1}{e}^{{x}^{\frac{2}{2}}}\right)=1$
$⇒y=\frac{1}{1-{C}_{1}{e}^{{x}^{\frac{2}{2}}}}$

Jeffrey Jordon

Answer is given below (on video)

Jeffrey Jordon