Your country

Tools that support it use your country for local currency, number formats, units and paper size. Your choice is saved only in this browser.

Type a name or a two-letter code. Use the up and down arrow keys to move through the countries, Enter to choose one and Escape to close.

Integral Calculator

Antiderivatives with steps, definite and improper integrals — every answer checked.

Math No upload Works offline Free, no sign-up

Use ^ for powers and * or a space for multiplication: x^2 e^x, sqrt(x), ln(x), e^(2x), |x|, arctan(x). A trailing dx is optional.

Try:

Result

— —

Read as

Working

    Step-by-step

      Next steps

      About the Integral Calculator

      Type a function such as x sin(x), 1/(x^2 + 2x + 5) or e^x cos(x) and get its antiderivative with the steps: the power, sum and constant-multiple rules, standard integrals, u-substitution, integration by parts, partial fractions, completing the square and trigonometric identities. When a step-by-step rule does not apply, the open-source computer algebra libraries nerdamer-prime and then Algebrite are tried. Whatever the source, an answer is shown only after it passes a check — differentiating it must give back your function at sample points — and otherwise the calculator says that no closed form was found rather than guess.

      For a definite integral the value comes from F(b) − F(a) when an antiderivative exists, using one-sided limits for improper integrals (infinite limits, or a function that blows up at an end) and splitting the interval where the antiderivative jumps. Every exact value is compared with adaptive Gauss–Kronrod quadrature, and when there is no closed form the numerical value is given with its error estimate. Divergent integrals are reported as divergent. Other modes find the area enclosed between two curves (with the crossing points worked out) and double and triple integrals, one variable at a time. The graph shades the area. Everything runs in your browser.

      How to use it

      1. Choose Indefinite, Definite, Area between curves, Double or Triple.
      2. Type the function with ^ for powers, sqrt( ), ln( ), e^x, |x| and sin, cos, tan, arcsin …; 2x and x sin(x) work without “*”. A leading ∫ and a trailing dx are ignored.
      3. For a definite integral give the limits — numbers such as 0, pi/2 or sqrt(2), or inf and -inf. For the area, give a second curve (or leave it blank for the x-axis) and optionally the ends; for double and triple integrals give each variable with its limits, inner integral first.
      4. Read the answer, the check, the working and the steps; the graph shades the region. Copy or download everything as text.

      Examples

      Integration by parts
      Input
      ∫ x sin x dx
      Result
      sin x − x cos x + C

      u = x, dv = sin x dx, so ∫ u dv = uv − ∫ v du = −x cos x + ∫ cos x dx.

      u-substitution
      Input
      ∫ 2x cos(x²) dx
      Result
      sin(x²) + C

      With u = x², du = 2x dx and the integral becomes ∫ cos u du.

      Completing the square
      Input
      ∫ dx/(x² + 2x + 5)
      Result
      (1/2) arctan((x + 1)/2) + C

      x² + 2x + 5 = (x + 1)² + 4.

      Partial fractions
      Input
      ∫ dx/(x(x + 1))
      Result
      ln|x| − ln|x + 1| + C

      1/(x(x + 1)) = 1/x − 1/(x + 1).

      Definite integral
      Input
      ∫₀^π sin x dx
      Result
      2

      [−cos x] from 0 to π = 1 − (−1) = 2.

      Improper integral
      Input
      ∫ e^(−x²) dx from −∞ to ∞
      Result
      √π ≈ 1.772453851

      From the limits of (√π/2) erf x at ±∞.

      A divergent integral
      Input
      ∫₁^∞ dx/x
      Result
      diverges (to ∞)

      ln x grows without bound.

      Area between curves
      Input
      y = x and y = x²
      Result
      Area = 1/6

      They meet at x = 0 and x = 1, and ∫₀¹ (x − x²) dx = 1/6.

      Double integral
      Input
      ∫₀¹ ∫₀ˣ xy dy dx
      Result
      1/8

      The inner integral is x³/2.

      Common uses

      • Checking calculus homework and seeing which technique works at each step — Class 12 integrals, first-year university calculus.
      • Definite integrals for areas, averages, work and probabilities, with a numerical cross-check of every exact value.
      • Improper integrals: deciding whether they converge, and finding the value when they do.
      • Areas between curves and double or triple integrals over simple regions in multivariable calculus.

      The techniques used

      • Basic rules: ∫ xⁿ dx = xⁿ⁺¹/(n + 1) for n ≠ −1, ∫ dx/x = ln|x|, the sum and constant-multiple rules, and the standard integrals of eˣ, aˣ, the trigonometric and hyperbolic functions — also with a linear inside such as cos(3x + 1).
      • u-substitution: when the integrand has the form f(g(x))·g′(x), put u = g(x).
      • Integration by parts: ∫ u dv = uv − ∫ v du, choosing u by the LIATE order (logarithms, inverse trigonometric, algebraic, trigonometric, exponential). eᵃˣ sin bx and eᵃˣ cos bx need it twice.
      • Rational functions: divide first when the top has a degree at least that of the bottom, factor the denominator, split into partial fractions, then use ln, arctan (after completing the square) and the reduction formula for repeated quadratic factors.
      • Trigonometric integrals: odd powers of sin or cos by substitution, even powers by the power-reduction identities, products by product-to-sum, powers of tan and sec by reduction formulas, and t = tan(x/2) for rational functions of sin x and cos x.

      How definite and improper integrals are evaluated

      By the Fundamental Theorem of Calculus, ∫ₐᵇ f(x) dx = F(b) − F(a) for any antiderivative F that is continuous on [a, b]. The calculator scans the interval for points where F jumps or blows up and splits the integral there; at infinite limits and at such points it uses one-sided limits of F, from the leading term of F. If a limit is infinite the integral diverges; if F keeps oscillating (as −cos x does at ∞) it diverges too. Every exact value is compared with adaptive Gauss–Kronrod quadrature — the 21-point Kronrod rule with its embedded 10-point Gauss rule, bisecting the worst subinterval until the error estimate is small, and mapping infinite ranges onto finite ones, as in QUADPACK (Piessens, de Doncker-Kapenga, Überhuber and Kahaner, 1983). Near a singular end point the range is also transformed so that the rule stays accurate, and such a result is accepted only if integrals that stop just short of the ends settle on the same value. When there is no closed form the numerical value is shown with that error estimate, and a warning when the requested accuracy was not reached.

      Area between curves and multiple integrals

      The area between y = f(x) and y = g(x) from a to b is ∫ₐᵇ |f(x) − g(x)| dx: the calculator finds where the curves cross, integrates f − g on each piece with the right sign, and adds the pieces. Without limits it uses the region enclosed between the first and last crossing points. A double integral ∫ₐᵇ ∫ c(x)…d(x) f(x, y) dy dx is done from the inside out: integrate in y with x held constant, put in the limits c(x) and d(x), then integrate the result in x (Fubini’s theorem); triple integrals add one more level. The exact result is checked against nested numerical quadrature.

      Limitations

      • Real-valued functions of real variables only. An antiderivative may look different from your textbook’s and still be correct — any two differ by a constant (for example sin²x/2 and −cos²x/2).
      • Some functions have antiderivatives that need special functions or are beyond these methods (1/(x⁴ + 1) is one that is not found); then definite integrals are still given numerically.
      • The numerical part works in double precision within a time limit of about 12 seconds; very oscillatory or nearly singular integrands may not reach full accuracy, and the page says so. Triple integrals are numerically slower than double ones.
      • Double and triple integrals are iterated integrals over regions described by the limits you give (inner limits may depend on the outer variables); polar, cylindrical and spherical coordinates are not converted automatically.
      • With letters other than the variable (∫₀ᵇ ax dx = ab²/2), the answer F(b) − F(a) cannot be checked numerically and assumes that F is continuous between the limits.

      Privacy

      Everything happens in your browser. What you enter or open here is not uploaded or stored by MySmartCoPilot.

      Frequently asked questions

      Why is there a + C?

      Differentiating a constant gives 0, so if F(x) is an antiderivative then so is F(x) + C for every constant C. The indefinite integral is that whole family; for a definite integral the C cancels in F(b) − F(a).

      How do I choose u and dv for integration by parts?

      Pick u so that it gets simpler when differentiated and dv so that it can be integrated. The LIATE order — logarithms, inverse trigonometric, algebraic (powers of x), trigonometric, exponential — says which factor to take as u first. For ∫ x eˣ dx: u = x, dv = eˣ dx, so the answer is x eˣ − eˣ + C.

      What is an improper integral?

      An integral with an infinite limit, or one whose integrand blows up somewhere in the interval. It is defined as a limit: ∫₁^∞ dx/x² = lim (R → ∞) [−1/x] from 1 to R = 1. If the limit is infinite or does not exist, the integral diverges — ∫₁^∞ dx/x is the classic example.

      Why does the calculator say no closed form was found?

      Some functions, such as e^(−x²), sin x / x or xˣ, have no antiderivative that can be written with the usual functions; others are simply beyond the methods used. An answer is shown only if differentiating it gives the integrand back, so the calculator reports this instead of guessing. Definite integrals of such functions are still computed numerically.

      How accurate is the numerical value?

      The adaptive Gauss–Kronrod rule estimates its own error from the difference between the 21-point and 10-point rules and keeps subdividing until the estimate is tiny (about 10 significant digits or better for well-behaved functions). The estimate is shown, and the page warns when the requested accuracy was not reached.

      Why is ∫ from −1 to 1 of 1/x not 0?

      Because 1/x is not defined at 0 and ∫ from 0 to 1 of dx/x is already infinite, so the integral diverges. Plugging the limits into ln|x| gives 0 only because the two infinite halves cancel — that number is the Cauchy principal value, not the integral. The calculator finds the point where the antiderivative blows up and reports the divergence.

      Quick answers and tool search

      Type to search tools or to get a quick answer, for example 18% of 2500. Use the up and down arrow keys to move through the results, Enter to choose, and Escape to close.