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).
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: carries the factor out front, and is exactly the derivative of the exponent with respect to .
No substitution, no parts. What is left is a single-variable integral in .
Numerically that is about .
The mistake: giving up when the x integral looks singular
Integrating in first is not wrong, only slower. It needs integration by parts, and the result looks singular at even though the double integral is perfectly finite.
Two things go wrong from here if you rush. Some students drop the second term, which is the boundary correction from parts. Others see in a denominator, decide the outer integral diverges at the bottom edge , and stop.
It does not diverge. That combination is the derivative of , which extends continuously to the value at .
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 along the edge up to at the corner .
- Rectangle area: .
- Minimum of : . Maximum of : .
- So the integral must sit between and .
The average value is , well inside those bounds and much nearer the low end, which is right: 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 . Only the labour changes: first needs no parts, first needs parts and a limit at .
Where does the 3 in the numerator come from?
It collects two separate constants. The inner integral leaves , whose integrates to ; then evaluating at subtracts another . Together , which is the over the shared denominator .