Multivariable calculus
Double Integral of x exp(xy) Over the Unit Square
The double integral of x times e to the power xy over the unit square, with x and y each from 0 to 1, equals e - 2, about 0.7183. Integrating in y first is the key: the inner integral collapses to e to the x, minus 1, with no integration by parts needed.
Numerically 0.718282, confirmed by quadrature on every build.
Choose the order that makes the inner integral trivial
Hold fixed and integrate in . Then is a constant, and the leading is exactly the constant that needs when you undo the chain rule.
The out front vanished into the antiderivative rather than surviving as a factor, which is what makes this order so cheap. Now finish in .
What the other order costs you
Both orders are legal, since the integrand is continuous on the square. They are not equally pleasant. Integrating in first means holding fixed and facing , which needs integration by parts.
It looks singular at , but the singularity is removable: the limit there is , which is just . To finish, you have to recognise the expression as a quotient-rule derivative.
So the other order does close, and on the same . It costs integration by parts, a removable singularity to argue about, and a derivative you have to read backwards. The first order cost one line.
The habit worth building: before integrating anything, glance at both inner integrals and pick the one that needs no technique at all.
The mistake: treating the leading x as an inert constant
A frequent error is to pull out of the inner integral and then also treat as if the inside it were not there, writing .
That drops the from the exponent, which changes the function entirely. Test it inside the square at , : the real integrand is , the corrupted one is .
Pulling a factor out is legal, forgetting a variable inside a composition is not. When you factor out of , the that remains still depends on , so it cannot be integrated as .
Frequently asked questions
Why does the inner integral come out to e^x - 1 with no extra constant?
Because , the integrand is already the exact derivative of . Evaluating at and gives .
Is e - 2 really positive?
Yes. , so . The integrand is non-negative on the square, so a negative answer would have signalled an arithmetic slip.