According to chapter 3 of Gelman's Data Bayesian Analysis[DBA], when we have $y_i\sim N(\mu,\sigma^2)$, and $p(\mu,\sigma^2)\propto (\sigma^2)^{-1}$
Then, $p(\mu,\sigma^2|\mathbf{y})\propto \sigma^{-n-2} exp\left( -\frac{1}{2\sigma^2}(n-1)s^2+n(\bar y -\mu)^2\right)$.
We are interested in $p(\mu|y)=\int p(\mu,\sigma^2|\mathbf{y}) \ d\sigma^2$, and Gelman states the following in page 66 of the third edition of DBA:
My doubt is on the first line of the proportionals. How do we obtain that expression? I've tried a simple multivariate version of change of variables, with $H(A,z)=(\mu,\sigma^2)$.
However, since $\frac{\partial\mu}{\partial A} = \frac{1}{2}\left( nA-n(n-1)s^2\right)^{-1/2}$, absolute value of the Jacobian(det. of der.) seems to be $\frac{A}{4z^2} \left( nA-n(n-1)s^2\right)^{-1/2}$, which doesn't seem to produce the desired expression.
Any help would be appreciated.