Indefinite Integral Calculator

Find antiderivatives of expressions.

FreeNo accountOn your device

Runs in your browser. How to verify

Loading tool…

About this tool

Type a function and get its antiderivative plus C, with the rule applied at each step and a check that differentiating the answer gives your function back. ∫ x·e^x dx = x·exp(x) − exp(x) + C.

How to use

1
Step 1
Type the function, for example 3*x^2 + 2*x + 1 or x*exp(x). Use ln(x) or log(x) for the natural log.
2
Step 2
Leave the variable as x, or change it (for example t).
3
Step 3
Press Calculate. Read the steps, then the antiderivative with + C.
4
Step 4
Check the last step: it differentiates the answer and compares it with your function at test points.

How it works

An antiderivative F of f is any function whose derivative is f, so ∫ f dx = F + C. The tool tries the standard techniques in turn and shows each one: sums and constant multiples, the power rule (∫xⁿ dx = xⁿ⁺¹/(n+1)), 1/x → ln|x|, linear insides such as (2x+1)³ or sin(3x) by u = ax + b, automatic u-substitution (x·e^(x²), x/(x²+1), tan, sec, csc, exponentials and square roots of linear terms), integration by parts (x·eˣ, x²·sin x, ln x, (ln x)², x·ln x, arctan x, arcsin x, and the cyclic case eˣ·sin x), powers and products of sine, cosine and their hyperbolic cousins (odd powers by substitution, even powers and products by product-to-sum), tanⁿ, secⁿ, cscⁿ, partial fractions with completing the square for 1/(ax²+bx+c) and repeated quadratic factors, √ and 1/√ of a quadratic, and |ax+b|. Some integrands have no elementary antiderivative but a standard name: e^(−x²) gives (√π/2)·erf(x), e^(x²) gives (√π/2)·erfi(x), sin(x)/x gives Si(x), cos(x)/x gives Ci(x), eˣ/x gives Ei(x), 1/ln x gives li(x), and sin(x²), cos(x²) give Fresnel integrals. The tool names the function and explains it. Every elementary answer is differentiated with a CAS and compared with your function; special-function answers are checked by a numerical derivative of an implemented erf/erfi/Si/Ci/Ei/Fresnel; if the check fails the tool refuses to show the answer. Optionally enter x to get F(x), or bounds a and b to get F(b) − F(a), cross-checked by numerical quadrature.

∫ xⁿ dx = xⁿ⁺¹/(n+1) + C (n ≠ −1)      ∫ 1/x dx = ln|x| + C      ∫ f(ax+b) dx = F(ax+b)/a + C

Worked example

A product that needs integration by parts

Input
x*exp(x)
Output
x*exp(x) - exp(x) + C
Walkthrough
Differentiate the polynomial x (giving 1, then 0) while integrating exp(x) each time, and alternate the signs: x·eˣ − 1·eˣ. Differentiating the result gives eˣ + x·eˣ − eˣ = x·eˣ, which matches the original, and the tool confirms this at 11 test points.

Limitations

  • Only closed forms the rules can reach are returned. When none is found you get the message "No closed form found by the rules this tool knows" rather than a guess. Examples it cannot do: sqrt(sin(x)) and sin(sin(x)).
  • x^x (a variable in both the base and the exponent) is reported as not expressible: by Liouville's theorem and the Risch algorithm it has no antiderivative in elementary functions, and it is not a named special function either. The square root of a cubic or quartic is an elliptic integral and is also reported, not computed. Use a definite integral with numeric bounds for these.
  • Special functions supported: erf, erfi, Si, Ci, Shi, Chi, Ei, li and the Fresnel integrals S and C. Others (elliptic, gamma, Bessel, polylogarithms) are not produced. Constants such as a in exp(-a*x^2) are assumed positive.
  • ln(x) is the natural log, and results are for x in the domain where the integrand is real (for example ln(x) needs x > 0). The result for 1/x is ln|x|. Results use * and ^ with fractions like x^3/3.
  • Products that mix unrelated families (for example x·tan(x), which needs the dilogarithm, or sin(x) times a logarithm) are not integrated, and the message names the families it could not combine. Irreducible denominator factors of degree 3 or more are split over the reals with numerically computed roots, so those answers have decimal coefficients (labelled approximate) and only simple (non-repeated) factors are supported. Exponent offsets work in numerators (e^(x+1)/(1+e^x)) but not inside a denominator sum such as e^(x+1)+1. For a definite integral with limits, use the definite integral calculator.

Questions

What is the integral of 1/x?
ln|x| + C. The power rule fails for x⁻¹ because it would divide by zero.
What is the integral of e^(−x²)?
sqrt(pi)*erf(x)/2 + C, that is (√π/2)·erf(x). It has no elementary antiderivative; erf is the error function, erf(x) = (2/√π)∫₀ˣ e^(−t²) dt. For e^(x²) the answer is (√π/2)·erfi(x).
What is the integral of sin(x)/x?
Si(x) + C, the sine integral Si(x) = ∫₀ˣ sin t / t dt. Likewise cos(x)/x gives Ci(x), eˣ/x gives Ei(x) and 1/ln(x) gives li(x).
What is the integral of sin(x²)?
sqrt(pi/2)*FresnelS(sqrt(2/pi)*x) + C, where FresnelS(z) = ∫₀ᶻ sin(πt²/2) dt. cos(x²) gives the same form with FresnelC.
What is the integral of x^x?
It cannot be written in closed form. By Liouville's theorem (the Risch algorithm) x^x has no antiderivative in elementary functions, and it is not a standard special function. Use a definite integral with numeric bounds.
What is the integral of e^x·sin(x)?
exp(x)*sin(x)/2 − exp(x)*cos(x)/2 + C. Integrating by parts twice returns the original integral, which is then solved for algebraically.
What is the integral of sin(x)^3?
−cos(x) + cos(x)^3/3 + C: keep one sine as −d(cos x) and write sin² = 1 − cos².
What is the integral of ln(x)^2?
x*ln(x)^2 − 2*x*ln(x) + 2*x + C, by integration by parts twice.
What is the integral of (2x+1)^3?
(2x+1)^4/8 + C. Substitute u = 2x+1, du = 2 dx, so divide by 2 and by the new exponent 4.
What is the integral of 1/(x^2-1)?
−ln|x+1|/2 + ln|x−1|/2 + C, found by partial fractions.
Why is there a + C?
Adding any constant to an antiderivative does not change its derivative, so every antiderivative differs by a constant.

Features

  • Rule shown at each step
  • Verified by differentiating
  • Named special functions (erf, Si, Ei, li, Fresnel)
  • Value of F at a point or between bounds
  • Runs in your browser

Related resources

Guides and videos from around the web—opens on YouTube or the publisher’s site.

  • Finding mean, median, and mode

    Khan Academy

    Descriptive stats used across statistics tools.

    Watch on YouTube
  • Definite integrals intro

    Khan Academy

    Definite integral basics for area-under-curve calculators.

    Watch on YouTube