# Solve the differential equation

Question:

Solve the differential equation $y e^{\frac{x}{y}} d x=\left(x e^{\frac{x}{y}}+y^{2}\right) d y(y \neq 0)$

Solution:

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

$\Rightarrow y e^{\frac{x}{y}} \frac{d x}{d y}=x e^{\frac{x}{y}}+y^{2}$

$\Rightarrow e^{\frac{x}{y}}\left[y \cdot \frac{d x}{d y}-x\right]=y^{2}$

$\Rightarrow e^{\frac{x}{y}} \cdot \frac{\left[y \cdot \frac{d x}{d y}-x\right]}{y^{2}}=1$                 ...(1)

Let $e^{\frac{x}{y}}=z$.

Differentiating it with respect to y, we get:

$\frac{d}{d y}\left(e^{\frac{x}{y}}\right)=\frac{d z}{d y}$

$\Rightarrow e^{\frac{x}{y}} \cdot \frac{d}{d y}\left(\frac{x}{y}\right)=\frac{d z}{d y}$

$\Rightarrow e^{\frac{x}{y}} \cdot\left[\frac{y \cdot \frac{d x}{d y}-x}{y^{2}}\right]=\frac{d z}{d y}$                        $. .(2)$

From equation (1) and equation (2), we get:

$\frac{d z}{d y}=1$

$\Rightarrow d z=d y$

Integrating both sides, we get:

$z=y+\mathrm{C}$

$\Rightarrow e^{\frac{x}{y}}=y+\mathrm{C}$