Type to search, in English or Thai

  1. Home
  2. Tools
  3. Integral

// Tool · Integral Calculator

Integral Calculator: Indefinite and Definite Integrals, Checked by Differentiation

Type the integrand f(x)f(x) and get the antiderivative F(x)+CF(x) + C. Add limits aa and bb for the definite integral in exact and decimal form with a shaded graph. An answer is shown only if differentiating it gives back the original function.

By Ajarn ModUpdated

Calculator

How to use it

  • Type functions as in the derivative calculator: x^2*e^(3x), 1/(x^2+4), sin(x)^2.
  • Leave aa and bb empty for the indefinite integral only.
  • Limits can be expressions: pi/2, sqrt(2), e.
  • If there is no closed form (for example sin⁡xx\dfrac{\sin x}{x}), enter limits to get an accurate numerical value.

Integration techniques covered

TechniqueExampleResult
Basic formulas and linear substitution∫(3x+1)4dx\int (3x+1)^{4}dx115(3x+1)5+C\frac{1}{15}(3x+1)^{5} + C
Substitution u=g(x)u = g(x)∫xex2dx\int x e^{x^{2}}dx12ex2+C\frac{1}{2}e^{x^{2}} + C
Integration by parts∫xcos⁡x dx\int x\cos x\,dxxsin⁡x+cos⁡x+Cx\sin x + \cos x + C
Partial fractions∫dxx2−1\int \dfrac{dx}{x^{2}-1}12ln⁡∣x−1x+1∣+C\frac{1}{2}\ln\left|\dfrac{x-1}{x+1}\right| + C
Powers of trig functions∫sin⁡2x dx\int \sin^{2}x\,dxx2−14sin⁡2x+C\frac{x}{2} - \frac{1}{4}\sin 2x + C
Quadratics under a root∫1−x2 dx\int \sqrt{1-x^{2}}\,dx12x1−x2+12arcsin⁡x+C\frac{1}{2}x\sqrt{1-x^{2}} + \frac{1}{2}\arcsin x + C
Exponential times trig∫exsin⁡x dx\int e^{x}\sin x\,dx12ex(sin⁡x−cos⁡x)+C\frac{1}{2}e^{x}(\sin x - \cos x) + C

When these rules are not enough, the open-source computer algebra library nerdamer is called, and its result goes through the same check before it is shown.

The fundamental theorem of calculus

If F′(x)=f(x)F'(x) = f(x) and ff is continuous on [a,b][a, b], then

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

Example: ∫0πsin⁡x dx=[−cos⁡x]0π=1−(−1)=2\displaystyle\int_{0}^{\pi}\sin x\,dx = \left[-\cos x\right]_{0}^{\pi} = 1 - (-1) = 2. A definite integral is a signed area: parts below the xx-axis count as negative. For the true area use the area calculator.

Checks and caveats

The derivative of the F(x)F(x) found is compared numerically with f(x)f(x) at 10 points; if they differ, no answer is shown. For a definite integral both F(b)−F(a)F(b) - F(a) and a Gauss–Kronrod numerical value are computed. If they disagree (the antiderivative is discontinuous on the interval, or the function is undefined somewhere), the numerical value is shown with a warning. Divergent improper integrals are flagged as unreliable.

Frequently asked questions

Why is there a + C?

The derivative of a constant is zero, so functions that differ by a constant share a derivative. The general antiderivative therefore carries an arbitrary constant C.

My answer differs from the book. Is it wrong?

Two antiderivatives can differ by a constant: −¼cos 2x and ½sin²x are both right. The sure test is to differentiate the answer and see the integrand come back, which this calculator does for you.

Which functions have no closed form?

sin(x)/x, e^(x²), 1/ln(x) and √(1 + x³), among others, have no antiderivative in elementary functions. Their definite integrals can still be computed numerically.

How accurate is the numerical value?

Adaptive 15-point Gauss–Kronrod quadrature is typically correct to 10 or more digits for smooth functions, and an error estimate is shown.

More calculators