2.2   ODE No. 2

\[ a y(x)+c \left (-e^{b x}\right )+y'(x)=0 \] Mathematica : cpu = 0.0632209 (sec), leaf count = 34


\[\left \{\left \{y(x)\to \frac {c e^{x (a+b)-a x}}{a+b}+c_1 e^{-a x}\right \}\right \}\] Maple : cpu = 0.021 (sec), leaf count = 25


\[y \relax (x ) = \left (\frac {c \,{\mathrm e}^{\left (a +b \right ) x}}{a +b}+c_{1}\right ) {\mathrm e}^{-a x}\]

Hand solution

\begin {equation} \frac {dy}{dx}+ay\relax (x) =ce^{bx}\tag {1} \end {equation}

Integrating factor \(\mu =e^{\int adx}=e^{ax}\). Hence (1) becomes

\begin {align*} \frac {d}{dx}\left (\mu y\relax (x) \right ) & =\mu ce^{bx}\\ \mu y\relax (x) & =\int \mu ce^{bx}dx+C \end {align*}

Replacing \(\mu \) by \(e^{ax}\)

\begin {align*} y\relax (x) & =ce^{-ax}\int e^{\left (a+b\right ) x}dx+Ce^{-ax}\\ & =ce^{-ax}\frac {e^{\left (a+b\right ) x}}{a+b}+Ce^{-ax}\\ & =\frac {ce^{\left (a+b\right ) x-ax}}{a+b}+Ce^{-ax} \end {align*}

Can be reduced to

\[ y\relax (x) =c\frac {e^{bx}}{a+b}+Ce^{-ax}\]