Find solution for $\frac{dx}{dt}=|x|$ My solution:

*

*$x>0$ $$\begin{align}\frac{\mathrm dx}{\mathrm dt}=x &\Rightarrow \frac{\mathrm dx}{x}=\mathrm dt \\ &\Rightarrow \int \frac{\mathrm dx}{x} = \int\mathrm dt \\ &\Rightarrow \ln(x)= t + C_{0} \\ &\Rightarrow e^{\ln(x)}=e^{t+C_0} \\ &\Rightarrow x=C_1e^t.\end{align}$$


*$x<0$ $$\begin{align} \frac{\mathrm dx}{\mathrm dt}=-x &\Rightarrow -\frac{\mathrm dx}{x}=\mathrm dt \\ &\Rightarrow -\int \frac{\mathrm dx}{x} = \int\mathrm dt \\ &\Rightarrow \ln(x)= -t - C_{2} \\ &\Rightarrow e^{\ln x} =e^{-t-C_2} \\ &\Rightarrow x=C_3e^{-t}. \end{align}$$


*$x=0$ $$\begin{align}\frac{\mathrm dx}{\mathrm dt}=0 &\Rightarrow \int \frac{\mathrm dx}{\mathrm dt} = \int 0 \\ &\Rightarrow \int\mathrm dx= \int 0\mathrm dt \\ &\Rightarrow x=C_4.\end{align}$$
I think that 1. and 2. are ok but I'm not sure 3. is correct.

I think your solution is right.
Note that in 1. $$\frac{\mathrm dx}{\mathrm dt}=C_1e^t<0\quad\forall\quad C_1>0$$ and in 2. $$\frac{\mathrm dx}{\mathrm dt}=-C_3e^{-t}<0\quad\forall\quad C_3<0$$
So, $x(t)=C_1e^t$ will be a solution as long $C_1>0$ as well as $x(t)=C_3e^{-t}$ as long $C_3<0$ and so will $x(t)=C_4$ as long $C_4=0$.
