Weird MATLAB differential equation solution

143 Views Asked by At

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?

1

There are 1 best solutions below

0
On

1.What is the true solution?

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

2.Why dsolve outputs a different result?

No idea.