Open Calculator

Integral Calculator

Antiderivatives and definite integrals with worked steps.

How the integral calculator works

Integration reverses differentiation, but unlike differentiation there is no single mechanical procedure that always works. The calculator therefore tries techniques in order, the same order a student would: split sums, pull out constants, look the integrand up in the standard table, then try substitution, integration by parts, and partial fractions. Each successful rule is written down as a step. If no technique applies, the calculator says so rather than guessing, and falls back to a numeric method when bounds are supplied.

Worked example: the integral of x e^x

The integrand is a product of a polynomial and an exponential, which is the signature case for integration by parts. Choose u = x (it gets simpler when differentiated) and dv = e^x dx (it is easy to integrate). Then du = dx and v = e^x. The parts formula u v - the integral of v du gives x e^x - the integral of e^x dx = x e^x - e^x. Adding the constant, the answer is x e^x - e^x + C, which the calculator writes as -e^x + x e^x + C. Differentiate it to check: e^x + x e^x - e^x = x e^x.

Table of basic integrals

IntegrandAntiderivativeIntegrandAntiderivative
kk xsec^2 xtan x
x^n (n not -1)x^(n+1) / (n+1)sec x tan xsec x
1 / xln |x|csc^2 x-cot x
e^xe^xcsc x cot x-csc x
a^xa^x / ln a1 / (1 + x^2)atan x
sin x-cos x1 / sqrt(1 - x^2)asin x
cos xsin xln xx ln x - x
tan x-ln |cos x|sinh x, cosh xcosh x, sinh x

Techniques and when they apply

TechniqueRecognise it byExample
Linear substitutionA table function of ax + bsin(3x) gives -cos(3x) / 3
u-substitutionAn inner expression whose derivative is a factor2x e^(x^2) gives e^(x^2)
Integration by partsx^n times e^(ax), sin(ax), cos(ax), or ln xx sin x gives sin x - x cos x
Partial fractionsA rational function whose denominator factors1 / ((x - 1)(x - 2))
Completing the square1 / (quadratic) with no real roots1 / (x^2 + 2x + 5)
ExpansionA product of polynomials(x^2 + 1)^2

Definite integrals

With both bounds filled in, the calculator first looks for an antiderivative F and reports F(b) - F(a) with the two values shown, which is the fundamental theorem of calculus in action. When F cannot be found, or F is infinite at a bound, it switches to adaptive Simpson quadrature: the interval is split recursively until each piece's parabola estimate is accurate to the requested tolerance. The result is then labelled numeric so you know it is an approximation rather than a closed form.

Reading the steps

Each step names the rule and shows the integral it applies to on the left. Integrals still to be done appear as placeholders of the form ∫[...] dx, and later steps resolve them. Substitution steps show the new variable and its differential, then a Substitute back step returns to the original variable. The final Simplify step merges terms and adds the constant of integration.

What the calculator cannot do

It does not know trigonometric substitution for sqrt(x^2 + a^2) and its relatives, repeated linear factors in partial fractions such as 1 / (x (x + 1)^2), or products of three or more transcendental functions. For those, supply bounds to get a numeric value, or split the problem by hand and integrate the pieces.

Frequently asked questions

What is the difference between an indefinite and a definite integral?

An indefinite integral (antiderivative) is a function F with F' = f, written with + C because any constant differentiates to 0. A definite integral from a to b is the number F(b) - F(a), the signed area under f between a and b.

Why does the answer end in + C?

Differentiation erases constants, so every antiderivative is only determined up to an added constant. The C stands for that unknown constant; a definite integral cancels it.

What does 'numeric' mean in the result?

Some integrands, such as e^(-x^2) or sin(x)/x, have no antiderivative made of elementary functions. When the calculator finds no symbolic rule but you supply bounds, it evaluates the definite integral with adaptive Simpson quadrature to about ten significant digits and labels the result numeric.

Which techniques does the calculator use?

The power, exponential, and trig tables; linear substitution; u-substitution when the derivative of an inner expression appears as a factor; integration by parts for polynomial times exponential, trig, or log; and partial fractions with polynomial division for rational functions with rational roots.

Can I use pi in the bounds?

Yes. Bounds accept any constant expression such as pi/2, 2pi, e, or sqrt(2). Both bounds must be given for a definite integral.

My antiderivative looks different from another calculator's. Is it wrong?

Two antiderivatives can differ by a constant and both be correct: sin^2(x)/2 and -cos^2(x)/2 are both antiderivatives of sin x cos x. Differentiate the result to confirm; the calculator does this internally in its test suite.

Related calculators