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

Solution:

\frac{d y}{d x}+2 y=6 e^{x}
To solve (1) we will use following formula
\begin{array}{l} \int 1 d x=x \\ \int e^{k x} d x=\frac{e^{k x}}{k} \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(\text { I. } F .) d x+c \end{array}
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=2 \operatorname{and} Q=6 e^{x}
Therefore, integrating factor is
\begin{array}{c} \text { I.F. }=e \int^{p d x} \\ e \int^{2 d x}=e^{2 \int 1 d x}=e^{2 x}-\left(\int 1 d x=x\right) \end{array}
General solution is
\begin{array}{c} y \cdot(I . F \cdot)=\int Q \cdot(I . F \cdot) d x+c \\ y \cdot\left(e^{2 x}\right)=\int\left(6 e^{x}\right) \cdot\left(e^{2 x}\right) d x+c \\ y \cdot\left(e^{2 x}\right)=6 \int e^{3 x} d x+c \\ y \cdot\left(e^{2 x}\right)=6 \frac{e^{3 x}}{3}+c_{-}\left(\int e^{k x} d x=\frac{e^{k x}}{k}\right) \\ y \cdot\left(e^{2 x}\right)=2 e^{3 x}+c \end{array}
Dividing above equation by \left(e^{2 x}\right)
\begin{array}{r} y=\frac{2 e^{3 x}}{e^{2 x}}+\frac{c}{e^{2 x}} \\ y=2 e^{(3 x-2 x)}+c e^{-2 x} \quad \text { (general solution) } \end{array}