Hamiltonian vector field in the definition of model Dehn twists I am trying to understand Dehn twists along Lagrangian spheres, specifically in the context of section 2.1 in this paper.
In order to define the model Dehn twist in $T^*S^n$, which we identify with
$$
\{(p,q) \in \mathbb{R}^{n+1}\times \mathbb{R}^{n+1} \mid |q| = 1, \langle p, q \rangle = 0\},
$$
one first considers the Hamiltonian
$$
\mu: T^*S^n \setminus S_0 \to \mathbb{R}, \qquad (p,q) \mapsto |p|.
$$
$S_0$ denotes the zero section. It is then stated that the corresponding Hamiltonian vector field is
$$
X_\mu = |p|^{-1} \sum_{j=1}^{n+1}p_j \partial_{q_j} - |p| \sum_{j=1}^{n+1} q_j \partial_{p_j}.
$$
One then defines the model Dehn twist using the flow of this vector field. My question now concerns how to obtain this Hamiltonian vector field - It is required to satisfy
$$
\imath_{X_\mu}\omega_{can} = -d\mu,
$$
where we can write $\omega_{can} = dp \wedge dq$. Then we have
$$
\imath_{X_\mu}\omega_{can} = dp(X_\mu)dq - dq(X_\mu)dp \stackrel{!}{=} -\partial_p(\mu)dp - \partial_q(\mu)dq = -d\mu.
$$
Computing the partial derivatives, we have $\partial_{p_j}(\mu) = \frac{p_j}{|p|}$ and $\partial_{q_j}(\mu) = 0$, hence the Hamiltonian vector field should only be
$$
X_\mu = |p|^{-1}\sum_{j=1}^{n+1} p_j \partial_{q_j}!
$$
Am I making some basic mistake? How does the second term arise?
Thank you in advance.
 A: The trouble comes from your computation being performed in $\mathbb{R}^{n+1} \times \mathbb{R}^{n+1}$ rather than in $T^*S^n$. So let's try to spell things out a little more.
Identifying $T^*S^n$ with the set $\{(p,q) \in \mathbb{R}^{n+1} \times \mathbb{R}^{n+1} \, : \, |q|=1 , \, \langle p, q \rangle = 0\}$, let $j : T^*S^n \to \mathbb{R}^{n+1} \times \mathbb{R}^{n+1}$ denote the inclusion. Considering on $\mathbb{R}^{n+1} \times \mathbb{R}^{n+1}$ the standard symplectic form $\omega_0 = \sum_{i=1}^{n+1} dp_i \wedge dq_i$, i.e.
$$ \omega_0((\dot{p}_1, \dot{q}_1), (\dot{p}_2, \dot{q}_2)) = \langle \dot{p}_1, \dot{q}_2 \rangle - \langle \dot{p}_2, \dot{q}_1 \rangle , $$
one can indeed prove that $j^* \omega_0$ is the tautological symplectic form $\omega_{can}$. Setting $\mu : \mathbb{R}^{n+1} \times \mathbb{R}^{n+1} \to \mathbb{R}$ to be $\mu(p,q) = |p|$, what you computed is the vector field $X_{\mu}$ on $\mathbb{R}^{n+1} \times \mathbb{R}^{n+1}$ defined by $\iota_{X_{\mu}}\omega_0 = - d\mu$. However, your true goal is to compute the vector field $X_{j^* \mu}$ on $T^*S^n$ given by $\iota_{X_{j^*\mu}}\omega_{can} = -d(j^*\mu)$.
This last equation is equivalent to $\omega_0( j_* X_{j^*\mu}, j_* Y) = - d\mu(j_* Y)$ for every vector $Y \in T(T^*S^n)$. Since $\omega_0( X_{\mu}, j_* Y) = - d\mu(j_* Y)$ for every $Y \in T(T^*S^n)$, it follows that $j_* X_{j^* \mu} - X_{\mu}$ lies in the $\omega_0$-orthogonal complement $E$ to $T(T^*S^n)$ within $T(\mathbb{R}^{n+1} \times \mathbb{R}^{n+1})$. Note that $E$ is given at $(p,q) \in T^*S^n$ by the span of the two vectors $\sum_{i=1}^{n+1} q_i \partial_{q_i}$ and $\sum_{i=1}^{n+1} q_i \partial_{p_i}$. Consequently,
$$ j_* X_{j^*\mu} = X_{\mu} + a(p,q) \sum_{i=1}^{n+1} q_i \partial_{q_i} + b(p,q) \sum_{i=1}^{n+1} q_i \partial_{p_i} . $$
Since this vector field is tangent to $T^*S^n$, it annihilates the functions $f(p,q) = |q|$ and $g(p,q) = \langle p,q \rangle$. From the annihilation of $f$ and the fact that $g = 0$ on $T^*S^n$, we get $a(p,q) = 0$. Then, from the annihilation of $g$ and the fact that $f = 1$ on $T^*S^n$, we get $b(p,q) = - |p|$.
