# LINEAR TYPE DIFFERENTIAL EQUATION

$Differential\ equations\ of\ the\ form\ \frac{dy}{dx}\ +\ P\ y\ =\ Q,$$Where\ P\ and\ Q\ are\ functions\ of\ x\ are\ called\ Linear\ Differential\ Equations$
$The\ solution\ of\ linear\ differential\ equation\ is\ given\ by$
$y\ (I.F)\ =\ \int Q\ (I.F)\ dx\ +\ c$
$Where\ I.F\ (Integrating\ Factor)\ =\ e^{\int P\ dx}$

Example  1:

$1.\ \color{red}{Find\ the\ integrating\ factor\ of\ \frac{dy}{dx}\ +\ \frac{y}{x}\ =\ x}\ \hspace{15cm}$
$\color {blue}{Soln:}\ \hspace{20cm}$
$Compare\ with\ \frac{dy}{dx}\ +\ P\ y\ =\ Q$
$Here\ P\ =\ \frac{1}{x}$
$I.F\ =\ e^{\int P\ dx}$
$=\ e^{\int \frac{1}{x}\ dx}$
$=\ e^{log\ x}$
$\boxed{I.F\ =\ x}$

Example  2:

$2.\ \color{red}{Find\ the\ integrating\ factor\ of\ \frac{dy}{dx}\ -\ \frac{3}{x}\ y\ =\ x^2}\ \hspace{15cm}$
$\color {blue}{Soln:}\ \hspace{20cm}$
$Compare\ with\ \frac{dy}{dx}\ +\ P\ y\ =\ Q$
$Here\ P\ =\ -\ \frac{3}{x}$
$I.F\ =\ e^{\int P\ dx}$
$=\ e^{-\ \int \frac{3}{x}\ dx}$
$=\ e^{-\ 3\int \frac{1}{x}\ dx}$
$=\ e^{-\ 3\ log\ x}$
$=\ e^{log\ x^{-3}}$
$=\ x^{-3}$
$\boxed{I.F\ =\ \frac{1}{x^3}}$

Example  3:

$3.\ \color{red}{Find\ the\ integrating\ factor\ of\ \frac{dy}{dx}\ +\ y\ cot\ x\ =\ x}\ \hspace{15cm}$
$\color {blue}{Soln:}\ \hspace{20cm}$
$Compare\ with\ \frac{dy}{dx}\ +\ P\ y\ =\ Q$
$Here\ P\ =\ cot\ x$
$I.F\ =\ e^{\int P\ dx}$
$=\ e^{ \int \frac{cos\ x}{sin\ x}\ dx}$
$put\ u\ =\ sin\ x$
$du\ =\ cos\ x\ dx$
$I.F\ =\ e^{ \int \frac{du}{u}}$
$=\ e^{log\ u}$
$=\ e^{log\ sin\ x}$
$=\ sin\ x$
$\boxed{I.F\ =\ sin\ x}$

Example  4:

$4.\ \color{red}{Solve:\ \frac{dy}{dx}\ +\ y\ tan\ x\ =\ 4x\ cos\ x}\ \hspace{15cm}$
$\color {blue}{Soln:}\ \hspace{20cm}$
$Compare\ with\ \frac{dy}{dx}\ +\ P\ y\ =\ Q$
$Here\ P\ =\ tan\ x\ \hspace{2cm}\ Q\ =\ 4x\ cos\ x$
$I.F\ =\ e^{\int P\ dx}$
$=\ e^{ \int \frac{sin\ x}{cos\ x}\ dx}$
$put\ u\ =\ cos\ x$
$du\ =\ -\ sin\ x\ dx$
$I.F\ =\ e^{ \int \frac{-du}{u}}$
$=\ e^{-\ log\ u}$
$=\ e^{log\ u^{-\ 1}}$
$=\ u^{-\ 1}$
$=\ \frac{1}{u}$
$\boxed{I.F\ =\ \frac{1}{cos\ x}}$
$The\ required\ solution\ is$
$y\ (I.F)\ =\ \int Q\ (I.F)\ dx\ +\ c$
$y\ (\frac{1}{cos\ x})\ =\ \int 4x\ cos\ x\ (\frac{1}{cos\ x})\ dx\ +\ c$
$y\ sec\ x\ =\ \int 4x\ \ dx\ +\ c$
$=\ 4\ \frac{x^2}{2}\ dx\ +\ c$
$\boxed{y\ sec\ x\ =\ 2\ x^2\ +\ c}$

#### Example  5:

$\color{red}{Solve:\ \frac{dy}{dx}\ +\ 2y\ tan\ x\ =\ e^{tan\ x}}\ \hspace{15cm}$
$\color {blue}{Soln:}\ \hspace{20cm}$
$Compare\ with\ \frac{dy}{dx}\ +\ P\ y\ =\ Q$
$Here\ P\ =\ 2\ tan\ x\ \hspace{2cm}\ Q\ =\ e^x\ cos\ x$
$I.F\ =\ e^{\int P\ dx}$
$=\ e^{ 2\int \frac{sin\ x}{cos\ x}\ dx}$
$put\ u\ =\ cos\ x$
$du\ =\ -\ sin\ x\ dx$
$I.F\ =\ e^{2 \int \frac{-du}{u}}$
$=\ e^{-\ 2\ log\ u}$
$=\ e^{log\ u^{-\ 2}}$
$=\ u^{-\ 2}$
$=\ \frac{1}{u^2}$
$=\ \frac{1}{cos^2\ x}$
$\boxed{I.F\ =\ sec^2\ x}$
$The\ required\ solution\ is$
$y\ (I.F)\ =\ \int Q\ (I.F)\ dx\ +\ c$
$y\ sec^2\ x\ =\ \int e^{tan\ x}\ sec^2\ x\ dx\ +\ c$
$put\ u\ =\ tan\ x$
$du\ =\ sec^2\ x\ dx$
$y\ sec^2\ x\ =\ \int e^u\ \ du\ +\ c$
$=\ e^u\ +\ c$
$\boxed{y\ sec^2\ x\ =\ e^{tan\ x}\ +\ c}$

#### Example  6:

$\color{red}{Solve:\ \frac{dy}{dx}\ +\ y\ cot\ x\ =\ sin^3\ x}\ \hspace{15cm}$
$\color {blue}{Soln:}\ \hspace{20cm}$
$Compare\ with\ \frac{dy}{dx}\ +\ P\ y\ =\ Q$
$Here\ P\ =\ cot\ x\ \hspace{2cm}\ Q\ =\ sin^3\ x$
$I.F\ =\ e^{\int P\ dx}$
$=\ e^{ \int \frac{cos\ x}{sin\ x}\ dx}$
$put\ u\ =\ sin\ x$
$du\ =\ cos\ x\ dx$
$I.F\ =\ e^{ \int \frac{du}{u}}$
$=\ e^{log\ u}$
$=\ e^{log\ sin\ x}$
$=\ sin\ x$
$\boxed{I.F\ =\ sin\ x}$
$The\ required\ solution\ is$
$y\ (I.F)\ =\ \int Q\ (I.F)\ dx\ +\ c$
$y\ sin\ x\ =\ \int \ sin^3\ x\ sin\ x\ dx\ +\ c$
$=\ \int \ sin^4\ x\ dx\ +\ c$
$=\ \int \ (sin^2\ x)^2\ dx\ +\ c$
$=\ \int \ (\frac{1\ -\ cos\ 2x}{2})^2\ dx\ +\ c$
$=\ \frac{1}{4} [\int \ (1\ -\ cos\ 2x)^2\ dx]\ +\ c$
$=\ \frac{1}{4} [\int \ (1^2\ +\ (cos\ 2x)^2\ -\ 2(1)(cos\ 2x))\ dx]\ +\ c$
$=\ \frac{1}{4} [\int \ (1\ +\ cos^2\ 2x\ -\ 2\ cos\ 2x)\ dx]\ +\ c$
$W.K.T\ cos\ 2\ \theta\ =\ 2\ cos^2\ \theta\ -\ 1$
$cos\ 2\ \theta\ +\ 1\ =\ 2\ cos^2\ \theta$
$Replace\ \theta\ by\ 2x$
$cos\ 4\ x\ +\ 1\ =\ 2\ cos^2\ 2x$
$\frac{cos\ 4\ x\ +\ 1}{2}\ =\ cos^2\ 2x$
$y\ sin\ x\ =\ \frac{1}{4} [\int \ (1\ +\ \frac{cos\ 4\ x\ +\ 1}{2}\ -\ 2\ cos\ 2x)\ dx]\ +\ c$
$=\ \frac{1}{4} [\int \ 1\ dx\ +\ \frac{1}{2} \int cos\ 4\ x\ +\ \frac{1}{2} \int \ 1\ dx\ -\ 2\ \int cos\ 2x\ dx]\ +\ c$
$=\ \frac{1}{4} [\int \ 1\ dx\ +\ \frac{1}{2} \int cos\ 4\ x\ +\ \frac{1}{2} \int \ 1\ dx\ -\ 2\ \int cos\ 2x\ dx]\ +\ c$
$=\ \frac{1}{4} [x\ +\ \frac{1}{2}\ \frac{sin\ 4\ x}{4}\ +\ \frac{1}{2}\ x\ -\ 2\ \frac{sin\ 2\ x}{2}]\ +\ c$
$=\ \frac{1}{4} [\frac{3}{2}\ x\ +\ \frac{sin\ 4\ x}{8}\ -\ sin\ 2\ x]\ +\ c$
$\boxed{y\ sin\ x\ =\ \frac{3}{8}\ x\ +\ \frac{sin\ 4\ x}{32}\ -\ \frac{sin\ 2\ x}{4}\ +\ c}$

Example  7:

$\color{red}{Solve:\ \frac{dy}{dx}\ -\ \frac{2x}{1\ +\ x^2}\ y\ =\ (1\ +\ x^2)}\ \hspace{15cm}$
$\color {blue}{Soln:}\ \hspace{20cm}$
$Compare\ with\ \frac{dy}{dx}\ +\ P\ y\ =\ Q$
$Here\ P\ =\ -\ \frac{2x}{1\ +\ x^2}\ \hspace{2cm}\ Q\ =\ 1\ +\ x^2$
$I.F\ =\ e^{\int P\ dx}$
$=\ e^{ -\ \int \frac{2\ x}{1\ +\ x^2}\ dx}$
$put\ u\ =\ 1\ +\ x^2$
$du\ =\ 2\ x\ dx$
$I.F\ =\ e^{ \int \frac{-du}{u}}$
$=\ e^{-\ log\ u}$
$=\ e^{log\ u^{-\ 1}}$
$=\ u^{-\ 1}$
$=\ \frac{1}{u}$
$\boxed{I.F\ =\ \frac{1}{1\ +\ x^2}}$
$The\ required\ solution\ is$
$y\ (I.F)\ =\ \int Q\ (I.F)\ dx\ +\ c$
$y\ (\frac{1}{1\ +\ x^2})\ =\ \int (1\ +\ x^2)\ (\frac{1}{1\ +\ x^2})\ dx\ +\ c$
$\frac{y}{1\ +\ x^2}\ =\ \int 1\ dx\ +\ c$
$\boxed{\frac{y}{1\ +\ x^2}\ =\ x\ +\ c}$