I'm just learning (multivariable) calculus and tried solve the following double integral:
$$\int_0^2 \int_0^1 x y e^{x y^2} d y d x$$
I approached it initially using traditional u-substitution similar to one-dimensional integrals. Surprisingly, it yielded the correct result, but as I delved deeper into my textbook, I discovered a more rigorous method involving the Jacobian in multivariable integrals. So my question is: When does traditional u-substitution work in multiple-dimensional integrals, and when do I need to use the more rigorous approach with the Jacobian?
Below I have explained my initial approach to solving the integral and the more rigorous approach using the Jacobian.
My initial attempt:
$$ \int_0^2 \int_0^1 x y e^{x y^2} d y d x $$
I would then make u-substitution like this, where I treat x as a constant: $u=xy^2$, $\frac{du}{dy}=2xy \implies du=2xy\;dy$ (I now realise this is wrong, since this is not the total derivative, but the partial derivative $\partial u/\partial y$).
$$ =\int_0^2 \int_0^1 \frac{1}{2} e^{ \overbrace{x y^2}^{u}} \underbrace{2x y \;d y}_{du} \; d x = \int_0^2 \int_0^x \frac{1}{2}e^u \;du \;dx = =\frac{1}{2} \int_0^2\left[e^u\right]_0^x d x=\frac{1}{2} \int_0^2\left(e^x-e^0\right) d x=\frac{1}{2}\left[e^x-x\right]_0^2 $$ $$=\frac{e^2-3}{2}$$
Now this gives the correct result, even though the way I'm doing substitution seems to be inconsistent with how my book treats substitution of multivariable integrals. Why does this work? Was it a coincidence that it worked, or can I always make u-substitution like this in multivariable integrals?
How my book treats substitution in multivariable integrals:
Substitution in my book is presented as: $$ \iint_R f(x, y) d x d y=\iint_G f(g(u, v), h(u, v))\left|\frac{\partial(x, y)}{\partial(u, v)}\right| d u d v . $$ With the Jacobian determinant or Jacobian of the coordinate transformation $x=g(u, v), y=h(u, v)$ defined as $$ J(u, v)=\left|\begin{array}{ll} \frac{\partial x}{\partial u} & \frac{\partial x}{\partial v} \\ \frac{\partial y}{\partial u} & \frac{\partial y}{\partial v} \end{array}\right|=\frac{\partial x}{\partial u} \frac{\partial y}{\partial v}-\frac{\partial y}{\partial u} \frac{\partial x}{\partial v} . $$
The Jacobian can also be denoted by $$ J(u, v)=\frac{\partial(x, y)}{\partial(u, v)} $$
How I should solve it rigorously
So I imagine that in my case if I want to make proper substitution with, I should write the above equation as:
$$ \iint_R f(g(x, y), h(x, y))\left|\frac{\partial(u, v)}{\partial(x, y)}\right| d x d y=\iint_G f(u, v) d u d v $$
If I choose $u=xy^2$ and $v=xy$, then I get: $$ \left|\frac{\partial(u, v)}{\partial(x, y)}\right|=\left|\left|\begin{array}{ll} \frac{\partial u}{\partial x} & \frac{\partial u}{\partial y} \\ \frac{\partial v}{\partial x} & \frac{\partial v}{\partial y} \end{array}\right|\right|=\left|\left|\begin{array}{ll} y^2 & 2 x y \\ y^{x^2} & x \end{array}\right|\right|=|y^2 x-2 x y^2|=x y^2 $$ Since $x\geq 0$ on the interval we are considering in the integral.
So I could rewrite the integral: $$ \int_0^2 \int_0^1 x y e^{x y^2} d y d x =\int_0^2 \int_0^1\frac{\overbrace{xy^2}^{\left|\frac{\partial(u, v)}{\partial(x, y)}\right|}}{\underbrace{xy^2}_{u}} \underbrace{x y}_{v} e^{\overbrace{x y^2}^{u}} d y d x =\begin{cases} \int_0^2 \int_{v^2/2}^{2v} \frac{v}{u} e^u d u d v \\ \int_0^2 \int_{u}^{\sqrt{2u}} \frac{v}{u} e^u d v d u \\ \end{cases} $$
Where the integration boundaries come from sketching the domain transformation from the cartesian coordinate system y(x) (enclosed rectangle) to the new domain $u(v)$ or $v(u)$ (new enclosed shapes) by using the above definitions for $u$,$v$. $u(v)=v^2/x = vy$ or $v(u)=u/y=\sqrt{ux}$
The second integral is solvable analytically and leads to the same result as the initial approach:
$$=\int_0^2 \int_{u}^{\sqrt{2u}} \frac{v}{u} e^u d v d u=\int_0^2\left[\frac{1}{2} v^2\right]_u^{\sqrt{2u}} \frac{e^u}{u} d u = \int_0^2\left(u-\frac{u^2}{2}\right) \frac{e^u}{u} d u =\int_0^2\left(e^u-\frac{1}{2} u e^u\right) d u $$
$$\underbrace{=}_{\text{partial integration}}e^2-e^0-\frac{1}{2}\left(\left[u e^u\right]_0^2-\int_0^2 e^u d u\right)=\frac{e^2-3}{2}$$
But as you can tell, it is much more work using the rigorous method and I obtain the same result anyhow. How can I in general tell if it works correctly to use the initial dummy approach, and when do I need to use the rigorous approach with the Jacobian? What also seems to be an issue, is that substitution in multivariable integrals is not in our curriculum. So it's only something I figured myself by reading outside our curriculum.
No, don't make more work for yourself than you need to.
You only need to substitute $u=xy^2$ and $v=x$.
This provides a nice bijective map of the domain: $$\{(x, y):0\leq x\leq 2, 0\leq y\leq 1\}\to\{(v, u): 0\leq v\leq 2, 0\leq u\leq v\}$$
For this, the absolute Jacobian determinant is the useful, $$\begin{Vmatrix}\dfrac{\partial[u, v]}{\partial[y,x]}\end{Vmatrix}=\begin{Vmatrix}2xy & y^2\\ 0 & 1\end{Vmatrix}$$
Which is exactly your initial attempt.
$$\begin{align}\int_0^2\int_0^1 xy\,\mathrm e^{xy^2}\,\mathrm d y\,\mathrm d x &=\dfrac 12\int_0^2\int_0^1 \begin{Vmatrix}\dfrac{\partial[u, v]}{\partial[y,x]}\end{Vmatrix} \mathrm e^{xy^2}\,\mathrm d y\,\mathrm d x\\ &= \dfrac 12\int_0^2\int_0^v \mathrm e^u\,\mathrm d u\,\mathrm d v\\ &=\dfrac12 \int_0^2(\mathrm e^v-1)\,\mathrm d v \\ &= \dfrac 12(\mathrm e^2-3) \end{align}$$
You are using the Jacobian change of variables in both cases. The distinction is in your choice of the variables to change. In this case we were able to chose $v=x$, which gave us : $\tfrac{\partial v}{\partial y}=0$.
It's just that sometimes we aren't able to make such a nice easy change.