Multivariable calculus
Double Integral of sin x cos y Over a pi/2 Square
The double integral of sin x times cos y over the square from 0 to pi/2 in both variables equals 1. The integrand is a function of x alone times a function of y alone over constant limits, so the double integral is the product of the two single integrals, and each of them equals 1.
Numerically 1.000000, confirmed by quadrature on every build.
The product splits into two single integrals
In the inner integral is frozen, so is a constant multiplier and comes straight out.
The outer integral is then an ordinary one-variable problem, and the whole computation collapses to a product.
The two conditions the shortcut needs
- The integrand must be , a genuine product with each variable in its own factor.
- Every limit must be a constant, so the inner integral evaluates to a number times .
Both conditions are easy to lose. is not a product of that shape, and over the same square it integrates to 2 rather than 1, so the difference is not cosmetic.
The mechanism behind both conditions is one line. The inner integral pulls out as a constant and leaves times the number , and a number pulls straight out of the outer integral as well. That is what leaves a bare product. Break either condition and one of those two steps stops working.
The mistake: splitting when the limits are not constant
Keep the integrand and change the region to the triangle where and . The inner integral now ends at a moving limit.
The split fails because the inner answer still depends on once the upper limit does. Whenever a limit contains a variable, drop the shortcut and integrate one layer at a time.
Frequently asked questions
Does the order of integration matter here?
No. Integrating in first gives , and then . Fubini's theorem guarantees the match for a continuous integrand on a rectangle.
What is the average value of the integrand on this square?
The integral divided by the area: . That sits between the corner values 0 and 1, as it must.