Multivariable calculus
Double Integral of sin x cos y Over a Square
The double integral of sin(x) times cos(y) over the square where x runs from 0 to pi/2 and y runs from 0 to pi/2 equals 1. The integrand is a product of a function of x alone and a function of y alone, so over a rectangle it splits into two single integrals, each equal to 1.
Numerically 1.000000, confirmed by quadrature on every build.
Integrate in y first, then in x
Fubini's theorem says you may do the two integrations one after the other, in either order. Hold fixed and run the inner integral in .
The factor came out front because it is a constant as far as is concerned. That leaves a one-variable integral in .
The separable shortcut and its two conditions
When the integrand factors as and the region is a rectangle with constant bounds, the double integral is just the product of two single integrals.
Both factors here integrate to over , so the answer is . Use the shortcut only when both conditions hold.
- The integrand must be a genuine product. A sum like does not split this way, and neither does a composition like .
- Every bound must be a constant. The instant one bound involves the other variable, the two integrals are no longer independent.
The mistake: reusing the product split on a non-rectangle
Once the shortcut works here, students reach for it whenever they see again, even when the region has changed. Take the triangle instead of the square.
The product split would have predicted again, overstating the true value by more than a quarter, because the inner integral now stops at and therefore depends on . The moment a bound carries the other variable, you must finish the inner integral and carry its answer into the outer one.
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 give . Integrating in first leaves , which integrates to over .
Why is the answer positive when sine and cosine both change sign?
Neither one changes sign on this region. Both and are non-negative on , so the surface stays above the plane and the integral is a true volume.