Find the general solution for each of the following differential equations. x \frac{d y}{d x}-y=2 x^{2} \sec x
Find the general solution for each of the following differential equations. x \frac{d y}{d x}-y=2 x^{2} \sec x

Solution:

x \frac{d y}{d x}-y=2 x^{2} \sec x \dots (1)
General solution for the differential equation in the form of
\frac{d y}{d x}+\mathrm{Py}=\mathrm{Q}
General solution is given by,
y \cdot(I . F .)=\int Q \cdot(I . F .) d x+c
Where, integrating factor,
\begin{array}{r} \text { I. } F .=e \int p d x \\ \mathrm{x} \frac{d y}{d x}-\mathrm{y}=2 x^{2} \sec x \ldots \ldots \ldots(1) \end{array}
Dividing above equation by x,
\therefore \frac{d y}{d x}-\frac{1}{x} \mathrm{y}=2 \mathrm{xsec} x
Equation (1) is of the form
\frac{d y}{d x}+\mathrm{Py}=\mathrm{Q}
Where, \mathrm{P}=\frac{-1}{x} and \mathrm{Q}=2 \mathrm{x} \sec x
Therefore, integrating factor is
\text { I. } F .=e \int^{p d x}=\frac{1}{x}
General solution is
\begin{array}{l} y \cdot(I . F .)=\int Q \cdot(I . F .) d x+c \\ \therefore \mathrm{y} \cdot\left(\frac{1}{x}\right)=\int(2 x \sec x) \cdot\left(\frac{1}{x}\right) \mathrm{d} x+\mathrm{c} \\ \therefore \mathrm{y} \cdot\left(\frac{1}{x}\right)=2 \log \mid \sec x+\tan x_{\mid}+\mathrm{c} \end{array}
Multiplying above equation by x,
\therefore y=2 x \log |\sec x+\tan x|+c x