Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to solve $\frac{dx}{dt} + \alpha x = 1$, $x(0) = 2$, $\alpha > 0$ where $\alpha$ is a constant.

[some very badly done mathematics deleted]

Continuing with Gerry's suggestion:

$\log|1-\alpha x | = -t\alpha + \log|1-2\alpha|$

$1-\alpha x = e^{-t\alpha}(1-2\alpha)$

$x(t) = \frac{1 - e^{-t\alpha}(1-2\alpha)}{\alpha}$

Then the asymptotic behaviour of $x(t)$ as $t$ goes infinity would be $e^{-t\alpha}$ approaching zero, therefore the overall $x(t)$ would approach $\frac{1}{\alpha}$.

share|cite|improve this question
You should integrate rhs wrt t, not wrt x. – Per Alexandersson Jun 4 '11 at 11:55
You can directly check your solution by substituting it into the original equation. This is a routine check that should be applied to any solution, not just for differential equations. – joriki Jun 4 '11 at 12:03
By the way, your derivation of $c=\alpha$is also wrong. I think you might profit from focussing on the roles that the various quantities ($x$, $t$, $\alpha$, $c$) play here. Are you aware that they include constants, variables and functions, and which are which? – joriki Jun 4 '11 at 12:06
up vote 6 down vote accepted

joriki's approach is fine. Alternatively, the equation is "variables separable" and can be solved by rewriting as $${1\over1-\alpha x}\,dx=dt$$ and then integrating; $$\int{1\over1-\alpha x}\,dx=\int\,dt,\qquad -{1\over\alpha}\log|1-\alpha x|=t+C$$ stick in $t=0$ to get $$C=-{1\over\alpha}\log|1-2\alpha|,\qquad -{1\over\alpha}\log|1-\alpha x|=t-{1\over\alpha}\log|1-2\alpha|$$ and now solve for $x$.

share|cite|improve this answer

This is an inhomogeneous first-order linear ordinary differential equation. The standard way to solve such an equation is to find all solutions of the corresponding homogeneous equation and then add any particular solution of the inhomogeneous equation.

The inhomogeneous equation is solved by a constant:

$$x(t)=x_0 \rightarrow \alpha x_0=1 \rightarrow x_0=\frac{1}{\alpha}\;.$$

The standard way to find all solutions of the homogeneous equation

$$\frac{\mathrm dx}{\mathrm dt}+\alpha x=0$$

is through the ansatz

$$x(t)=c\mathrm e^{\lambda x}\;,$$

which leads to the characteristic equation


and hence $\lambda=-\alpha$ and

$$x(t)=c\mathrm e^{-\alpha t}\;.$$

So the general solution of the inhomogeneous equation is

$$x(t)=c\mathrm e^{-\alpha t}+\frac{1}{\alpha}\;.$$

Substituting $x(0)=2$ yields



and thus

$$x(t)=\left(2-\frac{1}{\alpha}\right)e^{-\alpha t}+\frac{1}{\alpha}\;.$$

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.