Does Order of Integration Matter in Calculus?
What Is Order of Integration?
When you work with double or triple integrals, you're integrating a function over a region. That region might be a rectangle, a circle, a weird blob — anything bounded. The question is: does it matter which variable you integrate first?
Short answer: sometimes yes, sometimes no. It depends on the function and the region. Most students get burned by assuming it never matters.
When Order Doesn't Matter: Fubini's Theorem
Fubini's Theorem is the formal result that covers the easy cases. It says you can swap the order of integration if two conditions hold:
- The region is a rectangle (or a product of intervals)
- The function is continuous on that region
If both are true, the iterated integrals are equal. You can integrate in any order and get the same result. This is the case most textbooks spend 90% of their time on, which gives students the false impression that order never matters.
Simple Example
Consider integrating f(x,y) = xy² over the rectangle where 0 ≤ x ≤ 2 and 0 ≤ y ≤ 1.
Method 1 (dy first):
∫₀² ∫₀¹ xy² dy dx = ∫₀² [x·y³/3]₀¹ dx = ∫₀² x/3 dx = [x²/6]₀² = 4/6 = 2/3
Method 2 (dx first):
∫₀¹ ∫₀² xy² dx dy = ∫₀¹ [x²y²/2]₀² dy = ∫₀¹ 2y² dy = [2y³/3]₀¹ = 2/3
Same answer. Order doesn't matter here because Fubini's conditions are satisfied.
When Order Actually Does Matter
Here's where things get uncomfortable for students who memorized the "swap the integrals" trick without understanding why it works.
Non-Rectangular Regions
When the region isn't a rectangle, changing order can force you to set up completely different bounds. The value stays the same if the function is continuous, but the setup changes. Sometimes one order gives you easy integrals; the other gives you a nightmare.
Example: Integrate f(x,y) = x over the region bounded by y = x² and y = x.
Order 1 (dx first):
y goes from 0 to 1. For each y, x goes from x = y to x = √y.
∫₀¹ ∫ᵞ√y x dx dy
Order 2 (dy first):
x goes from 0 to 1. For each x, y goes from x² to x.
∫₀¹ ∫ₓ²ˣ x dy dx
The second setup is simpler here. The first requires handling square roots in the bounds. Same answer, different difficulty.
Discontinuous Functions
This is the case most students never see until it bites them on an exam. If the function has a discontinuity in the region, Fubini's Theorem doesn't apply. The iterated integrals might give different values — or one might not even exist.
Classic counterexample:
f(x,y) = (xy)/(x² + y²)² for (x,y) ≠ (0,0), and f(0,0) = 0
This function is discontinuous at the origin. The two orders of integration give different results. One integral exists; the other doesn't. The "swap and compute" method fails completely.
Swapping Limits: A Practical How-To
When you need to change integration order, follow this process:
- Sketch the region first. Always. No exceptions.
- Identify the original order from the given limits.
- Redraw the region with axes labeled for the variable you want to integrate first.
- Describe the region with the new variable as the outer integration.
- Write the new limits carefully.
Common mistake: students try to do this algebraically without drawing anything. That's how you get wrong bounds and wrong answers.
Quick Example
Original: ∫₀² ∫₀^(x/2) f(x,y) dy dx
The region: y goes from 0 to x/2, x goes from 0 to 2.
Sketch it. The line y = x/2 intersects the x-axis at (0,0) and the vertical line x=2 at (2,1). The region is a trapezoid.
New order (dy outside): y goes from 0 to 1. For each y, x goes from x = 2y to x = 2.
Result: ∫₀¹ ∫₂y² f(x,y) dx dy
Order of Integration Comparison
| Scenario | Order Matters? | Why |
|---|---|---|
| Rectangle region + continuous function | No | Fubini's Theorem applies |
| Non-rectangular region + continuous function | No (same value, different setup) | Fubini applies; bounds change |
| Any region + discontinuous function | Possibly yes | Fubini's conditions fail |
| One order gives indefinite integral | No (same value) | Pick the easier order |
The Practical Takeaway
For most problems in a standard calculus course, the order doesn't affect the answer — but it absolutely affects how much time you spend and whether you finish the problem.
Swap the order when:
- The original setup has messy bounds (roots, fractions, complicated expressions)
- The inner integral looks impossible to solve
- The region is easier to describe with the other variable leading
Don't swap when:
- The original setup is already clean
- You're short on time and both orders look equal
- You've been told to evaluate, not optimize
The real skill isn't memorizing that order "doesn't matter" — it's recognizing when one order will save you twenty minutes of grinding through ugly algebra.