Find the general solution for each of the following differential equations. x \frac{d y}{d x}+y=3 x^{2}-2, x>0
Find the general solution for each of the following differential equations. x \frac{d y}{d x}+y=3 x^{2}-2, x>0

Solution:

x \frac{d y}{d x}+y=3 x^{2}-3\dots \dots (1)
To solve (1) we will use following formula
\begin{array}{l} \int \frac{1}{x} d x=\log x \\ a^{\log _{a} b}=\log b \end{array}
General solution for the differential equation in the form of is given by,
\begin{array}{c} \frac{d y}{d x}+P y=Q \\ y \cdot(I . F .)=\int Q \cdot(I . F .) d x+c \end{array}
Where integrating factor,
\text { I.F. }=e \int^{p d x}
Dividing the equation (1) by \mathrm{x},
\frac{d y}{d x}+\frac{1}{x} \cdot y=\frac{3 x^{2}-2}{x} \ldots \ldots \ldots . .(2)
Comparing (2) with
\frac{d y}{d x}+P y=Q
We get, P=\frac{1}{x} and Q=\frac{3 x^{2}-2}{x}
so, the integrating factor is
\begin{array}{c} \text { I.F. }=e \int^{p d x} \\ e^{\int \frac{1}{x} d x} \end{array}
\begin{array}{c} e \log x_{-}\left(\int \frac{1}{x} d x=\log x\right) \\ =x_{-}\left(a^{\log _{a} b}=\log b\right) \end{array}
General solution is
\begin{array}{c} y \cdot(I . F .)=\int Q \cdot(I . F .) d x+c \\ y \cdot(x)=\int\left(\frac{3 x^{2}-2}{x}\right) \cdot x+C \\ x y=\int\left(3 x^{2}-2\right) d x+c \\ x y=3 \frac{x^{3}}{3}-2 x+c_{-}\left(\int x^{n} d x=\frac{x^{n+1}}{n+1}\right) \end{array}
Dividing the above equation by \mathrm{x}
y=x^{2}-2+\frac{c}{x}