Let $g(z) = \sqrt{z}$, so that $g^{-1}(z) = z^2$ and $Dg^{-1}(z) = 2z$. Using the change of variables formula, we have that $$\int_0^T e^{-z^2/2}\ dz = \int_0^{T^2} e^{-z/2} 2z\ dz.$$ We can compute $\int 2ze^{-z/2}$ by differentiating under the integral sign. Let $f(\alpha, z) = e^{-\alpha z/2}$. Then $$\frac{\partial}{\partial \alpha} f = -\frac{z}{2}e^{-\alpha z / 2}$$ and so $$\int 2z e^{-z/2}\ dz = 4 \int \left(\frac{\partial}{\partial \alpha} f\right)(1, z)\ dz = 4 \frac{\partial}{\partial \alpha} \int e^{-\alpha z / 2}\ dz,\ \text{when $\alpha = 1$}$$ and this is $$\frac{\partial}{\partial \alpha} -\frac{2}{\alpha}e^{-\alpha z / 2} = \frac{2}{\alpha^2}e^{-\alpha z/2} + \frac{z}{\alpha}e^{-\alpha z / 2}$$ so $$\int_0^{T^2} 2ze^{-z/2}\ dz = 4\left[(2+T^2)e^{-T^2/2} - 2\right].$$ But of course this has to be nonsense because this is the Gaussian integral and has no closed form solution. Indeed, since $\lim_{T \to \infty} (2+T^2)e^{-T^2/2} = 0$ the right-hand side would be negative which is absurd.
What mistake did I make here in this derivation?