Sticking solutions of a bounded square-root differential equation (source code)

= Sticking solutions of a bounded square-root differential equation
{title2=$v'=\sqrt{1-v^2},\quad |v|\leq1$}

For the <autonomous differential equation> $v'=\sqrt{1-v^2}$, the real solutions are nondecreasing and lie in $[-1,1]$. On each nonconstant interval, <separation of variables> gives $\arcsin v=t-C$, so the solution crosses from $-1$ to $1$ in exactly time $\pi$. Every nonconstant solution on the entire real time axis is consequently
$$
v(t)=\begin{cases}-1,&t\leq a,\\-\cos(t-a),&a<t<a+\pi,\\1,&t\geq a+\pi,\end{cases}
$$
for some real $a$. The two constant solutions $v\equiv\pm1$ complete the list; solutions on shorter intervals are restrictions of these. At the joins both the <derivative> and the right-hand side are zero, so these are <continuously differentiable functions>. The right-hand side is continuous but fails <Lipschitz continuity> at both endpoints, allowing arbitrary waiting time at $-1$ before departure. Once $v$ reaches $1$, monotonicity forces it to stay there. The sine representation without the nonnegative-cosine restriction would incorrectly introduce decreasing pieces.