# Weird MATLAB differential equation solution

I want to solve this differential equation $$\dot x =-\lvert x\rvert , x(0)=-1$$ MATLAB dsolve says the solution is $x=-e^{-t}$ but my intuition says that since initially $\dot x=-1$ the solution is a different one.

1.What is the true solution?

2.Why dsolve outputs a different result?

The true solution is $x(t)=-\mathrm e^t$, defined on the interval $(-\infty,+\infty)$. To show this, consider $z=-x$, then $z(0)=1$ hence $z(t)\gt0$ for every $t$ and $z'(t)=-x'(t)=|x(t)|=z(t)$.