Double Integral Calculator

Integrate f(x, y) over a rectangle with the iterated setup and a precise numeric result.

Double Integral Calculator

What Is a Double Integral?

A double integral, written ∬R f(x, y) dA, integrates a function of two variables over a two-dimensional region R. Where a single integral sums a varying height along a line to produce an area, a double integral sums a varying height over a patch of the plane to produce a volume: if f(x, y) ≥ 0, the value of ∬f dA is exactly the volume of the solid between the surface z = f(x, y) and the region R beneath it.

Over a rectangle [a, b] × [c, d], Fubini's theorem turns the two-dimensional problem into two nested one-dimensional ones — an iterated integral:

∬ f dA = ∫cd [ ∫ab f(x, y) dx ] dy

The inner integral runs over x with y frozen (exactly the "hold the other variable constant" discipline from partial derivatives), producing a function of y alone — the cross-sectional area at each y. The outer integral then sweeps those cross-sections through the y-range, stacking areas into volume, in perfect analogy with the slicing arguments of single-variable volume problems.

How to Use This Calculator

Enter a function of x and y and the four rectangle bounds. The calculator evaluates the iterated integral with nested high-precision Simpson quadrature (hundreds of sample lines, each sampled hundreds of times), shows the inner integral's value at three sample y-levels so you can see the cross-sectional areas it's stacking, and reports the final volume. The graph draws those same cross-section curves — the surface sliced at the bottom, middle, and top y-values — giving a wireframe intuition for the solid being measured.

Worked Example

Evaluate ∬ (x² + y²) dA over the unit square [0,1] × [0,1]. Inner integral first, treating y as constant:

∫₀¹ (x² + y²) dx = [x³/3 + y²x]₀¹ = 1/3 + y²

Then the outer integral: ∫₀¹ (1/3 + y²) dy = 1/3 + 1/3 = 2/3

So the solid under the paraboloid z = x² + y² above the unit square holds exactly 2/3 of a cubic unit — the calculator's numeric answer, 0.6666667, agrees to seven digits.

Common Mistakes to Avoid

  • Forgetting to treat y as a constant in the inner integral. While integrating dx, y is frozen: y² integrates to y²x, not y³/3. It's the mirror image of the partial-derivative discipline.
  • Mismatching bounds to variables. The inner differential's bounds belong to the inner variable: in ∫cdab f dx dy, the x-bounds are [a, b]. Swapping them silently integrates over the wrong rectangle.
  • Assuming order never matters beyond rectangles. Over rectangles with continuous f, Fubini guarantees dx dy = dy dx. Over non-rectangular regions, switching order forces you to re-derive the variable bounds — a frequent exam trap.
  • Expecting volume from a sign-changing integrand. Like single integrals, double integrals are signed: where f dips below zero, that volume subtracts. "Volume under the surface" requires f ≥ 0 on R.

Real-World Applications

Double integrals compute totals distributed over areas. The mass of a plate whose density varies point to point is ∬ρ(x,y)dA; its balance point (center of mass) and resistance to rotation (moments of inertia) are density-weighted double integrals engineers evaluate for every rotating component and structural panel. In probability, joint distributions of two random variables live under exactly this machinery: P((X,Y) ∈ R) = ∬R p(x,y) dA, and the 2D Gaussian example button computes the normalization at the heart of correlated-risk models in finance and sensor-fusion filters in robotics.

Geographically distributed totals are double integrals too: total rainfall over a watershed (rain rate integrated over area), total solar power on a panel field (irradiance over surface), heat flow through a wall (flux density over its face), and the lift on a wing (pressure difference integrated over wing area). Whenever a quantity has a per-unit-area density and you need the whole-region total, ∬ dA is the tool.

Frequently Asked Questions

What does dA mean, exactly?

An infinitesimal patch of area — in Cartesian coordinates, dA = dx dy. The double integral sums f-weighted patches over the region, and Fubini's theorem licenses doing the sum one direction at a time, in either order.

Can double integrals handle non-rectangular regions?

Yes — the bounds of the inner integral become functions of the outer variable (e.g., y running from 0 up to x within a triangle). This calculator focuses on rectangles, where quadrature is cleanest; curved regions are handled on paper by variable bounds or by a change to polar coordinates.

What happens if f(x, y) = 1 everywhere?

The integral returns the region's area: stacking height-1 columns over R produces volume numerically equal to R's area. This "integrate 1 to measure the region" trick generalizes — triple-integrating 1 measures volume.

Is the numeric method here accurate?

Nested Simpson's rule at 200 × 200 resolution gives 6+ significant figures for smooth integrands — the worked example matches 2/3 to seven digits. Sharply peaked functions (like narrow Gaussians) benefit from bounds that focus on where the action is.

How do double integrals relate to triple integrals?

Identically in spirit: one more nesting level. A triple integral ∭f dV totals a per-unit-volume density over a solid — mass from 3D density, charge from charge density — evaluated as three nested single integrals. Master the two-level version and the third level is bookkeeping.

When should I switch a double integral to polar coordinates?

When the region is a disk, annulus, or wedge, or the integrand contains x² + y². The substitution x = r·cosθ, y = r·sinθ turns dA into r dr dθ (that extra r is the Jacobian), and integrals impossible in Cartesian form often collapse — most famously, converting the 2D Gaussian ∬e^(−x²−y²)dA to polar is the classic trick that proves ∫e^(−x²)dx = √π.

What surfaces do the graph's three curves represent?

They're slices of z = f(x, y) at the bottom, middle, and top of your y-range — the integrand viewed as three single-variable functions of x. Watching how the slices change as y moves is a practical way to visualize a surface without 3D rendering, and it mirrors exactly what the inner integral computes at each fixed y.