[Math] Splitting Integral into Two Parts

calculusdefinite integralsintegrationmultivariable-calculus

This question might seem very simple, but I can't seem to figure it out. Suppose I have an integral over a square region. I was wondering in which case it would be incorrect to split the integral into two separate subregions.

For example, two triangles:
\begin{equation}
\int_x^{x+\epsilon}\int_x^{x+\epsilon}f(|x_2-x_1|)\;\mathrm{d}x_1\mathrm{d}x_2=2\int_x^{x+\epsilon}\int_x^{x_2}f(|x_2-x_1|)\;\mathrm{d}x_1\mathrm{d}x_2
\end{equation}

My function in this case is an exponential, but I haven't been getting the same answer after computing the two integrals. I was wondering if maybe the diagonal is giving a non-zero contribution.

Best Answer

You have an integral of a function over a square area: $$\displaystyle\int_a^b\int_a^b z(x,y) \operatorname{d}y\operatorname{d}x$$

You wish to equate this to twice the integral over the triangle of half the area: $$\displaystyle 2 \int_a^b \int_a^x z(x,y)\operatorname{d}y\operatorname{d}x$$

While, in general, these two are not equivalent, equality is assured if we have symmetry. That is: $z(x,y)=z(y,x)$

If your function is of the form of $f(|x-y|)$ it should be symmetrical.


The diagonal will have zero measure unless a step discontinuity is involved. If the function is continuous over the diagonal then:

$$\int_a^b\int_x^x f(|x+y|)\operatorname{d}y\operatorname{d}x = 0$$


For example

$$\begin{align} \int_{x}^{x+\epsilon}\int_x^{x+\epsilon} {\bf e}^{|x_1-x_2|}\operatorname{d}x_1\operatorname{d}x_2 & = \int_{x}^{x+\epsilon} \left(\int_x^{x_2} {\bf e}^{x_2-x_1}\operatorname{d}x_1 + \int_{x_2}^{x+\epsilon} {\bf e}^{x_1-x_2}\operatorname{d}x_1\right) \operatorname{d}x_2 \\ & = \int_x^{x+\epsilon} {\bf e}^{x_2}(-{\bf e}^{-x_2}+{\bf e}^{-x}) + {\bf e}^{-x_2}({\bf e}^{x}{\bf e}^{\epsilon}-{\bf e}^{x_2})\operatorname{d}x_2 \\ & = \int_x^{x+\epsilon} -2 + {\bf e}^{-x}{\bf e}^{x_2} + {\bf e}^{x}{\bf e}^{\epsilon}{\bf e}^{-x_2}\operatorname{d}x_2 \\ & = -2 (x+\epsilon-x) + {\bf e}^{-x}({\bf e}^{x}{\bf e}^{\epsilon}-{\bf e}^x) - {\bf e}^{x}{\bf e}^{\epsilon}({\bf e}^{-x}{\bf e}^{-\epsilon}-{\bf e}^{-x}) \\ & = 2({\bf e}^\epsilon - 1 - \epsilon) \\[3ex] 2 \int_x^{x+\epsilon} \int_x^{x_2} {\bf e}^{|x_1-x_2|}\operatorname{d}x_1 \operatorname{d}x_2 & = 2 \int_x^{x+\epsilon} {\bf e}^{x_2} \int_x^{x_2} {\bf e}^{-x_1}\operatorname{d}x_1 \operatorname{d}x_2 \\ & = 2 \int_x^{x+\epsilon} {\bf e}^{x_2} (-{\bf e}^{-x_2}+{\bf e}^{-x})\operatorname{d} x_2 \\ & = 2 \int_x^{x+\epsilon} -1 + {\bf e}^{x_2}{\bf e}^{-x}\operatorname{d} x_2 \\ & = 2 (-(x+\epsilon)+x + {\bf e}^{-x}({\bf e}^{x+\epsilon}-{\bf e}^{x})) \\ & = 2 ({\bf e}^{\epsilon}-1-\epsilon) \end{align}$$

Related Question