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

Solution:

\frac{d y}{d x}-y \tan x=e^{x} \sec x-\ldots(1)
To solve (1) we will use following formula
\begin{array}{l} \quad \int \tan x d x=\log (\sec x) \\ a \log b=\log b^{a} \\ a^{\log _{a} b}=b \\ \int e^{x} d x=e^{x} \end{array}
General solution for the differential equation in the form of
\frac{d y}{d x}+P y=Q
General solution is given by,
y \cdot\left(I . F_{.}\right)=\int Q \cdot\left(I . F_{\cdot}\right) d x+c
Where, integrating factor,
\text { I. } F .=e \int^{p d x}
Equation (1) is of the form, Comparing it with
\frac{d y}{d x}+P y=Q
Where, P=-\tan x and Q=e^{x} \sec x
Therefore, integrating factor is
\begin{array}{c} \text { I.F. }=e \int^{p d x} \\ e^{-\tan x d x} \\ e^{-\log (\sec x)} \ldots \ldots \ldots . .\left(\int \tan x d x=\log (\sec x)\right. \end{array}
\begin{array}{l} e^{\log (\sec x)^{-1}} \ldots \ldots \ldots \ldots\left(a \log b=\log b^{a}\right) \\ e^{\log (\cos x)} \\ \cos x \ldots \ldots \ldots \ldots\left(a^{\log _{a} b}=b\right) \end{array}
General solution is
\begin{array}{r} y \cdot(I . F .)=\int Q \cdot(I . F .) d x+c \\ y \cdot(\cos x)=\int\left(e^{x} \sec x\right) \cdot(\cos x) d x+c \\ y \cdot(\cos x)=\int\left(e^{x} \frac{1}{\cos x}\right) \cdot(\cos x) d x+c \\ y \cdot(\cos x)=\int e^{x} d x+c \\ \text { y. }(\cos x)=e^{x}+c \ldots \ldots \ldots \ldots \ldots\left(\int e^{x} d x=e^{x}\right. \end{array}
So, general solution is
\mathrm{y} \cdot(\cos \mathrm{x})=e^{x}+c