[Math] Solutions to differential equations involving signum function

calculusordinary differential equations

I'm confused about the solution to a differential equation involving the $\operatorname{sgn}$ function. The ODE is

$$\frac{dx}{dt} = -bx\operatorname{sgn}(x).$$

I thought about doing this in "two" (potentially equivalent) ways. First, I used that $\operatorname{sgn}x = x/\lvert x \rvert$ so that, when the ODE is seperated we have

$$\int \frac{dx}{\lvert x\rvert} = -bt + C$$

implying that $\lvert x \rvert = Ae^{-bt}$ is the solution. Is it acceptable to leave the solution with the absolute value around it?

Secondly, is it possible to play around with the signum function as if it were constant? That is, what if I first pulled the signum out of the integral

$$\int \frac{1}{x}dx = -\operatorname{sgn}(x)bt + C$$

(I've absorbed the signum into the constant on the RHS, is that allowed?)

And now the solution is more like $x = Ae^{-\operatorname{sgn}(x)bt}$. Is this less desirable since the RHS now contains an $x$?

Best Answer

You can re-write your equation as $\dot{x}=-b|x|$, which has no turning points, i.e., $\dot{x}$ will never change sign. Then, split up your solution into two parts, one for $x>0$ and one for $x<0$:

$$x(t)=\begin{cases}Ce^{-bt}&\mbox{if }\,x>0 \\ Ce^{bt}&\mbox{if }\,x<0\end{cases}$$

Since in either solution $x(t)$ will be positive, the second case is a false solution, and so you get $x(t)=Ce^{-bt}$.

Related Question