According to Picard–Lindelöf theorem, IVP $$\begin{cases}y^\prime(t) = f(t,y(t))\\y(x_0)=y_0 \end{cases}$$ has a unique solution if $f$ is lipschitz continuous. What if my ODE contain piecewise defined function $g:\mathbb{R}^2\rightarrow\mathbb{R}$ \begin{equation} g(x,y) = \begin{cases} x^2\tanh(y)\text{ for } x>0\\ 0 \text{ for } x\leq 0 \end{cases} \end{equation} Is $g(x,y)$ lipschitz continuous in $\mathbb{R}^2$ (what is the $K$ then?) and if not, does it automatically mean, that ODE with such function has no solution?
Edit. I am curious about the situation like $$ \mathbf{x}^\prime(t) = \mathbf A^{n\times n}\mathbf{x}(t) + \begin{bmatrix} x_1(t)\\ x_2(t)\\ \vdots\\ g(x_1,x_2)\\ x_n(t)\\ \end{bmatrix} $$
No, $g$ is not Lipschitz, as $x^2$ is not Lipschitz. But $g$ is Lipschitz on $(-\infty, r)\times\mathbb R$ for all $r$.
Thus the ODE has a solution on each such set, so it also has a solution on $\mathbb R$. Picard Lindelöf only needs local lipschitz, and that only in the second variable.