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

Consider the differential equation with $\frac{dx}{dt}=1-x$ and $x=0$ when $t=0$.

The answer uses the result that $\int \frac{dx}{1-x}=\ln (1-x)$, hence getting the solution $x=1-e^{-t}$.

However I use $\int \frac{dx}{1-x}=\ln \left|1-x\right|$ instead, which gets me $x=1-e^{-t} \text{ or }1+e^{-t}$.

Am I right, or is it standard to not use the absolute signs?

share|cite|improve this question
$x=1$ is a constant solution of the equation. So maximal solutions cannot touch. – Siminore Apr 23 '12 at 15:05
BTW In the integrations you are missing a minus sign – Giuseppe Apr 23 '12 at 15:06
The 2nd "solution" isn't one as $1 + e^{-0} = 1 + 1 = 2 \ne 0$. – martini Apr 23 '12 at 15:15
@Siminore. But doesn't there exist a concern that $x(t)$ may also take values above $1$, making $ln(1-x)$ undefined? – T. Eskin Apr 23 '12 at 15:16
Your antiderivative is wrong. It should say $\displaystyle\int \frac{dx}{1-x} = -\ln(1-x)$. You neglected the chain rule by omitting the minus sign. – Michael Hardy Apr 23 '12 at 15:21
up vote 2 down vote accepted

$$ \frac{dx}{dt} = 1-x $$ $$ \frac{dx}{1-x} = dt $$ $$ -\ln|1-x| = t+\text{constant} $$ $$ |1-x| = e^{-t}\cdot\text{positive constant} $$ (Since $e$ to a real power is always positive.) $$ 1-x=e^{-t}\cdot\text{constant} $$ $$ x = 1 - e^{-t}\cdot\text{constant} $$ Since we want $x=0$ when $t=0$, the "constant" is $1$.

If you had wanted $x$ to be $2$ when $t=0$, then you'd have been in trouble if you'd neglected the absolute value.

All of this works if $x\ne 1$. But you can check that $x=1$ for all values of $t$ is also a solution.

share|cite|improve this answer
Good. But the absolute value is indeed useless, since $x(0)=0$ and $x(t) < 1$ by the local uniqueness theorem. Anyway, your solution is standard and works for every initial condition. – Siminore Apr 23 '12 at 16:40

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.