Why vector field commute but the flow does not commute in this example I was doing Lee's smooth manifold Problem 9-19.
Which is stated as follows:

9-19. Let $M$ be $\mathbb{R}^{3}$ with the $z$ -axis removed. Define $V, W \in \mathfrak{X}(M)$ by
$$
V=\frac{\partial}{\partial x}-\frac{y}{x^{2}+y^{2}} \frac{\partial}{\partial z}, \quad W=\frac{\partial}{\partial y}+\frac{x}{x^{2}+y^{2}} \frac{\partial}{\partial z}
$$
and let $\theta$ and $\psi$ be the flows of $V$ and $W$, respectively. Prove that $V$ and $W$ commute, but there exist $p \in M$ and $s, t \in \mathbb{R}$ such that $\theta_{t} \circ \psi_{s}(p)$ and $\psi_{s} \circ \theta_{t}(p)$ are both defined but are not equal.

I solve the ODE and gets the solution:
$$\theta_t\circ \psi_s = (p_1+t,p_2+s,\arctan(\frac{s+p_2}{p_1})+p_3-\arctan(\frac{p_2}{p_1}))\\\psi_s\circ\theta_t = (p_1+t,p_2+s,-\arctan(\frac{t+p_1}{p_2}) +p_3 + \arctan(\frac{p_1}{p_2}))$$
Which is obvious not equal,they both defined for all $(\Bbb{R}^3\setminus \{z\} )\times \Bbb{R}$,but it contradict to the theorem 9.44 that vector field commute if and only if flow commute?If I haven't made mistake in the computation.Is my computation correct,it's so hard to compute.Why does it not consistent with the theorem?
 A: $\def\sgn{\operatorname{sgn}}
\def\sD{\mathcal{D}}$I would be grateful if someone could correct me in case there is any typo in the following expressions.
After solving the ODE, the flows for $V$ and for $W$ can be seen to be, respectively,
$$
\begin{aligned}
\theta_t(x,y,z)&=
\begin{cases}
(x+t,0,z),&y=0,t>-x,\\
(x+t,y,z-\arctan\frac{x+t}{y}+\arctan\frac{x}{y}),&y\neq 0.
\end{cases}\\
\psi_s(x,y,z)&=
\begin{cases}
(0,y+s,z),&x=0,s>-y,\\
(x,y+s,z-\arctan\frac{y+s}{x}-\arctan\frac{y}{x}),&x\neq 0.
\end{cases}
\end{aligned}
$$
Denote $\sD_\theta$ and $\sD_\psi$ to the flow domains of $\theta$ and $\psi$, respectively.
Composing in the two possible orders, on the one hand we have that for all pair of times $(t,s)$ and points $p=(x,y,z)$ such that $(s,p)\in\sD_\psi$ and $(t,\psi_s(p))\in\sD_\theta$,
$$
\theta_t(\psi_s(x,y,z))
=
\begin{cases}
(t,y+s,z-\arctan\frac{t}{y+s}) & x=0,s>-y,\\
(x+t,0,z-\arctan\frac{y}{x}) & x\neq 0, y=-s, t>-x\\
(x+t,y+s,\\z+\arctan\frac{y+s}{x}+\arctan\frac{x}{y+s}-\arctan\frac{x+t}{y+s}-\arctan\frac{y}{x})
& x\neq 0, y\neq -s.
\end{cases}
$$
On the other hand, for all times $(t,s)$ and $p=(x,y,z)$ with $(t,p)\in\sD_\theta$ and $(s,\theta_t(p))\in\sD_\psi$,
$$
\psi_s(\theta_t(x,y,z))
=
\begin{cases}
(x+t,s,z+\arctan\frac{s}{x+t}) & y=0,t>-x,\\
(0,y+s,z+\arctan\frac{x}{y}) & y\neq 0, x=-t, s>-y\\
(x+t,y+s,\\z-\arctan\frac{x+t}{y}-\arctan\frac{y}{x+t}+\arctan\frac{y+s}{x+t}+\arctan\frac{x}{y})
& y\neq 0, x\neq -t.
\end{cases}
$$
Recall that for $u\in\mathbb{R}\setminus\{0\}$, we have
$$
\label{1}\tag{1}
\frac{\pi}{2}\sgn u=\arctan u+\arctan\frac{1}{u}.
$$
(This identity follows after differentiating by $u$.)
The only possible choice of $(x,y,z,t,s)$ such that both $\theta_t(\psi_s(x,y,z))$ and $\psi_s(\theta_t(x,y,z))$ are defined and such that at the same time $\theta_t(\psi_s(x,y,z))\neq\psi_s(\theta_t(x,y,z))$, is for $-t\neq x\neq 0\neq y\neq -s$. Indeed, if $(x,y,z,t,s)$ are as such, then both orders of flow compositions are defined and, using \eqref{1}, we have $\theta_t(\psi_s(x,y,z))=\psi_s(\theta_t(x,y,z))$ if and only if
$$
\sgn x\sgn(y+s)+\sgn y\sgn(x+t)=\sgn x\sgn y+\sgn(x+t)\sgn(y+s).
$$
But this identity can be seen to not hold for $(x,y,t,s)=(1,-1,-2,2)$.
What is happening? Consider the characterization from Lee's book of commutativity of vector fields vs commutativity of the flows (it's given here). Then, for $(x,y)=(1,-1)$ even though both $\theta_t(\psi_s(x,y,z))$ and $\psi_s(\theta_t(x,y,z))$ are defined for $(t,s)=(-2,2)$, it happens that there are no open intervals $J,K$ containing $0$ with $-2\in J$, $2\in K$ such that $\theta_t(\psi_s(x,y,z))$ is defined for all $(t,s)\in J\times K$ or $\psi_s(\theta_t(x,y,z))$ is defined for all $(t,s)\in J\times K$. (You can check this yourself by inspecting the formulas for the composites of the flows, trying to move continuously $(t,s)$ from $(-2,2)$ to $(0,0)$.)
A: The point is that if we solve the ODE taking the first one for example it has 2 different representation,for starting point $p\in \Bbb{R}^3$ such that $p_2 \ne 0$.then the solution is :
$$\theta_t(p) = (p_1+t,p_2,p_3-\arctan((t+p_1)/p_2)+\arctan(p_1/p_2))$$
Such that $\mathcal{D}^{p} = \Bbb{R}$
The problem occurs when $p_2= 0$.In this case the solution of ODE is:
$$\theta_t(p) = (p_1+t,p_2,p_3)$$ as we can see when $t = -p_1$ it will hit the z-axis.
Let's consider another integral curve ,which has similar formula,the point is if $\theta_t(\psi_s)(p)$ If we choose $s$ properly,it will let $\psi_s(p) $ stop at some point that second coordinate  is zero.Which means $\theta_t(q)$ at this point will go straight line to hit the z-axis.
Conversely $\theta_t(p)$ will not hit the z-axis,$\mathcal{D}^p = \Bbb{R}$!So it should not commute,as the definition the defining domian should be consistent for two different composition.The rest of the computation is not necessary,but we should hope if choosen $s,t$  nicely, we should have $\psi_s\circ\theta_t = \theta_t\circ \psi_s$
If $\psi_s(p)$ does not stop at the point that second coordinate is zero.The composition will have the form :
$$\theta_t\circ\psi_s(p) = (p_1+t,p_2,p_3-\arctan((t+p_1)/p_2))+\arctan(p_1/p_2)+\arctan((s+p_2)/(t+p_1)) - \arctan(p_2/(p_1+t))) $$
For the other direction we should use a bit $$f(x,y)= \arctan(x)+\arctan(y)-\arctan(\frac{x+y}{1-xy}) = 0$$ the arctan formula  so they are really equal to each other at this point.
