Skip to main content

Integral Calculator

Evaluate an indefinite integral (find an antiderivative and add + C) or a definite integral (compute the signed area between a curve and the x-axis) — with a distinct visual for each mode, full step-by-step work, and a numerical fallback for integrals with no elementary antiderivative.

Background

An indefinite integral ∫ f(x) dx asks: "what family of functions has f(x) as its derivative?" Its answer is always a family, written with a + C since any constant can be added without changing the derivative. A definite integral ab f(x) dx asks a different question: "what is the net signed area between the curve and the x-axis from x=a to x=b?" When an antiderivative F(x) is known, the Fundamental Theorem of Calculus connects the two: ab f(x) dx = F(b) − F(a). When no elementary antiderivative exists, this calculator estimates the definite integral numerically instead.

Set up your integral

Step 1 — Indefinite or definite?

Step 2 — Enter your integrand

Supported: ^ for powers, sqrt(...), sin(...), cos(...), tan(...), ln(...), e^(...), and the constants e and pi. Implicit multiplication like 2x or 3(x+1) works fine.

Step 3 — Bounds

Bounds may use pi, e, decimals, or simple fractions like 1/2.

Learning options

Result

No result yet. Enter an integrand above and click Calculate.

How to use this calculator

  • Choose Indefinite to find an antiderivative, or Definite to compute a signed area between two bounds.
  • Type your integrand using ^ for powers and standard function names. Implicit multiplication is supported.
  • For definite integrals, enter the lower and upper bounds — these can include pi or e.
  • Click Calculate to see the result, the matching visual, and the full step-by-step work.
  • If no elementary antiderivative is recognized, definite integrals fall back to a numerical estimate (Simpson's Rule) automatically.

How this calculator works

1

For indefinite integrals, the calculator matches your integrand against a library of common antiderivative rules — power, exponential, trig, log, arctan, and a few integration-by-parts cases — including generalized versions with a linear inner expression, like sin(3x−1) or (2x+5)^4, handled by u-substitution.

2

Sums and differences are split apart first using linearity, ∫(f ± g) dx = ∫f dx ± ∫g dx, then each piece is matched and integrated separately before recombining.

3

For definite integrals, if a symbolic antiderivative F(x) is found, the Fundamental Theorem of Calculus gives the exact value: F(b) − F(a).

4

If no symbolic antiderivative is recognized — which happens for genuinely non-elementary integrands like e^(x²) — the calculator instead estimates the definite integral numerically using Simpson's Rule, a highly accurate method for smooth functions.

5

A definite integral measures signed area: regions where the curve dips below the x-axis subtract from the total rather than adding to it, so the net result can be positive, negative, or exactly zero even when the curve clearly encloses visible area.

Formulas & Equations Used

Power rule: ∫ xⁿ dx = xⁿ⁺¹/(n+1) + C, for n ≠ −1 (generalizes to (ax+b)ⁿ via u-substitution)

Log rule: ∫ 1/x dx = ln|x| + C

Exponential rule: ∫ eᵡ dx = eᵡ + C; more generally ∫ bᵡ dx = bᵡ/ln(b) + C for a constant base b > 0

Trig basics: ∫ sin(x) dx = −cos(x) + C, ∫ cos(x) dx = sin(x) + C, ∫ tan(x) dx = −ln|cos(x)| + C

Inverse trig form: ∫ 1/(1+x²) dx = arctan(x) + C

Integration by parts: ∫ u dv = uv − ∫ v du

Fundamental Theorem of Calculus: ab f(x) dx = F(b) − F(a)

Example Problems & Step-by-Step Solutions

Example 1 — Basic power rule

Evaluate ∫ x³ dx.

Step: Add 1 to the exponent (3+1=4), then divide by the new exponent.

Result: ∫ x³ dx = x⁴/4 + C.

Example 2 — u-substitution with a shift

Evaluate ∫ cos(2x+1) dx.

Step: Let u = 2x+1, so du = 2 dx. ∫ cos(u) du/2 = sin(u)/2.

Result: ∫ cos(2x+1) dx = sin(2x+1)/2 + C.

Example 3 — Integration by parts

Evaluate ∫ x·e^x dx.

Step: Let u=x, dv=e^x dx, so du=dx, v=e^x. ∫ xe^x dx = xe^x − ∫ e^x dx.

Result: ∫ x·e^x dx = e^x(x−1) + C.

Example 4 — Definite integral, positive area

Evaluate ∫03 x² dx.

Step: F(x) = x³/3. F(3) − F(0) = 9 − 0.

Result:03 x² dx = 9.

Example 5 — A full period cancels to zero

Evaluate ∫0 sin(x) dx.

Step: F(x) = −cos(x). F(2π) − F(0) = −1 − (−1) = 0.

Result: 0 — the positive and negative humps of sine over a full period exactly cancel.

Example 6 — No elementary antiderivative

Evaluate ∫01 e^(x²) dx.

Step: No combination of elementary functions differentiates to e^(x²), so the calculator falls back to Simpson's Rule.

Result:01 e^(x²) dx ≈ 1.4627 (numerical estimate).

Frequently Asked Questions

What's the difference between an indefinite and definite integral?

An indefinite integral gives a family of antiderivatives and includes + C. A definite integral gives a single number: the signed area over a specific interval [a, b].

Why does the indefinite mode show three curves instead of one?

Because + C means infinitely many antiderivatives exist, all differing by a vertical shift. Plotting a few of them (like C = −2, 0, 2) makes that "family of curves" idea visible instead of abstract.

Why can a definite integral be negative or zero even though the curve clearly has area?

Because a definite integral measures signed area, not the area you'd get with a ruler and scissors. Any part of the curve below the x-axis subtracts from the total, which is exactly why ∫sin(x) dx over a full period comes out to 0.

Does this calculator solve every possible integral?

No calculator can — some integrands, like e^(x²), simply have no elementary antiderivative. This calculator recognizes a broad set of common patterns (power, exponential, trig, log, arctan, and several integration-by-parts cases) and automatically switches to a numerical estimate for definite integrals when no symbolic match is found.

What does "u-substitution" mean in the rule shown?

It means the integrand has a linear inner expression (like 3x−1 inside a sine or exponent), and substituting u for that inner expression turns the integral into a basic form, which then gets divided by the inner expression's slope after integrating.

Why does the calculator warn me about the domain?

Some functions aren't defined everywhere — square roots of negative numbers, logarithms of non-positive numbers, and division by zero all break a formula at specific inputs. The calculator flags this instead of silently producing a wrong number.

Function Analyzer Calculator
Analyze functions with graphs, derivatives, extrema, limits, asymptotes, and step-by-step explanations
Domain and Range Calculator
Find domain and range of common functions with clear steps + number-line visual
Riemann Sum Calculator
Approximate integrals with 5 methods - rectangles, trapezoids, and step-by-step tables
Fourier Series & Signal Analyzer Calculator
Analyze Fourier series, harmonics, waveform reconstruction, and signal spectra with visual step-by-step explanations
Function Continuity Calculator
Check continuity at a point, classify discontinuities, and detect corners/cusps
Arc Length Calculator
Calculate arc length for circle arcs and curves with unit support
Graphing Calculator
Graph functions, compare equations, trace coordinates, and explore graph features step by step
Laplace Transform Calculator
Calculate Laplace transforms, inverse transforms, differential equations, and circuit responses step by step
Derivative Calculator
Differentiate functions step by step and visualize f(x) and f′(x)
Area Between Curves Calculator
Calculate the area between two curves with shaded graphs, intersection checks, and step-by-step solutions
Limit Calculator
Calculate two-sided, one-sided, infinity, and piecewise limits with steps
Series Calculator
Analyze finite and infinite series with convergence tests, partial sums, graphs, and step-by-step solutions
Ordinary Differential Equations (ODE) Calculator
Solve first-order ordinary differential equations with steps, slope fields, Euler’s method, and solution curves
Simple Pendulum Calculator
Calculate pendulum period, frequency, length, gravity, and swing motion with animated physics visuals
Back to all calculatorsAll calculators