Integral Calculator

Use this Integral Calculator to enter values, adjust options, and review results in a compact responsive workspace.

Results are calculated automatically as you enter data.

Supports constants, integer powers, sin(x), cos(x), e^x, c/x, and sums or differences of up to 64 terms.

Antiderivative

▼ See explanations and tips below ▼

What Are Antiderivatives and Definite Integrals?

Integration is one of the two central ideas in introductory calculus. It is closely connected to differentiation, but it answers a different kind of question.

An antiderivative reverses differentiation. If differentiating \(F(x)\) gives \(f(x)\), then \(F(x)\) is an antiderivative of \(f(x)\):

$$ F'(x)=f(x) $$

An indefinite integral represents the whole family of antiderivatives of a function:

$$ \int f(x)\,dx = F(x)+C $$

The \(+C\) appears because many functions can have the same derivative. For example, \(x^2\), \(x^2+5\), and \(x^2-100\) all have derivative \(2x\).

A definite integral uses lower and upper bounds to produce a number:

$$ \int_a^b f(x)\,dx $$

This number can describe accumulated change, net area, total quantity, or another accumulation over the interval from \(a\) to \(b\). When the graph is above the x-axis, the contribution is positive. When the graph is below the x-axis, the contribution is negative.


Why Integration Matters

Integration helps turn a rate into a total. That is why it appears in many areas of math, science, engineering, economics, and data analysis.

For example:

  • If velocity tells you how fast position is changing, an integral can give displacement.
  • If a growth rate tells you how fast a population is changing, an integral can give total growth.
  • If a curve forms the top of a region, a definite integral can describe the signed area between the curve and the x-axis.
  • If a function is made from simple terms, antiderivative rules let you build a new function whose derivative returns the original one.

For students, integration is also important because it connects several ideas: functions, graphs, derivatives, area, accumulation, and algebraic rules.


Key Terms to Know

  • Function: A rule that assigns an output value to each input value, such as \(f(x)=3x^2-4x+5\).
  • Integrand: The function being integrated. In \(\int f(x)\,dx\), the integrand is \(f(x)\).
  • Variable of integration: The variable used in the integral. In \(\int f(x)\,dx\), the variable of integration is \(x\).
  • Antiderivative: A function whose derivative equals the original function.
  • Indefinite integral: A family of antiderivatives, usually written with \(+C\).
  • Definite integral: A number found by integrating over an interval with a lower bound and an upper bound.
  • Lower and upper bounds: The starting and ending x-values of a definite integral.
  • Signed area: Area above the x-axis counts as positive, while area below the x-axis counts as negative.
  • Improper integral: An integral involving an infinite bound or a discontinuity inside the interval. These require special limit methods and are not the same as ordinary definite integrals.

How Integration Works

For many introductory functions, integration is done by matching each term to a known antiderivative rule. When a function is a sum or difference of supported terms, each term can be integrated separately.

In general:

$$ \int \left(f(x)+g(x)\right)\,dx=\int f(x)\,dx+\int g(x)\,dx $$

and

$$ \int c f(x)\,dx=c\int f(x)\,dx $$

where \(c\) is a constant.

Here are the basic rules used for common single-variable terms:

Term type Antiderivative rule
Constant \(c\) \(\int c\,dx=cx+C\)
Power \(c x^n\), where \(n\ne -1\) \(\int c x^n\,dx=\frac{c}{n+1}x^{n+1}+C\)
Reciprocal \(c x^{-1}\) or \(\frac{c}{x}\) \(\int \frac{c}{x}\,dx=c\ln|x|+C\)
Sine \(c\sin(x)\) \(\int c\sin(x)\,dx=-c\cos(x)+C\)
Cosine \(c\cos(x)\) \(\int c\cos(x)\,dx=c\sin(x)+C\)
Exponential \(c e^x\) \(\int c e^x\,dx=c e^x+C\)

The power rule has an important exception. When \(n=-1\), the formula would require division by zero because \(n+1=0\). That is why \(x^{-1}\), which is the same as \(\frac{1}{x}\), uses the natural logarithm rule instead.

For a definite integral, the Fundamental Theorem of Calculus connects the integral to an antiderivative. If \(F(x)\) is an antiderivative of \(f(x)\), then:

$$ \int_a^b f(x)\,dx=F(b)-F(a) $$

This means you first find an antiderivative, then subtract the value at the lower bound from the value at the upper bound.

Changing the order of the bounds changes the sign:

$$ \int_b^a f(x)\,dx=-\int_a^b f(x)\,dx $$

Examples of Integration in Practice

Example 1: A Polynomial Antiderivative

Suppose:

$$ f(x)=3x^2-4x+5 $$

Integrate term by term:

$$ \int 3x^2\,dx=x^3 $$
$$ \int -4x\,dx=-2x^2 $$
$$ \int 5\,dx=5x $$

So the indefinite integral is:

$$ \int (3x^2-4x+5)\,dx=x^3-2x^2+5x+C $$

If the bounds are \(0\) and \(2\), use \(F(2)-F(0)\):

$$ F(x)=x^3-2x^2+5x $$
$$ F(2)-F(0)=\left(2^3-2(2^2)+5(2)\right)-0 $$
$$ F(2)-F(0)=8-8+10=10 $$

The signed definite value is \(10\).


Example 2: A Trigonometric Integral

Suppose:

$$ f(x)=\sin(x)+2\cos(x) $$

Use the sine and cosine antiderivative rules:

$$ \int \sin(x)\,dx=-\cos(x)+C $$
$$ \int 2\cos(x)\,dx=2\sin(x)+C $$

So:

$$ F(x)=-\cos(x)+2\sin(x) $$

From \(0\) to \(\pi\):

$$ \int_0^\pi \left(\sin(x)+2\cos(x)\right)\,dx=F(\pi)-F(0) $$
$$ F(\pi)-F(0)=\left[-\cos(\pi)+2\sin(\pi)\right]-\left[-\cos(0)+2\sin(0)\right] $$
$$ F(\pi)-F(0)=1-(-1)=2 $$

For calculator input, use a decimal approximation such as \(3.14159\) for \(\pi\) when entering numeric bounds.


Example 3: A Reciprocal Function and a Zero-Crossing Issue

The reciprocal function has a special antiderivative:

$$ \int \frac{1}{x}\,dx=\ln|x|+C $$

For the interval from \(1\) to \(2\):

$$ \int_1^2 \frac{1}{x}\,dx=\ln|2|-\ln|1| $$
$$ \int_1^2 \frac{1}{x}\,dx=\ln 2 \approx 0.6931471806 $$

But an interval such as \([-1,1]\) is not an ordinary definite integral for \(\frac{1}{x}\), because the function is undefined at \(x=0\). This kind of situation requires improper-integral methods, not the basic endpoint-subtraction process.


How to Interpret the Result

The main antiderivative result tells you a function whose derivative gives back the entered function. A good way to check an antiderivative is to differentiate it.

For an indefinite integral, the \(+C\) means the answer represents a family of functions. The calculator shows \(+C\) because without bounds, there is no single numerical value.

For a definite integral, the result is a signed value:

  • A positive value means the positive contribution is larger than the negative contribution over the interval.
  • A negative value means the negative contribution is larger.
  • A value of \(0\) can mean the function is zero everywhere, but it can also mean positive and negative regions cancel out.
  • Reversed bounds change the sign because the result is computed as \(F(\text{upper})-F(\text{lower})\).

The graph preview helps visualize the function and the bounded interval, but the definite value is based on the antiderivative calculation, not on estimating the shaded region from the graph. The shaded region should be understood as signed accumulation, not always as total geometric area.

For sine and cosine, numeric input values are interpreted in radians. For example, an input near \(3.14159\) represents an angle near \(\pi\) radians, not \(3.14159^\circ\).


Common Mistakes and Misconceptions

  • Entering an equation instead of an expression: Enter \(3x^2-4x+5\), not \(f(x)=3x^2-4x+5\) or \(y=3x^2-4x+5\).
  • Expecting every function to work: Basic rule-based integration covers common forms, but not every expression has a simple supported antiderivative.
  • Using only one bound: A definite integral needs both a finite lower bound and a finite upper bound.
  • Typing symbolic bounds: Use finite numbers for bounds. For example, enter \(3.14159\) instead of \(\pi\) or pi.
  • Using degrees for trigonometric inputs: Sine and cosine calculations use radians.
  • Crossing \(x=0\) with \(\frac{1}{x}\) or negative powers: These functions can be undefined at zero, so ordinary definite evaluation is not appropriate across that point.
  • Confusing signed area with total area: A definite integral can be negative, and positive and negative regions can cancel.
  • Rounding too early: Keep intermediate values as exact as possible when checking by hand, then round the final result.

When to Use Integration

Use integration when you need to:

  • Find an antiderivative of a simple single-variable function.
  • Evaluate the signed accumulation of a function across an interval.
  • Connect a rate of change to total change.
  • Find a net area or displacement-style result.
  • Practice common introductory calculus rules.
  • Check whether a basic antiderivative rule applies to each term in an expression.

Limitations and Things to Keep in Mind

This calculator is designed for common introductory forms. It supports expressions built from constants, integer powers of \(x\), \(\sin(x)\), \(\cos(x)\), \(e^x\), \(\frac{c}{x}\), and sums or differences of those supported terms. Reciprocal terms can be entered as 2/x or 2x^-1.

It does not behave like a full computer algebra system. In particular, it does not generally support products, quotients, nested functions, chain-rule forms, fractional powers written as unsupported syntax, symbolic bounds, infinite bounds, piecewise functions, or unsupported functions such as \(\tan(x)\), \(\ln(x)\), \(\log(x)\), \(\sqrt{x}\), \(\sin(2x)\), or \(e^{kx}\).

For definite integrals, both bounds must be finite numbers. Entering only one bound produces a validation error. Bounds that touch or cross zero are not evaluated for \(\frac{1}{x}\) or negative powers that are singular at zero.

Symbolic coefficients are kept as exact reduced fractions. Definite values may be rounded to 10 decimal places, while very large or very small finite values may use scientific notation. Expressions are limited to 512 characters and 64 terms, and integer exponents must be from \(-10000\) through \(10000\).

The graph is a sampled visual preview, not the source of the definite value. Singular reciprocal and negative-power branches are drawn as separate paths so the graph does not connect through \(x=0\).

For coursework or important calculations, use the result as a helpful check, but still understand the rule being applied and verify the answer when accuracy matters.


How to Use This Calculator

  1. Enter a supported expression in \(x\), such as \(3x^2-4x+5\), \(\sin(x)+2\cos(x)\), \(e^x\), or \(2/x\).
  2. Leave the lower and upper bound fields blank to find an indefinite antiderivative with \(+C\).
  3. Enter both a finite lower bound and a finite upper bound to calculate a signed definite value.
  4. Review the antiderivative, rules used, definite-value card, input echo, and graph preview.
  5. Use the example buttons to load sample polynomial or trigonometric inputs.
  6. Use the clear button to reset the fields.
  7. Use the graph download option if you want to save the rendered graph preview as a PNG.

Frequently Asked Questions

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

An indefinite integral gives a family of antiderivatives and includes \(+C\). A definite integral has lower and upper bounds and gives a number. The definite value is found by evaluating an antiderivative at the endpoints and subtracting.


Why does the answer include \(+C\)?

The \(+C\) represents an arbitrary constant. Since constants disappear when differentiated, functions that differ only by a constant can all have the same derivative. Without bounds or an initial condition, there is no way to choose one specific constant.


Why is the integral of \(\frac{1}{x}\) equal to \(\ln|x|+C\)?

The derivative of \(\ln|x|\) is \(\frac{1}{x}\) wherever \(x\ne 0\). The absolute value allows the antiderivative rule to work on intervals where \(x\) is positive or negative. The rule still does not make \(\frac{1}{x}\) defined at \(x=0\).


Why did my trigonometric definite integral not match my degree-based calculation?

The calculator treats trigonometric inputs as radians. A bound of \(180\) means \(180\) radians, not \(180^\circ\). To represent \(\pi\) radians, enter a decimal approximation such as \(3.14159\).


Can the definite integral be negative?

Yes. A definite integral is signed accumulation. Regions below the x-axis contribute negative values, so the final result can be negative even though geometric area is always nonnegative.


Why does entering only one bound not give a definite value?

A definite integral needs a complete interval. That means both a lower bound and an upper bound must be present and finite. Leave both bounds blank for an indefinite integral; if exactly one is missing, the calculator shows a validation error instead of discarding the entered bound.


Sources and References

Books

  1. Gilbert Strang and Edwin “Jed” Herman. Calculus Volume 1. OpenStax, 2016. Relevant sections: 4.10 Antiderivatives; 5.2 The Definite Integral; 5.3 The Fundamental Theorem of Calculus; 5.6 Integrals Involving Exponential and Logarithmic Functions. https://openstax.org/books/calculus-volume-1/pages/1-introduction
  2. Matthew Boelkins, David Austin, Christina Safranski, and Steven Schlicker. Active Calculus: Single Variable, 2nd Edition. Grand Valley State University Libraries, 2025. Relevant sections: Chapter 5, especially the Fundamental Theorem of Calculus and antiderivatives. https://scholarworks.gvsu.edu/books/34/
  3. Jay Abramson. Precalculus 2e. OpenStax, 2021. Relevant section: 5.2 Unit Circle: Sine and Cosine Functions. https://openstax.org/books/precalculus-2e/pages/5-2-unit-circle-sine-and-cosine-functions