# Ignoring absolute values for integration

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?

-
$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 Tortorella 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? –  Thomas E. 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

$$\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.
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