平方积分时更换积分变量的合理性探究——以高斯积分为例
Great question! Let's unpack this using the Gaussian integral example you shared, since it's the perfect illustration of why this trick works.
First, let's start with a core rule of integrals: the variable we use for integration is a "dummy variable". That means it's just a placeholder—changing its name doesn't alter the value of the integral at all. For your example:
$$\int_{-\infty}^\infty e{-x2} dx = \int_{-\infty}^\infty e{-y2} dy = I$$
No matter what letter we pick, the integral evaluates to the same number $I$. That's the foundation here.
Now, when we square $I$, we're multiplying the integral by itself: $I^2 = I \times I$. If we kept both integrals using $x$, we'd have:
$$I^2 = \left(\int_{-\infty}^\infty e{-x2} dx\right) \times \left(\int_{-\infty}^\infty e{-x2} dx\right)$$
But here's the issue: when we want to combine these two single integrals into a double integral, we need to treat the two integration operations as independent. Using the same variable name $x$ for both creates ambiguity—are we integrating over the same variable twice? That would lead to mistakes like incorrectly combining the exponents (writing $e{-x2}e{-x2} = e{-2x2}$), which isn't what we intend.
By renaming one variable to $y$, we make it explicit that these are two separate, independent variables. Now we can correctly rewrite the product as a double integral over the entire $xy$-plane:
$$\begin{align} I^2 &= \bigg(\int_{-\infty}^\infty e{-x2} dx\bigg) \times \bigg( \int_{-\infty}^{\infty} e{-y2}dy \bigg) \ &= \int_{-\infty}\infty\bigg(\int_{-\infty}{\infty} e{-x2}e{-y2}dy\bigg)dx \end{align}$$
This is valid for two key reasons:
- The inner integral $\int_{-\infty}^\infty e{-y2} dy$ is still equal to $I$, so multiplying by the outer integral over $x$ gives us $I \times I = I^2$.
- Using distinct variables lets us rewrite the integrand as $e{-(x2 + y^2)}$, which is the critical step that allows us to switch to polar coordinates (since $x^2 + y^2 = r^2$) and solve the integral easily.
To sum it up, swapping the variable name is a simple but essential trick to:
- Avoid confusion between independent integration variables.
- Correctly express the product of two integrals as a double integral over a 2D domain.
- Unlock coordinate transformations that simplify otherwise hard-to-solve integrals like the Gaussian integral.
内容的提问来源于stack exchange,提问作者JDoeDoe

