How to solve this differential equation; solution given, one approach also shown

I have this differential equation that needs solving:

$$\frac{dx}{dt}+\alpha x=\beta$$

Then the solution is supposed to be:

$$x=e^{-\alpha t}(C+\beta\int\limits_0^t e^{\alpha y}dy)$$

However if I use the simple approach of substituting $$z=\beta-\alpha x$$, I have

$$\frac{dz}{z}=-\alpha\ dt$$

Simple integration gives answer which is different from desired solution.

$$ln\ z=-\alpha t+C$$

• Do you know Laplace transform? May 15 '20 at 12:48
• will have to google May 15 '20 at 12:50

$$\ln\ z=-\alpha t+C$$ $$z=Ce^{-\alpha t}$$ $$\beta-\alpha x=Ce^{-\alpha t}$$ $$\alpha x=-Ce^{-\alpha t}+\beta$$ $$x=-\dfrac C {\alpha }e^{-\alpha t}+\dfrac {\beta}{\alpha}$$ $$x(t)=Ke^{-\alpha t}+\dfrac {\beta}{\alpha}$$ Looks the same for me. $$x=e^{-\alpha t}(C+\beta\int\limits_0^t e^{\alpha y}dy)$$ $$x=e^{-\alpha t}(C+\dfrac {\beta}{\alpha}( e^{\alpha t}-1))$$ $$x=e^{-\alpha t}(C-\dfrac {\beta}{\alpha})+\dfrac {\beta}{\alpha}$$ This can ve rewritten as: $$x(t)=Ke^{-\alpha t}+\dfrac {\beta}{\alpha}$$ It's the same answer. $$K$$ is just a constant.