A first-order linear differential equation

ordinary differential equations

I have a first-order linear ODE as follows:

$\frac{dx}{dt}=-\alpha(x-x_0)-\beta(t)$, and I am trying at a solution of this via integrating the factor method. Here's a try:

$\frac{dx}{dt}=-\alpha x+\underbrace{\alpha x_0-\beta(t)}_{f(t)}$

Is it OK to assume the braced term as $f(t)$ if $x_0$ is constant?

Thus: $\frac{dx}{dt}=-\alpha x+f(t)$

Next, the integrating factor is: $e^{\int\alpha dt}=e^{\alpha t}$ (only if $\alpha$ is a constant?) Also, can we take a constant as an I.F., like $\alpha$ in this case?

This can then lead to

$\frac{d}{dt}\left[x e^{\alpha t} \right]=(\alpha x_0-\beta(t))e^{\alpha t}$

leading to

$x(t)=e^{-\alpha t}\left[\int\limits_0^t (\alpha x_0-\beta(t'))e^{\alpha t'}dt' \right]$

Finally, can I write the above as follows?

$x(t)=\int\limits_0^t e^{-\alpha(t-t')}\left[\alpha x_0-\beta(t') \right]dt'$

because the integration measure is over $t'$ that runs from $0$ to $t$?

Best Answer

You're free to move the exponential prefactor depending on $t$ (and not $t'$) inside the integral, as you've done. But in general, the integral should really be an indefinite integral - otherwise, you're fixing $x(0)=0$.

Related Question