Integral Calculator

Calculate definite integrals using numerical integration methods.

Limits of Integration

Definite Integral
—
Enter function and bounds
Antiderivative
—
Area Under Curve
—

Quick Examples

Integration Rules

Integration is the reverse of differentiation. The definite integral represents the area under a curve between two points.

Basic Integration Rules

Power Rule: ∫x^n dx = x^(n+1)/(n+1) + C (n ≠ -1)
Constant: ∫c dx = cx + C
Sum: ∫(f+g) dx = ∫f dx + ∫g dx

Integrals of Common Functions

FunctionIntegral
sin(x)-cos(x) + C
cos(x)sin(x) + C
e^xe^x + C
1/xln|x| + C
a^xa^x / ln(a) + C
sec²(x)tan(x) + C

Fundamental Theorem of Calculus

∫[a to b] f(x)dx = F(b) - F(a)

Where F(x) is the antiderivative of f(x).

Worked Example: Definite Integral

Evaluate ∫₀³ x² dx:

  1. Find the antiderivative (power rule): x³/3.
  2. Evaluate at the bounds: F(3) − F(0) = 27/3 − 0 = 9.

The result, 9, is the exact area under y = x² from x = 0 to x = 3.

Worked Example: U-Substitution

Evaluate ∫cos(2x+1) dx:

  1. Substitute: u = 2x + 1, so du = 2 dx, or dx = du/2.
  2. Rewrite: ∫cos(u)·du/2 = (1/2)∫cos(u) du.
  3. Integrate: (1/2)sin(u) + C.
  4. Substitute back: sin(2x+1)/2 + C.

Worked Example: Integration by Parts

Evaluate ∫x·eˣ dx using ∫u dv = uv − ∫v du:

  1. Choose u and dv (the LIATE rule: pick u as the algebraic part first): u = x, dv = eˣ dx.
  2. Then du = dx, v = eˣ.
  3. Apply the formula: x·eˣ − ∫eˣ dx = x·eˣ − eˣ + C = eˣ(x − 1) + C.

Worked Example: Improper Integral

Evaluate ∫₁^∞ (1/x²) dx by replacing infinity with a limit:

  1. Antiderivative: −1/x.
  2. Evaluate from 1 to b: −1/b − (−1) = 1 − 1/b.
  3. Take the limit as b → ∞: 1 − 0 = 1.

The curve extends forever yet encloses a finite area — the definition of a convergent improper integral.

Integration Methods at a Glance

MethodUse whenKey formula
U-substitutionA function nested inside another (chain rule in reverse)∫f(g(x))·g'(x) dx = ∫f(u) du
Integration by partsProducts of different function types; pick u by LIATE (Log, Inverse trig, Algebraic, Trig, Exponential)∫u dv = uv − ∫v du
Partial fractionsRational functions (polynomial ÷ polynomial)Split into simpler fractions first

Signed Area: Why a Definite Integral Can Be Zero or Negative

A definite integral measures signed area: regions below the x-axis subtract from the total.

  • ∫₀^π sin(x) dx = −cos(π) − (−cos(0)) = 1 + 1 = 2.
  • ∫₀^{2π} sin(x) dx = 0 — the positive and negative humps cancel exactly.

Why Every Indefinite Integral Has +C

Because the derivative of any constant is 0, infinitely many functions share the same derivative. The +C stands for that whole family: ∫2x dx = x² + C, and differentiating x² + 5, x² − 3, or x² + 0 all return 2x.

What Integrals Measure in the Real World

  • Distance from velocity: integrating a velocity function over time gives total displacement.
  • Work from force: integrating a variable force over distance gives the work done.
  • Area and volume: the area under any curve, or the volume of a solid of revolution.
  • Probability: the area under a probability density curve over an interval is the probability of landing in that interval.
Some integrals, such as ∫e^(x²) dx, have no antiderivative built from elementary functions. Definite versions of these are computed numerically instead.

Worked Example: Area Between Two Curves

Find the area enclosed by y = x and y = x² on [0, 1]. The line is on top, so integrate the difference:

∫₀¹ (x − x²) dx = [x²/2 − x³/3]₀¹ = (1/2 − 1/3) − 0 = 1/6

Worked Example: Average Value of a Function

The average value of f on [a, b] is (1/(b−a))∫ₐᵇ f(x) dx. For f(x) = x² on [0, 3]:

Average = (1/3)∫₀³ x² dx = (1/3) × 9 = 3

Symmetry Shortcuts

  • Odd function (f(−x) = −f(x)) over a symmetric interval [−a, a]: the integral is 0 — the halves cancel.
  • Even function (f(−x) = f(x)) over [−a, a]: the integral equals 2 × ∫₀ᵃ — compute half and double.

Integrals of Trigonometric Functions

FunctionIndefinite integral
tan(x)−ln|cos(x)| + C
cot(x)ln|sin(x)| + C
sec(x)ln|sec(x) + tan(x)| + C
csc(x)−ln|csc(x) + cot(x)| + C

How a Riemann Sum Becomes an Integral

Before the antiderivative shortcut, the definite integral was defined as the limit of Riemann sums: slice the interval into n rectangles, add their areas, and let n → ∞. Numerical integration methods (trapezoid, Simpson's rule) are just smarter finite versions of that sum — which is how this calculator evaluates definite integrals.

Worked Example: Displacement from Velocity

A particle's velocity is v(t) = 3t² m/s. Its displacement over the first 2 seconds is:

∫₀² 3t² dt = [t³]₀² = 8 − 0 = 8 meters

This is the precise version of "distance = speed × time" for changing speeds.

Worked Example: Volume of Revolution

Rotate the curve y = x² (from x = 0 to 1) around the x-axis. Using discs of radius y and thickness dx:

V = π∫₀¹ (x²)² dx = π[x⁵/5]₀¹ = π/5 ≈ 0.6283

How Numerical Integration Works

When no antiderivative exists, calculators approximate. The trapezoid rule replaces each slice with a trapezoid: ∫ₐᵇ f(x) dx ≈ (Δx/2)[f(x₀) + 2f(x₁) + … + 2f(xₙ₋₁) + f(xₙ)]. Simpson's rule fits parabolas instead of straight lines and converges faster. This calculator uses numerical methods for definite integrals, which is why it handles functions like e^(x²) that have no elementary antiderivative.

Worked Example: Substitution in a Definite Integral

Evaluate ∫₀¹ 2x·e^(x²) dx:

  1. Substitute: u = x², so du = 2x dx.
  2. Change the bounds: x = 0 → u = 0; x = 1 → u = 1.
  3. Integrate: ∫₀¹ e^u du = [e^u]₀¹ = e − 1 ≈ 1.7183.

Changing the bounds with the substitution avoids substituting back — the most common source of errors in definite u-substitution.

Properties of Definite Integrals

∫ₐᵇ f(x) dx = −∫ᵦᵃ f(x) dx (reversing bounds flips the sign)
∫ₐᵇ [f(x) + g(x)] dx = ∫ₐᵇ f(x) dx + ∫ₐᵇ g(x) dx
∫ₐᵇ c·f(x) dx = c·∫ₐᵇ f(x) dx
∫ₐᶜ f(x) dx = ∫ₐᵇ f(x) dx + ∫ᵦᶜ f(x) dx (splitting the interval)

These let you rearrange complicated integrals into simpler pieces before computing — split at discontinuities, factor out constants, and integrate term by term.

Quick Sanity Checks

  • Differentiate your answer: the derivative of any antiderivative must return the original integrand.
  • Check the sign: integrating a positive function over [a, b] with a < b must give a positive number.
  • Check the scale: if f averages about 3 over an interval of length 4, expect an answer near 12.

Frequently Asked Questions

What is the difference between definite and indefinite integrals?
An indefinite integral finds the general antiderivative (with +C). A definite integral calculates the exact area between two bounds, giving a numerical result.
What does the integral represent physically?
The definite integral represents the accumulated quantity: area under a curve, total distance from velocity, total work from force, etc.