Multivariable calculus
Double Integral of y sin(xy) Over a Rectangle
The double integral of y times sin(xy), with x from 0 to pi/2 and y from 0 to 1, equals 1 - 2/pi, about 0.3634. Integrating in x first is the easy order: the inner integral is a plain substitution and gives 1 - cos(pi y / 2).
Numerically 0.363380, confirmed by quadrature on every build.
Integrate in x first, where the y out front is the chain-rule factor
Hold fixed. Then is exactly the derivative of , so the inner integral needs no technique beyond recognising it.
Now integrate that in over . The cosine picks up a factor of when you undo its inner derivative.
Numerically .
Why the other order needs integration by parts
Fix instead and integrate in . Now the factor is a genuine second function, not a chain-rule leftover, so parts is unavoidable.
That is a detour, not a dead end. The expression is the derivative of , so the outer integral does close in elementary terms once you spot that.
Same number, three extra moves: parts, a removable singularity at where , and a quotient-rule derivative read backwards. The skill being tested is choosing the order before you start, not surviving the wrong one.
- Look at which variable appears as a bare multiplying factor. Here it is .
- That factor is usually the chain-rule derivative of the inner function, so integrate with respect to the other variable, .
- The rule of thumb: integrate first in the variable that is not the loose factor out front.
The mistake: pulling y out and forgetting it is inside the sine
Because is constant during the integration, it is tempting to write and then integrate as though it were .
The missing is exactly what cancels the out front. Dropping it leaves an answer that still has a stray in it, and the outer integral then produces a different number.
Check any antiderivative by differentiating it back. If of your inner answer does not reproduce exactly, the chain-rule factor is wrong.
Frequently asked questions
Why does the inner variable here have the constant bounds?
The region is a rectangle, so both variables have constant bounds and either can be inner. The order was chosen for convenience, not necessity. With inner from to , the inner integral is a one-line substitution.
Is 1 - 2/pi a plausible size for this volume?
Yes. The integrand never exceeds on this region and is along , so the volume must be well under the base area . The value fits.