How to formally show these functions are solutions to these ODEs of finite duration?
Brief Intro
I am trying to understand ODEs of finite duration, so I tried by tackling the easiest examples I found, and so far, I think the following solutions kind of share a similar composition.
The first one I found is in this question, that could be used to "represent the water height in a pierced cylindrical bucket" (this thanks to @ThomasRichard), check the question for details:$$y'=-\text{sgn}(y)\sqrt{|y|} \tag{Eq. 1}\label{Eq. 1}$$which I think has a finite duration solution:$$y(t) = \frac{\text{sgn}(y(0))}{4}\left(2\sqrt{|y(0)|}-t\right)^2\cdot\theta\!\left(2\sqrt{|y(0)|}-t\right) \tag{Eq. 2}\label{Eq. 2}$$Where $\theta(t)$ is the Heaviside step function, and $\text{sgn}(x)$ is the Sign function.
In the mentioned question's answer user @Gerd shown that from the initial conditions until the finite extinction time $T = 2\sqrt{|y(0)|} < \infty$ the solutions holds uniqueness, since after it is stitched to the trivial zero solution: it is a singular ODE since is Non-Lipschitz, without this singular point in time it wouldn't be able to stop moving, as example, nor non-piecewise power series could match a constant value for a non-zero measure interval or it would violate the Identity theorem, so traditional power series method shouldn't work as an accurate description.
Main question
Looking for other examples I found the following, which has been mistakenly solved by me and closed in PhysicsSE such as in MSE: A brick sliding in an horizontal plane after an initial push (under Coulomb's dry friction) - closed form solutions validation? and also here with many downvotes. Later I found I was mistakenly assuming it must stop moving at equilibrium position, so I was missing an integration constant (mentioned by @RollenS.D'Souza in his answer).
Now I think I found the solutions to these ODEs:$$ z'=-\text{sgn}(z) \tag{Eq. 3}\label{Eq. 3}$$has as finite duration solution:$$z(t) = \text{sgn}(z(0))\cdot\left(|z(0)|-t\right)\cdot\theta\!\left(|z(0)|-t\right) \tag{Eq. 4}\label{Eq. 4}$$and by integration and some constants manipulation:$$ g''=-\text{sgn}(g') \tag{Eq. 5}\label{Eq. 5}$$has as finite duration solution:$$g(t) =g(0)+ \frac{\text{sgn}(g'(0))}{2}\cdot\left[|g'(0)|^2-\left(|g'(0)|-t\right)^2\cdot\theta\!\left(|g'(0)|-t\right)\right] \tag{Eq. 6}\label{Eq. 6}$$which I think are solutions by inspection, but I couldn't formally prove it since there are some issues with their non-linearity, as example, I built them to use the fact that $$(f\theta)'=f'\theta+\underbrace{f\delta}_{\equiv\,0\text{ since }x\delta(x)=0}$$ so I built them kind of brute force such its argument make it happen, and also noting from \eqref{Eq. 2} how the first sign function has somehow to complete the initial condition when evaluating at $t=0$.
Motivation
If solution \eqref{Eq. 6} is rightly done, then by considering positive constants $\{k,\,g\}$ then the mentioned system of a brick sliding in an horizontal plane after an initial push under Coulomb's dry friction which has a differential equation with $kg>0$:$$ x''=-kg\,\text{sgn}(x') \tag{Eq. 7}\label{Eq. 7}$$will have as finite duration solution:$$x(t) =x(0)+ \frac{kg\cdot\text{sgn}(x'(0))}{2}\cdot\left[\left(\frac{|x'(0)|}{kg}\right)^2-\left(\frac{|x'(0)|}{kg}-t\right)^2\cdot\theta\!\left(\frac{|x'(0)|}{kg}-t\right)\right] \tag{Eq. 8}\label{Eq. 8}$$which would solve my previous questions with only partial answers so far.
Bonus track
It stop moving at time $$T = \frac{|x'(0)|}{kg} \tag{Eq. 9}\label{Eq. 9}$$Does this matches with the result of the traditional way of solving this problem?
PS: notice that if $x'(0)<0$ and if $x(T):=0$ then $x(0)=\frac{|x'(0)|^2}{2kg}$, so the solutions kind of match the physics of free fall$\Rightarrow T=\sqrt{\frac{2x(0)}{kg}}$ (mentioned by @ThomasLehéricy in my previous questions), but is kind of going backwards.