Multivariable calculus

Double Integral of x e^(xy) Over a Rectangle

The double integral of x times e to the xy over the rectangle 0 <= x <= 1, 0 <= y <= 2 equals (e^2 - 3)/2, about 2.194528. Integrating with respect to y first is the easy order, because the antiderivative of x e^(xy) in y is simply e^(xy).

f(x,y)=xexyf(x,y) = x e^{xy}
RxexydA=e2322.194528\iint_R x e^{xy}\,dA = \frac{e^2 - 3}{2} \approx 2.194528

Numerically 2.194528, confirmed by quadrature on every build.

Integrate in y first, because that antiderivative is free

On a rectangle both orders are legal, so Fubini's theorem lets you choose. Read the integrand before you commit: xexyx e^{xy} carries the factor xx out front, and xx is exactly the derivative of the exponent xyxy with respect to yy.

02xexydy=[exy]y=0y=2=e2x1\int_0^2 x e^{xy}\,dy = \left[e^{xy}\right]_{y=0}^{y=2} = e^{2x} - 1

No substitution, no parts. What is left is a single-variable integral in xx.

01(e2x1)dx=[e2x2x]01=e22112=e232\int_0^1 \left(e^{2x} - 1\right)\,dx = \left[\frac{e^{2x}}{2} - x\right]_0^1 = \frac{e^2}{2} - 1 - \frac{1}{2} = \frac{e^2 - 3}{2}

Numerically that is about 2.1945282.194528.

The mistake: giving up when the x integral looks singular

Integrating in xx first is not wrong, only slower. It needs integration by parts, and the result looks singular at y=0y = 0 even though the double integral is perfectly finite.

01xexydx=eyyey1y2\int_0^1 x e^{xy}\,dx = \frac{e^y}{y} - \frac{e^y - 1}{y^2}

Two things go wrong from here if you rush. Some students drop the second term, which is the boundary correction from parts. Others see yy in a denominator, decide the outer integral diverges at the bottom edge y=0y = 0, and stop.

It does not diverge. That combination is the derivative of ey1y\frac{e^y - 1}{y}, which extends continuously to the value 11 at y=0y = 0.

02(eyyey1y2)dy=[ey1y]02=e2121=e232\int_0^2 \left(\frac{e^y}{y} - \frac{e^y - 1}{y^2}\right)\,dy = \left[\frac{e^y - 1}{y}\right]_0^2 = \frac{e^2 - 1}{2} - 1 = \frac{e^2 - 3}{2}

Same answer, three more steps and one limit. Scanning the integrand for a factor that matches the derivative of an exponent is what saves the work.

Check the size before you trust the number

The integrand is increasing in both variables on this rectangle, so it runs from 00 along the edge x=0x = 0 up to e27.389e^2 \approx 7.389 at the corner (1,2)(1,2).

  • Rectangle area: 1×2=21 \times 2 = 2.
  • Minimum of ff: 00. Maximum of ff: e27.389e^2 \approx 7.389.
  • So the integral must sit between 00 and 2e214.82e^2 \approx 14.8.

The average value is 2.19452821.097\frac{2.194528}{2} \approx 1.097, well inside those bounds and much nearer the low end, which is right: xexyx e^{xy} is small over most of the rectangle and only spikes near the far corner.

Frequently asked questions

Does the order of integration change the answer here?

No. The integrand is continuous on a closed rectangle, so Fubini's theorem guarantees both orders return e232\frac{e^2-3}{2}. Only the labour changes: dydy first needs no parts, dxdx first needs parts and a limit at y=0y = 0.

Where does the 3 in the numerator come from?

It collects two separate constants. The inner integral leaves e2x1e^{2x} - 1, whose 1-1 integrates to 1-1; then evaluating e2x2\frac{e^{2x}}{2} at x=0x = 0 subtracts another 12\frac12. Together 112=32-1 - \frac12 = -\frac32, which is the 3-3 over the shared denominator 22.