Navigation

Free calculus tool

Integral Calculator

Get integrals, with the steps to get there.

Integral calculator

Integrand

Blank for an indefinite integral. inf, pi/2 and e all work.

Powers with ^, and sqrt( ), sin( ), ln( ), e^x, pi. Times signs optional.

xex\displaystyle xe^{x}

Try one

What you can type

The input reads ordinary calculator notation, the same as the derivative calculator. Multiplication signs are optional, brackets can be round, square or curly, and every function below accepts its argument with or without parentheses.

Accepted notation, the spellings that work, and how each one renders.
NotationType it asRenders as
Powersx^3x**3x³x3\displaystyle x^{3}
Implicit multiplication2x sin(x)2*x*sin(x)2xsin⁡(x)\displaystyle 2x\sin\left(x\right)
Division(x + 1)/(x - 1)x+1x−1\displaystyle \frac{x + 1}{x - 1}
Rootssqrt(x)cbrt(x)x^(1/2)x\displaystyle \sqrt{x}
Exponentialse^(2x)exp(2x)2^xe2x\displaystyle e^{2x}
Natural logarithmln(x)ln⁡(x)\displaystyle \ln\left(x\right)
Trigonometrysin(x)cos 2xtan(x)sec(x)csc(x)cot(x)sin⁡(x)\displaystyle \sin\left(x\right)
Powers of functionssin^2(x)sin(x)^2sin⁡2(x)\displaystyle \sin^{2}\left(x\right)
Inverse trigonometryarctan(x)atan(x)arcsin(x)arctan⁡(x)\displaystyle \arctan\left(x\right)
Absolute value|x|abs(x)∣x∣\displaystyle \left|x\right|
Constantspieπ\displaystyle \pi
Greek variablestheta^2sin(alpha)θ2\displaystyle \theta^{2}

An indefinite integral carries + C. An indefinite integral is a whole family of functions, not one: any two antiderivatives of the same function differ by a constant, so the C is part of the answer rather than a decoration on it. A definite integral does not: the constant cancels in the subtraction, which is why filling in the From and To boxes makes it disappear.

Any single letter is a variable, and so is a spelled-out Greek name like theta. When an expression contains more than one, choose which to integrate with respect to; the rest are treated as constants.

The techniques it uses

Integration is a search, not a procedure: unlike differentiating, there is no single rule that always applies, so the calculator tries techniques in the order a student would. Each step says which one it used.

Linearity

∫[af(x)+bg(x)]dx=a∫f(x) dx+b∫g(x) dx\displaystyle \int \left[a f(x) + b g(x)\right] dx = a\int f(x)\,dx + b\int g(x)\,dx

Term by term, with constants pulled out front. Tried first, because it turns one integral into several simpler ones.

Power rule

∫xn dx=xn+1n+1(n≠−1)\displaystyle \int x^{n}\,dx = \frac{x^{n+1}}{n+1} \quad (n \neq -1)

Any constant exponent except -1, where dividing by n + 1 would divide by zero. That one case gives a logarithm instead.

The n = -1 case

∫1x dx=ln⁡∣x∣\displaystyle \int \frac{1}{x}\,dx = \ln\left|x\right|

The absolute value matters: 1/x is defined for negative x too, and ln x alone would not be.

Substitution

∫f(g(x)) g′(x) dx=∫f(u) du\displaystyle \int f(g(x))\,g'(x)\,dx = \int f(u)\,du

The chain rule run backwards. Found by trying each subexpression as u and checking whether the integrand divided by u' comes out in terms of u alone.

Integration by parts

∫u dv=uv−∫v du\displaystyle \int u\,dv = uv - \int v\,du

For a product of unlike things. u is chosen by LIATE — logarithm, inverse trig, algebraic, trig, exponential — so what is left to integrate is simpler.

Partial fractions

1x2−1=1/2x−1−1/2x+1\displaystyle \frac{1}{x^{2}-1} = \frac{1/2}{x-1} - \frac{1/2}{x+1}

For a ratio of polynomials. The bottom is factored and the fraction split, which turns one hard integral into a sum of logarithms and arctangents.

Completing the square

∫dxx2+2x+5=ln⁡∣x+1+x2+2x+5∣\displaystyle \int \frac{dx}{\sqrt{x^{2}+2x+5}} = \ln\left|x + 1 + \sqrt{x^{2}+2x+5}\right|

Turns any quadratic under a root or a fraction into a standard form, which is what makes one rule cover a whole family.

The fundamental theorem

∫abf(x) dx=F(b)−F(a)\displaystyle \int_{a}^{b} f(x)\,dx = F(b) - F(a)

For a definite integral, once an antiderivative is in hand. It needs the integrand to be continuous between the limits, and the calculator checks that before it subtracts.

Power reduction

∫sin⁡2x dx=x2−sin⁡2x4\displaystyle \int \sin^{2} x\,dx = \frac{x}{2} - \frac{\sin 2x}{4}

Double-angle and Pythagorean identities, for powers of sine, cosine and tangent that no substitution touches.

Not every function has an elementary antiderivative. e^(x^2), sin(x)/x and sqrt(1 + x^3) have none at all — that is a theorem, not a gap in this calculator — so when it says it cannot find one, that is sometimes the true answer. Differentiating always works; integrating does not.

Elementary antiderivatives

And the elementary antiderivatives it composes with them. Each one also works with a function of x inside, once substitution has dealt with the inner derivative:

  • ∫sin⁡x dx=−cos⁡x\displaystyle \int \sin x\,dx = -\cos x
  • ∫cos⁡x dx=sin⁡x\displaystyle \int \cos x\,dx = \sin x
  • ∫sec⁡2x dx=tan⁡x\displaystyle \int \sec^{2} x\,dx = \tan x
  • ∫sec⁡xtan⁡x dx=sec⁡x\displaystyle \int \sec x \tan x\,dx = \sec x
  • ∫tan⁡x dx=−ln⁡∣cos⁡x∣\displaystyle \int \tan x\,dx = -\ln\left|\cos x\right|
  • ∫sec⁡x dx=ln⁡∣sec⁡x+tan⁡x∣\displaystyle \int \sec x\,dx = \ln\left|\sec x + \tan x\right|
  • ∫ex dx=ex\displaystyle \int e^{x}\,dx = e^{x}
  • ∫ax dx=axln⁡a\displaystyle \int a^{x}\,dx = \frac{a^{x}}{\ln a}
  • ∫ln⁡x dx=xln⁡x−x\displaystyle \int \ln x\,dx = x\ln x - x
  • ∫dx1+x2=arctan⁡x\displaystyle \int \frac{dx}{1+x^{2}} = \arctan x
  • ∫dx1−x2=arcsin⁡x\displaystyle \int \frac{dx}{\sqrt{1-x^{2}}} = \arcsin x
  • ∫∣x∣ dx=x∣x∣2\displaystyle \int \left|x\right|\,dx = \frac{x\left|x\right|}{2}

Questions

Why is there always a + C?

Because an indefinite integral is a family of functions rather than one function. Differentiating kills a constant, so every antiderivative of the same integrand differs from the others only by one, and the C stands for all of them at once. Leaving it off is the single most common way to lose a mark on an integration question.

Does it show the steps?

Yes. Open "Show the steps" under any result and you get one line per technique, naming it and showing what the integral becomes. A substitution line says what u and du are, an integration by parts line says what u and dv are, and a partial fractions line shows the decomposition before it is integrated.

Why does it sometimes say it cannot do one?

Two different reasons. Some integrands have no elementary antiderivative at all — e to the x squared and sin x over x are the standard examples, and that is a theorem rather than a limitation. Others need a technique this calculator does not cover, such as trigonometric substitution or the Weierstrass substitution. Either way it says so instead of guessing.

How do I know the answer is right?

Because it was checked before you saw it. Every candidate antiderivative is differentiated and compared against what you typed, at several values, and anything that does not match is not shown. You can do the same check by hand, and on an exam you should: differentiating your answer is the fastest way to catch a slip.

Why does my answer look different from the calculator's?

Two antiderivatives can differ by a constant and still both be right, so your version and this one may simply have absorbed a different constant into C. They can also be algebraically different but equal: sin squared x over 2 and minus cos squared x over 2 differ by a constant, and the two halves of a partial fraction answer can be combined into a single logarithm. If you are unsure, differentiate both.

How do I get a definite integral?

Fill in the From and To boxes. Leave both blank and you get the indefinite integral with its + C, which is the default. A definite integral shows the exact value where there is one, the decimal beside it, and the antiderivative it came from, since that is the working you would hand in.

Can the limits be infinite?

Yes. Type inf, or -inf, or the words infinity and minus infinity, in either box. That makes the integral improper, and the answer is a limit rather than a substitution: the antiderivative is followed out as far as it goes and the value it settles on is the answer. Improper integrals get a decimal rather than an exact form, and one that does not settle is reported as divergent instead of being given a number.

What happens when an integral diverges?

You get that as the answer, because it is one. An integral that grows without bound is reported as plus or minus infinity, with the sign, since that is what goes on the line. One that never settles at all is reported as diverging with DNE in brackets, which is the notation a marking scheme wants: the integral of cosine from zero to infinity is the standard example, because the antiderivative oscillates forever instead of approaching anything.

What about a function that blows up between the limits?

The integral is split at that point and each side is approached on its own, because the fundamental theorem needs the integrand to be continuous across the whole interval and substituting straight through gives nonsense. The integral of 1 over x squared from minus one to one is the standard trap: substituting gives minus two, and the truth is that both halves run off to plus infinity, so the integral diverges to plus infinity. The integral of 1 over x over the same interval is subtler, because the two halves run off in opposite directions and cancel nothing, so it has no value at all.

Is anything I type stored or sent anywhere?

No. The parser, the integration techniques and the check that verifies the answer are all JavaScript running in your browser, with no request to any server. Nothing you type is stored, logged or sent, and the page works with your connection off once it has loaded.

Integration is where calculus gets hard

Differentiating is a procedure you can follow. Integrating is a search: the work is recognising which technique a problem wants, and that is what practice with someone watching actually builds. We tutor UBC and SFU integral calculus and BC Calculus 12 one-on-one, starting from the problem in front of you.