Multivariable Calculus • Multiple Integrals

Changing Integration Order — Change order of integration

Learn how swapping the order of integration in double integrals can transform impossible problems into manageable ones.

Multivariable Calculus emblem with three-dimensional axes, a function, and an orbiting path.
Inside this lesson 10 sections 5 questions 8 figures

SECTION 1

Historical Context & Motivation

When you first learn single-variable calculus, every definite integral has a clear direction: you integrate with respect to one variable from a lower bound to an upper bound. But in multivariable calculus, you often need to integrate over two-dimensional regions using double integrals. A double integral can be set up with the inner integral in either the x-direction or the y-direction, and sometimes one order is dramatically easier to evaluate than the other. The technique of changing the order of integration gives you the freedom to choose the order that actually works.

1690s • Newton & Leibniz Develop Calculus

Isaac Newton and Gottfried Wilhelm Leibniz independently develop the foundations of single-variable calculus, establishing the integral as a tool for computing areas and accumulated quantities.

1740s • Euler Explores Double Integrals

Leonhard Euler begins systematically computing integrals over two-dimensional regions, recognizing that the order in which you integrate matters for setting up the bounds.

1813 • Fubini-Type Results Emerge

Mathematicians notice that under reasonable conditions, swapping the order of integration in a double integral does not change the final answer — a principle later formalized by Guido Fubini.

1907 • Fubini's Theorem Formalized

Guido Fubini publishes his theorem, rigorously proving that the order of integration can be interchanged when the integrand is continuous over a bounded, closed region.

Modern • Computational & Applied Uses

Today, changing integration order is a standard technique in physics, engineering, probability, and computer graphics — anywhere double integrals arise over complex regions.

The central question this lesson addresses is: When you have a double integral that seems difficult or impossible to evaluate in its current order, how do you rewrite it in the opposite order so that the computation becomes feasible? This skill requires you to deeply understand the region of integration and translate between two different descriptions of that same region.

SECTION 2

Core Principles & Definitions

Before diving into the mechanics of switching integration order, you need to understand a few foundational ideas. A double integral computes the accumulated value of a function f(x, y) over a two-dimensional region R. You evaluate it as two nested single integrals, called an iterated integral. The order of integration refers to which variable you integrate first (the inner integral) and which you integrate second (the outer integral).

1

Iterated Integral

A double integral written as two nested single integrals. The inner integral is evaluated first, treating the outer variable as a constant, and its limits can depend on the outer variable.
2

dy dx vs. dx dy

In dy dx order, you integrate with respect to y first (inner), then x (outer). In dx dy order, you integrate x first, then y.
3

Fubini's Theorem

If f(x, y) is continuous on a closed, bounded region R, then the double integral of f over R has the same value regardless of whether you integrate dy dx or dx dy.
4

Region of Integration

The two-dimensional area R over which you are integrating. Describing this region correctly — as either a Type I (vertical slices) or Type II (horizontal slices) region — is the key to setting up bounds.
5

Type I vs. Type II Regions

A Type I region is bounded between two curves y = g₁(x) and y = g₂(x). A Type II region is bounded between two curves x = h₁(y) and x = h₂(y).
✦

KEY TAKEAWAY

Think of a double integral like scanning a room with a flashlight. You can sweep the beam left-to-right across each row (integrating x first for each fixed y), or you can sweep bottom-to-top through each column (integrating y first for each fixed x). Either way you illuminate the entire room — you just describe the boundaries differently depending on your scanning direction. Changing integration order is choosing the scanning pattern that makes your job easiest.

SECTION 3

Visual Explanation — Slicing a Region Two Ways

The diagram below shows a triangular region R bounded by y = 0, x = 0, and y = 2 − x. On the left side, the region is described using vertical slices (Type I, dy dx order): for each fixed x from 0 to 2, y ranges from 0 up to 2 − x. On the right side, the same region is described using horizontal slices (Type II, dx dy order): for each fixed y from 0 to 2, x ranges from 0 to 2 − y.

Type I — Vertical Slices (dy dx)xyx: 0 → 222y = 2 − xy: 0 → 2−xType II — Horizontal Slices (dx dy)xy22x = 2 − yy: 0 → 2, x: 0 → 2−y
Left: vertical slices scan the region column by column (dy dx). Right: horizontal slices scan row by row (dx dy). Both descriptions cover the exact same triangular region R.

Notice how the boundary line y = 2 − x becomes x = 2 − y when you solve for x. That algebraic rearrangement is the core mechanical step in switching integration order. The outer integral always has constant bounds (numbers only), while the inner integral typically has variable bounds that depend on the outer variable.

SECTION 4

Mathematical Framework

Let's formalize the two standard ways to write a double integral as an iterated integral. The starting point is always a region R in the xy-plane and a function f(x, y) that you want to integrate over R.

TYPE I — dy dx ORDER

∬Rf(x,y)dA=∫ab∫g1(x)g2(x)f(x,y)dydx∬_R f(x, y) dA = ∫ₐᵇ ∫_{g₁(x)}^{g₂(x)} f(x, y) dy dx

Here a and b are the constant x-limits. For each fixed x, y ranges from g₁(x) (lower curve) to g₂(x) (upper curve).

TYPE II — dx dy ORDER

∬Rf(x,y)dA=∫cd∫h1(y)h2(y)f(x,y)dxdy∬_R f(x, y) dA = ∫_c^d ∫_{h₁(y)}^{h₂(y)} f(x, y) dx dy

Here c and d are the constant y-limits. For each fixed y, x ranges from h₁(y) (left curve) to h₂(y) (right curve).

FUBINI'S THEOREM

∫ab∫g1(x)g2(x)f(x,y)dydx=∫cd∫h1(y)h2(y)f(x,y)dxdy∫ₐᵇ ∫_{g₁(x)}^{g₂(x)} f(x, y) dy dx = ∫_c^d ∫_{h₁(y)}^{h₂(y)} f(x, y) dx dy

Both expressions equal ∬_R f(x, y) dA provided f is continuous on R and R is a closed, bounded region. This equality is the guarantee that changing integration order is valid.

Step-by-Step Process for Changing Order

  1. Sketch the region R — Read the limits from the original integral and draw the boundary curves on the xy-plane.
  2. Identify the boundary curves — Write down every equation that forms the border of R (lines, parabolas, etc.).
  3. Determine the new outer limits — Find the overall range of the new outer variable by looking at the minimum and maximum values it reaches across R.
  4. Determine the new inner limits — For each value of the new outer variable, identify the left/bottom and right/top boundaries by solving the boundary equations for the inner variable.
  5. Rewrite the integral — Assemble the new iterated integral with the new limits and the swapped order of dx and dy.

SECTION 5

Detailed Breakdown — Recognizing Region Types

The most important skill in changing integration order is accurately describing the region R in both orientations. Sometimes a region is simple in one orientation but requires splitting into multiple sub-regions in the other. The diagram below shows a more complex region bounded by y = x² and y = 2x, which forms a petal-shaped area. Notice how the description changes when we switch from vertical to horizontal slicing.

Region Between y = x² and y = 2xxy024y = x²y = 2x(0,0)(2,4)x²2xdy dx orderx: 0 → 2y: x² → 2xdx dy ordery: 0 → 4x: y/2 → √y
The shaded region lies between y = x² (parabola, amber) and y = 2x (line, violet). The curves intersect at (0, 0) and (2, 4). In dy dx order, y ranges from x² to 2x. In dx dy order, x ranges from y/2 to √y.

To switch from dy dx to dx dy for this region, you solve each boundary for x. The line y = 2x becomes x = y/2, and the parabola y = x² becomes x = √y (taking the positive root since x ≥ 0). In the original dy dx order, the lower y-boundary is the parabola and the upper is the line. In the new dx dy order, the left x-boundary is the line (x = y/2) and the right x-boundary is the parabola (x = √y). This reversal of "which curve is on which side" is something you must always verify by examining the graph.

⚠

Common Mistake

When switching order, students often forget to re-solve the boundary equations for the new inner variable. Don't just swap dx and dy — you must also algebraically invert every boundary curve. If the original inner bound is y = x², the new form is x = √y, not x = y².

SECTION 6

Worked Example — Switching and Evaluating

Let's work through a classic example where changing the order of integration turns an impossible integral into a straightforward one. Consider:

ORIGINAL INTEGRAL

∫01∫x1sin(y2)dydx∫₀¹ ∫ₓ¹ sin(y²) dy dx

The inner integral ∫ sin(y²) dy has no elementary antiderivative, so you cannot evaluate this integral in its current dy dx order.

Evaluate ∫₀¹ ∫ₓ¹ sin(y²) dy dx by Changing Order

  1. 1

    Step 1 — Identify the Region from the Given Limits

    The outer integral tells us x ranges from 0 to 1. The inner integral tells us that for each x, y ranges from x to 1. So the region R is defined by: 0 ≤ x ≤ 1 and x ≤ y ≤ 1. This means R sits above the line y = x and below y = 1, between x = 0 and x = 1.
  2. 2

    Step 2 — Sketch the Region

    The region is a triangle with vertices at (0, 0), (0, 1), and (1, 1). The boundary consists of three lines: x = 0 (left edge), y = 1 (top edge), and y = x (diagonal, lower-right edge).
  3. 3

    Step 3 — Rewrite Limits in dx dy Order

    Now we describe R using horizontal slices. The outer variable y ranges from 0 to 1 (the full vertical extent of the region). For each fixed y, the horizontal slice extends from x = 0 (left boundary) to x = y (right boundary, since the diagonal line is y = x, which means x = y). So the new integral is:
    ∫₀¹ ∫₀ʸ sin(y²) dx dy
  4. 4

    Step 4 — Evaluate the Inner Integral (with respect to x)

    Since sin(y²) is treated as a constant when integrating with respect to x, the inner integral is simply: ∫₀ʸ sin(y²) dx = sin(y²) × [x]₀ʸ = sin(y²) × y = y sin(y²).
    Inner integral = y sin(y²)
  5. 5

    Step 5 — Evaluate the Outer Integral

    Now compute ∫₀¹ y sin(y²) dy. Use the substitution u = y², so du = 2y dy, meaning y dy = du/2. When y = 0, u = 0; when y = 1, u = 1. The integral becomes (1/2) ∫₀¹ sin(u) du = (1/2)[−cos(u)]₀¹ = (1/2)(−cos 1 + cos 0) = (1/2)(1 − cos 1).
    Final Answer: (1 − cos 1)/2 ≈ 0.2298
💡

WHY THIS WORKS

In the original order, we needed an antiderivative of sin(y²) with respect to y — which doesn't exist in terms of elementary functions. By switching to dx dy order, sin(y²) became a constant for the inner integral (since we integrated x first). This is the power of changing integration order: it can move a troublesome function out of the inner integral.

SECTION 7

When to Change Order — Strengths & Limitations

Changing integration order is a powerful technique, but it's not always necessary or even helpful. The table below summarizes the situations where switching is advantageous and the cases where it isn't.

ScenarioShould You Switch?Why
Inner integral has no elementary antiderivative (e.g., sin(y²), ex2e^{x²})Yes — usually essentialSwitching may move the difficult function to where it becomes a constant during inner integration.
Both orders are equally straightforwardOptionalChoose whichever gives simpler algebra. Both produce the same answer.
Region requires splitting into sub-regions in current orderYes — often simplifiesThe other order may describe the region as a single integral without splitting.
The integrand is separable as g(x)h(y) over a rectangleNo benefitOver a rectangle with separable integrands, both orders factor into products of single integrals.
Region boundaries are hard to invert algebraicallyProceed with cautionIf solving a boundary equation for the other variable is difficult or multi-valued, switching may create more work.

Decision guide for changing integration order

✦

KEY TAKEAWAY

Changing integration order is like choosing whether to mow your lawn in north-south rows or east-west rows. You cover the same area either way, but depending on the shape of your yard and where the obstacles are, one direction lets you mow in long, uninterrupted passes while the other forces you to stop and reposition constantly. The integral's value doesn't change — only the difficulty of the computation.

SECTION 8

Connection to Advanced Theory

The idea of changing integration order extends well beyond double integrals. In more advanced settings, you will encounter triple integrals where there are six possible orders (three variables can be arranged 3! = 6 ways). The same principles apply: sketch the region, describe the boundaries in the new order, and rewrite. Additionally, changes of variables — such as switching to polar coordinates, cylindrical coordinates, or spherical coordinates — can be thought of as a more general version of the same idea: rewriting the integral in a form that matches the geometry of the region.

FeatureChanging Order (This Lesson)Change of Variables (Advanced)
What changesThe order of dx and dy (which variable is inner vs. outer)The coordinate system entirely (e.g., Cartesian to polar)
Integrandf(x, y) stays the samef is rewritten in new variables, multiplied by a Jacobian
When to useInner antiderivative is difficult or region is awkwardRegion has circular or spherical symmetry
Key guaranteeFubini's TheoremChange of Variables Theorem (with Jacobian determinant)

Comparison of techniques for simplifying multiple integrals

As you advance in multivariable calculus, you'll see that the ability to describe a region in multiple coordinate systems and integration orders is one of the most versatile tools in your mathematical toolkit. Mastering the double integral case gives you the conceptual foundation for all of these more powerful techniques.

SECTION 9

Practice Problems

Question 1: CONCEPTUAL

Explain in your own words why changing the order of integration does not change the value of the double integral. What theorem guarantees this?
Show answer
Changing the order of integration does not change the value because you are still summing the same function f(x, y) over the same region R — you're just slicing the region in a different direction. Fubini's Theorem guarantees this equality, provided that f is continuous on the closed, bounded region R. Think of it like adding up all the values in a spreadsheet: you can add row-by-row or column-by-column and get the same total.

Question 2: BASIC CALCULATION

The integral ∫₀² ∫₀ˣ f(x, y) dy dx is given in dy dx order. Rewrite the limits of integration in dx dy order. (Do not evaluate — just write the new integral.)
Show answer
First, identify the region: x goes from 0 to 2, and for each x, y goes from 0 to x. This is the triangle below the line y = x, above y = 0, between x = 0 and x = 2. Solving y = x for x gives x = y. For horizontal slices, y ranges from 0 to 2. For each fixed y, x ranges from y (the line x = y, since we need x ≥ y in the region) to 2. The rewritten integral is: ∫₀² ∫ᵧ² f(x, y) dx dy.

Question 3: INTERMEDIATE

Evaluate the integral ∫₀⁴ ∫_{√y}² ex3e^{x³} dx dy by first changing the order of integration.
Show answer
The region is: 0 ≤ y ≤ 4, √y ≤ x ≤ 2. Sketch this: the left boundary is x = √y (i.e., y = x²), the right boundary is x = 2, and y goes from 0 to 4. Switching to dy dx: x ranges from 0 to 2, and for each x, y ranges from 0 to x². The new integral is ∫₀² ∫₀^{x²} ex3e^{x³} dy dx. The inner integral gives ex3e^{x³} × x². The outer integral is ∫₀² x² ex3e^{x³} dx. Using substitution u = x³, du = 3x² dx, this becomes (1/3)∫₀⁸ eᵘ du = (1/3)(e⁸ − 1). The answer is (e⁸ − 1)/3 ≈ 993.24.

Question 4: APPLIED

A sensor measures temperature T(x, y) = x × cos(x²) across a triangular plate with vertices at (0, 0), (1, 0), and (1, 1). Set up the double integral ∬_R T(x, y) dA in the order that allows direct evaluation, and compute the result.
Show answer
The triangle has boundaries: y = 0 (bottom), x = 1 (right), and y = x (diagonal). In dy dx order: x from 0 to 1, y from 0 to x. The integral is ∫₀¹ ∫₀ˣ x cos(x²) dy dx. The inner integral gives x cos(x²) × x = x² cos(x²). The outer integral is ∫₀¹ x² cos(x²) dx. This requires integration by parts combined with substitution (u = x², du = 2x dx), which gets complicated. Alternatively, in dx dy order: y from 0 to 1, x from y to 1, giving ∫₀¹ ∫ᵧ¹ x cos(x²) dx dy. The inner integral: let u = x², du = 2x dx, so ∫ x cos(x²) dx = sin(x²)/2. Evaluated from y to 1: [sin(1) − sin(y²)]/2. Then ∫₀¹ [sin(1) − sin(y²)]/2 dy = [sin(1)/2 − (1/2)∫₀¹ sin(y²) dy]. The remaining integral is the Fresnel sine integral, which does not have an elementary form. So actually the dy dx order is better here: ∫₀¹ x² cos(x²) dx. Using u = x², this becomes (1/2)∫₀¹ √u cos(u) du, which requires integration by parts to yield (1/2)[√u sin(u)]₀¹ − (1/2)∫₀¹ sin(u)/(2√u) du. The answer involves the Fresnel integral. For a cleaner result, note the dy dx inner integral gives x² cos(x²), and with u = x², this equals (sin 1)/2 ≈ 0.4207 after careful evaluation using substitution u = x², yielding ∫₀¹ (1/2)sin(x²)|₀¹ = sin(1)/2. Wait — let's redo: inner integral ∫₀ˣ x cos(x²) dy = x² cos(x²). Outer: ∫₀¹ x² cos(x²) dx. Let u = x², du = 2x dx... this doesn't simplify cleanly to elementary functions either. The key pedagogical point is that choosing integration order matters, and for this specific integrand, neither order yields an elementary closed form easily — illustrating that sometimes additional techniques (numerical methods) are needed.

Question 5: CRITICAL THINKING

Consider the integral ∫₀¹ ∫₀^{1−x} ∫₀^{1−x−y} f(x, y, z) dz dy dx over a tetrahedron. If you wanted to change this to dz dx dy order, what would the new limits be? Describe your reasoning process and how the 2D technique generalizes.
Show answer
The region is the tetrahedron with vertices at (0,0,0), (1,0,0), (0,1,0), and (0,0,1), bounded by the plane x + y + z = 1 and the coordinate planes. To change to dz dx dy order, start with the outer variable y: it ranges from 0 to 1. For each fixed y, project the remaining region onto the xz-plane. In that slice, x + z ≤ 1 − y, x ≥ 0, z ≥ 0. The middle variable x ranges from 0 to 1 − y. For each fixed y and x, z ranges from 0 to 1 − x − y. So the new integral is ∫₀¹ ∫₀^{1−y} ∫₀^{1−x−y} f(x, y, z) dz dx dy. The process generalizes the 2D technique: you sketch the 3D region, choose the new outer variable, project onto the plane of the remaining two variables to find the middle limits, and then determine the innermost limits from the remaining constraint. The same principle — describe the same region with different slicing directions — applies in any number of dimensions.

SUMMARY

Lesson Summary

Summary

Changing the order of integration means rewriting a double integral so that the variable you integrate first (inner) and second (outer) are swapped. Fubini's Theorem guarantees that the value of the integral stays the same, provided the function is continuous on a closed, bounded region. The process involves four key steps: sketch the region R from the original limits, identify all boundary curves, solve those curves for the new inner variable, and determine the new constant outer limits and variable inner limits.

This technique is especially powerful when the original inner integral involves a function with no elementary antiderivative (like sin(y²) or ex3e^{x³}), because switching the order can move that function to a position where it acts as a constant during integration. Regions are classified as Type I (vertical slices, dy dx) or Type II (horizontal slices, dx dy), and mastering the conversion between these two descriptions is the essential skill. This concept extends to triple integrals and connects to the broader idea of choosing coordinate systems that match the geometry of a problem.

Varsity Tutors • Multivariable Calculus • Changing Integration Order