Integral Calculator

Find antiderivatives of common functions with the rule used at each step, plus the constant of integration.

Integral Calculator

What Is an Integral?

Integration is the reverse of differentiation. Given a function f(x), an antiderivative (or indefinite integral) is a function F(x) whose derivative is f(x) — that is, F'(x) = f(x). Because the derivative of any constant is zero, antiderivatives are never unique: if F(x) works, so does F(x) + 7, or F(x) − 100. That's why every indefinite integral is written with a "+ C" at the end, representing an unknown constant.

Indefinite integrals show up whenever you need to undo a rate of change — reconstructing a position function from a velocity function, or a total-cost function from a marginal-cost function. They're also the computational backbone behind definite integrals, via the Fundamental Theorem of Calculus.

How to Use This Calculator

Type a function of x and click Integrate. The calculator applies standard integration rules — the power rule, constant multiple rule, sum rule, and known antiderivatives for trig, exponential, and logarithmic functions, including substitution for linear inner expressions like sin(2x+1) — and returns a simplified antiderivative with "+ C". It then graphs f(x) alongside the antiderivative F(x) so you can check a key visual fact: F(x) is increasing wherever f(x) is positive, and decreasing wherever f(x) is negative.

This tool covers sums, differences, and constant multiples of standard functions, along with basic linear-substitution patterns. It does not yet solve integration by parts or general trigonometric substitution — if it can't find a closed form, it will tell you, and you can still get a precise numeric value using the Definite Integral Calculator for a specific interval.

Common Integration Rules

FunctionAntiderivative
xⁿ (n ≠ −1)xn+1/(n+1) + C
1/xln|x| + C
eˣ + C
sin(x)−cos(x) + C
cos(x)sin(x) + C
c · f(x)c · ∫f(x)dx
f(x) ± g(x)∫f(x)dx ± ∫g(x)dx

Worked Example

Find ∫(3x² + 2x − 5) dx. Integrate term by term using the power rule and sum rule:

∫3x² dx = 3·(x³/3) = x³    ∫2x dx = 2·(x²/2) = x²    ∫−5 dx = −5x

Combining: ∫(3x² + 2x − 5) dx = x³ + x² − 5x + C. You can verify any antiderivative by differentiating it — d/dx[x³ + x² − 5x] = 3x² + 2x − 5, which matches the original function exactly.

Common Mistakes to Avoid

  • Forgetting "+ C". Every indefinite integral needs a constant of integration — omitting it is one of the most common lost-point mistakes on exams.
  • Applying the power rule to x⁻¹. ∫x⁻¹dx is not x⁰/0 (undefined) — it's the special case ln|x| + C.
  • Skipping the chain-rule adjustment in substitution. ∫sin(2x)dx is −cos(2x)/2, not −cos(2x) — the inner derivative (2) must divide the result.
  • Treating a product of two functions like a sum. ∫x·sin(x)dx cannot be split into ∫x dx times ∫sin(x) dx — products generally require integration by parts.

Real-World Applications of Integration

Indefinite integration is how you reconstruct a total quantity from a known rate of change. If v(t) is a velocity function, its antiderivative gives a position function (up to a constant representing the unknown starting position) — this is exactly the reverse of how derivatives turn position into velocity. The same pattern shows up whenever you know a rate and want the accumulated total: integrating a marginal cost function recovers a total cost function, integrating a flow rate recovers total volume, and integrating a population growth rate recovers a population size formula, in each case up to a constant that gets pinned down by one known data point (an initial condition).

Antiderivatives are also the essential first step for solving many differential equations, which describe an enormous range of physical, biological, and financial systems — from radioactive decay and Newton's law of cooling to compound interest and epidemic spread models. Even the simplest differential equations, like dy/dx = f(x), are solved by direct integration. In signal processing and control theory, integrators are physical or digital components that literally compute a running antiderivative of an incoming signal over time, used for tasks like accumulating error in a PID controller or converting an acceleration sensor's reading into an estimate of velocity.

Frequently Asked Questions

Why does my integral need "+ C"?

Because differentiation erases constants — the derivative of x² and x² + 5 are both 2x — so when reversing the process, any constant is possible. "+ C" represents that entire family of valid antiderivatives.

What's the difference between this and the Definite Integral Calculator?

This tool finds a general antiderivative formula (an indefinite integral). The Definite Integral Calculator evaluates the integral between two specific bounds, producing a single number (often representing an area) rather than a family of functions.

Why did the calculator say it couldn't find a closed-form antiderivative?

Some functions — including products of two non-constant functions, many trig/algebraic combinations, and functions like e−x² — either need integration techniques this tool doesn't yet implement (like integration by parts) or, in some cases, genuinely have no elementary closed-form antiderivative at all. If you need a numeric value over a specific interval, use the Definite Integral Calculator, which always returns an accurate numerical result.

Can I check my own integration answer with this tool?

Yes — a reliable way is to differentiate your answer using the Derivative Calculator and confirm it matches the original function you integrated. That's exactly how this calculator's own test suite verifies its integration rules.

Does the order of terms in the answer matter?

No — addition is commutative, so x³ + x² − 5x + C and −5x + x² + x³ + C represent the same antiderivative. This calculator generally lists terms starting with the highest power, matching common textbook convention, but any algebraically equivalent ordering is equally correct.

What integration techniques does this calculator support?

It covers the power rule, constant multiple rule, sum and difference rule, and direct antiderivatives of sine, cosine, exponential, natural log, tangent, and secant, including linear-substitution patterns like sin(ax+b) or e^(ax+b). It does not yet perform integration by parts, trigonometric substitution, or partial fraction decomposition — support for those techniques is planned for future tools.