#### 2.2   ODE No. 2

$a y(x)+c \left (-e^{b x}\right )+y'(x)=0$ Mathematica : cpu = 0.0374303 (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.019 (sec), leaf count = 25

$\left \{ y \left ( x \right ) = \left ( {\frac {c{{\rm e}^{ \left ( a+b \right ) x}}}{a+b}}+{\it \_C1} \right ) {{\rm e}^{-ax}} \right \}$

Hand solution

\begin {equation} \frac {dy}{dx}+ay\left ( x\right ) =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\left ( x\right ) \right ) & =\mu ce^{bx}\\ \mu y\left ( x\right ) & =\int \mu ce^{bx}dx+C \end {align*}

Replacing $$\mu$$ by $$e^{ax}$$

\begin {align*} y\left ( x\right ) & =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\left ( x\right ) =c\frac {e^{bx}}{a+b}+Ce^{-ax}$