Question:
$\frac{d y}{d x}+\frac{y}{x}=x^{2}$
Solution:
The given differential equation is:
$\frac{d y}{d x}+p y=Q\left(\right.$ where $p=\frac{1}{x}$ and $\left.Q=x^{2}\right)$
Now, I.F $=e^{\int p d x}=e^{\int \frac{1}{x} d x}=e^{\log x}=x$
The solution of the given differential equation is given by the relation,
$y(\mathrm{I} . \mathrm{F} .)=\int(\mathrm{Q} \times \mathrm{I} . \mathrm{F} .) d x+\mathrm{C}$
$\Rightarrow y(x)=\int\left(x^{2} \cdot x\right) d x+\mathrm{C}$
$\Rightarrow x y=\int x^{3} d x+\mathrm{C}$
$\Rightarrow x y=\frac{x^{4}}{4}+\mathrm{C}$
This is the required general solution of the given differential equation.