Integral calculusFree · No sign-up

Indefinite Integral Calculator

This indefinite integral calculator finds the antiderivative + C of a function with steps: it picks a method such as substitution, integration by parts or partial fractions, names it, and checks the answer by differentiating it back.

See the graph
  • u-substitution and integration by parts
  • Partial fractions and trig integrals
  • Every answer checked by its derivative
9
integration methods
100%
answers checked
9
ready-made examples
Antiderivative engine
f =
Preview
—Full solution ↓

Results

Your antiderivative, as a family of curves

The teal curve is F(x) + C. Its slope at the red tangent equals the height of the green integrand at the same x. Drag on the graph to move the point.

Interactive diagram

Antiderivative family and slope

f(x) integrandF(x) + C antiderivativetangent slope = f
x—
F(x) + C—
slope of F = f(x)—

Indefinite integral

Antiderivative

Step-by-step solution

—

    Step by step

    How to Use the Indefinite Integral Calculator

    To use the indefinite integral calculator, follow these 4 steps. The result and the graph update as you type.

    1. 1

      Type the integrand

      Use one variable, for example x^2*sin(x), 1/(x^2 - 1) or sin(t)^3.

    2. 2

      Read the antiderivative

      The answer ends in + C. The line below it shows the derivative check.

    3. 3

      Follow the method

      Each step names the rule: substitution, parts, partial fractions or a trig identity.

    4. 4

      Explore the family

      Move C to shift the curve up or down. Drag on the graph to compare the slope of F with f.

    Try an example:

    Definition

    What Is an Indefinite Integral?

    An indefinite integral is the family of all antiderivatives of a function: ∫ f(x) dx = F(x) + C, where F′(x) = f(x) and C is any constant. Integration runs differentiation backwards. Differentiating x³ gives 3x², so ∫ 3x² dx = x³ + C.

    The indefinite integral has 4 parts:

    • Integral sign ∫, with no upper and lower limits.
    • Integrand f(x): the function to integrate, such as x cos(x²).
    • Variable of integration dx: the variable F is built in.
    • Constant of integration C: any real number added to the antiderivative.

    A definite integral has limits and returns a number; an indefinite integral has no limits and returns a function. The 2 meet in the Fundamental Theorem of Calculus: ∫ₐᵇ f(x) dx = F(b) − F(a) for any F in the family.

    Hardware calculators handle the 2 differently. A TI-84 Plus and a Casio fx-991EX evaluate only definite integrals numerically; symbolic indefinite integrals need a computer algebra system (CAS), such as a TI-Nspire CAS, a Casio ClassPad, Wolfram Alpha or this online indefinite integral calculator.

    Differentiation and integration undo each other
    antiderivative
    differentiate ↓↑ integrate
    integrand
    Derivative and antiderivative pairs
    f(x)∫ f(x) dxcheck: (F + C)′

    Constant of integration

    Why Every Answer Has + C

    Every indefinite integral has + C since the derivative of a constant is 0, so infinitely many functions share the same derivative. x² + 1, x² − 7 and x² + π all have derivative 2x, and ∫ 2x dx = x² + C covers every one of them.

    Graphically, the antiderivatives of f are vertical shifts of one curve. They form a family of parallel curves: at each x, every member has the same slope f(x). The slope field on the right draws that slope as a short segment at each point, and each curve follows the segments.

    An initial condition picks one member of the family. For dy/dx = 2x with y(0) = 3, the general answer y = x² + C gives 3 = 0 + C, so C = 3 and y = x² + 3. Leaving out + C on a test usually costs a point, and in a differential equation it loses every other solution.

    On an interval broken by a gap, C can differ on each side. ∫ 1/x dx = ln|x| + C uses one constant for x > 0 and another for x < 0.

    Slope field explorer: pick C to choose one antiderivative

    Grey segments: the slope f(x) at each point. Faint curves: F(x) + C for C = −4 to 4. Bold curve: your C, which passes through (0, F(0) + C).

    Rules

    Basic Integration Rules

    There are 4 groups of basic integration rules: the power rule, exponential and logarithm rules, trigonometric integrals and inverse trigonometric results. 2 properties of indefinite integrals apply to all of them: the constant multiple rule, ∫ k f(x) dx = k ∫ f(x) dx, and the sum rule, ∫ (f + g) dx = ∫ f dx + ∫ g dx.

    01 · xⁿ

    Power rule

    The power rule says ∫ xⁿ dx = xⁿ⁺¹/(n + 1) + C for every n ≠ −1. Raise the exponent by 1 and divide by the new exponent. It covers roots and reciprocals: √x = x1/2 integrates to (2/3)x3/2.

    02 · eˣ and ln

    Exponential and logarithm rules

    The exponential function is its own antiderivative, ∫ eˣ dx = eˣ + C, and the case n = −1 of the power rule gives the natural log: ∫ (1/x) dx = ln|x| + C. For another base a, ∫ aˣ dx = aˣ/ln a + C. The log base e function integrates by parts: ∫ ln x dx = x ln x − x + C.

    03 · Trig

    Trigonometric integrals

    The 6 basic trigonometric integrals come from reversing the derivatives of sin, cos, tan, sec, csc and cot. ∫ cos x dx = sin x + C and ∫ sin x dx = −cos x + C; ∫ sec² x dx = tan x + C and ∫ sec x tan x dx = sec x + C. tan x and sec x integrate to logarithms.

    04 · Inverse trig

    Inverse trigonometric results

    Inverse trigonometric functions appear as answers to 2 algebraic integrands: ∫ dx/(1 + x²) = arctan x + C and ∫ dx/√(1 − x²) = arcsin x + C. Their scaled forms use a constant a > 0. The inverse hyperbolic functions answer the matching integrands with a plus sign under the root: ∫ dx/√(x² + 1) = arcsinh x + C.

    Techniques

    Integration Methods the Calculator Uses

    The calculator uses 5 integration methods beyond the basic rules: u-substitution, integration by parts, partial fractions, trig identities with reduction formulas, and completing the square. Each step in its solution names the method it applied.

    05 · Substitution rule

    u-Substitution

    u-Substitution, the Substitution (Change of Variable) Rule, replaces an inner function with u when its derivative appears in the integrand too. For ∫ x cos(x²) dx, set u = x², du = 2x dx, so x dx = du/2:

    06 · Products

    Integration by parts (LIATE)

    Integration by parts turns ∫ u dv into uv − ∫ v du, and the LIATE order picks u: Logarithmic, Inverse trig, Algebraic, Trigonometric, Exponential. The function earliest in the list becomes u. For ∫ x eˣ dx, u = x and dv = eˣ dx:

    07 · Rational functions

    Partial fractions

    Integration by partial fractions splits a rational function into simple fractions whose integrals are logarithms and arctangents. Factor the denominator, write one term per factor, and solve for the numerators:

    08 · sinⁿ and cosⁿ

    Trig identities and reduction formulas

    Trig identities rewrite sin² x, cos² x and higher exponents into forms the basic rules handle, and reduction formulas lower the exponent by 2 at each step. sin² x = (1 − cos 2x)/2 gives ∫ sin² x dx = x/2 − sin 2x/4 + C. The secant reduction formula gives:

    09 · Quadratics

    Completing the square

    Completing the square rewrites ax² + bx + c as a(x + h)² + k, which matches an arctan, arcsin or log formula. It replaces a trigonometric substitution for most integrands with a quadratic in the denominator or under a square root:

    Order of attack

    Which method to try first

    1. Simplify, then match the table of integrals.
    2. Look for an inner function and its derivative: substitution.
    3. A product of 2 function types: parts, with LIATE.
    4. A ratio of polynomials: partial fractions.
    5. Trig functions with exponents: identities or reduction formulas.
    6. A quadratic or √(quadratic): complete the square.

    Verification

    How to Check an Antiderivative by Differentiating

    To check an antiderivative, differentiate it: the result must equal the integrand. If d/dx [F(x)] = f(x), then ∫ f(x) dx = F(x) + C is correct. AnalyzeMath shows the check for ∫ (x² + 1) dx = x³/3 + x + C: the derivative of x³/3 + x is x² + 1.

    The check takes 3 steps:

    1. Differentiate F(x) with the power, product, quotient and chain rules.
    2. Simplify the derivative and the integrand into the same form.
    3. Compare the 2 at a few sample values of x, if the forms still look different.

    This calculator runs the check on every answer. It differentiates F symbolically and compares F′ with f at many points; an answer that fails is never shown. The checker on the right uses the same integration engine as the calculator: the dashed red F′ lands exactly on the green f.

    Derivative checker: F′ drawn on top of f
    largest |F′ − f|—
    method—

    Reference

    Table of Common Integrals

    The table of integrals below lists 20 common antiderivatives, grouped by function type. Add + C to each, and take a > 0.

    Table of common indefinite integrals
    TypeIntegralTypeIntegral
    xⁿReciprocal
    ExponentialBase a
    LogarithmSquare root
    SineCosine
    TangentCotangent
    SecantCosecant
    sec²csc²
    sec · tancsc · cot
    arctanarcsin
    Hyperbolicarcsinh

    Limits of the method

    Integrals With No Elementary Antiderivative

    Some integrals have no elementary antiderivative: no finite combination of polynomials, roots, exponentials, logarithms and trig functions differentiates to them. ∫ e−x² dx, ∫ sin x / x dx and ∫ sin(x²) dx are the best-known cases. Joseph Liouville proved this in the 1830s and 1840s; his theorem shows that no amount of algebra will produce a formula.

    These functions still have antiderivatives, since every continuous function does. Mathematicians gave the important ones names: the error function erf, the sine integral Si, the cosine integral Ci, the exponential integral Ei, the logarithmic integral li and the Fresnel integrals S and C. The calculator recognizes 7 of these integrands and writes the answer with the special function; for other non-elementary integrands it says so instead of guessing.

    For a number, add limits and use the Definite Integral Calculator, which evaluates such integrals numerically: ∫₀¹ e−x² dx ≈ 0.7468.

    Integrals with no elementary antiderivative
    IntegralAnswer with a special function
    Fresnel S

    Worked examples

    Worked Examples

    Here are 4 worked examples of indefinite integrals: parts used twice, partial fractions, an odd exponent of sine and a cyclic integral by parts. Each graph shows the integrand in green and the antiderivative with C = 0 in teal.

    parts × 2

    ∫ x² sin x dx (parts twice)

    1. First parts, u = x², dv = sin x dx:
    2. Second parts, u = 2x, dv = cos x dx:
    3. Combine:

    Answer:

    partial fractions

    ∫ 1/(x² − 1) dx (partial fractions)

    1. Factor:
    2. Split:
    3. Integrate each term:

    Answer:

    odd exponent

    ∫ sin³ x dx

    1. Keep one sin x:
    2. Substitute u = cos x, du = −sin x dx:
    3. Back to x:

    Answer: . The calculator's reduction-formula answer, −⅓ sin² x cos x − ⅔ cos x, is the same function.

    cyclic

    ∫ eˣ cos x dx (cyclic parts)

    1. Parts with u = cos x:
    2. Parts again with u = sin x:
    3. Solve for I:

    Answer:

    Terms

    Indefinite Integral vs Antiderivative

    An antiderivative is one function F with F′ = f, and the indefinite integral is the whole family F(x) + C. x³ is an antiderivative of 3x²; x³ + C is the indefinite integral.

    Antiderivative, indefinite integral and definite integral compared
    AntiderivativeIndefinite integralDefinite integral
    What it isone function F with F′ = fevery antiderivative, F(x) + Ca number, F(b) − F(a)
    NotationF(x)
    Example for 3x² or
    Constantone fixed valueC, any real numbercancels

    Most textbooks, including Calculus II courses, use "indefinite integral" and "antiderivative" loosely for the same answer; the + C is what separates the two strictly.

    Questions

    Frequently Asked Questions

    Is an indefinite integral the same as an antiderivative?

    No, not strictly: an indefinite integral is the whole family of antiderivatives F(x) + C, while an antiderivative is one member of that family. x³ and x³ + 5 are both antiderivatives of 3x²; the indefinite integral ∫ 3x² dx is x³ + C. Most courses use the 2 terms for the same answer, and the + C marks the difference.

    Why do two calculators give different-looking answers?

    Two calculators give different-looking answers when the answers differ by a constant or are the same function written another way. ∫ sin x cos x dx can come out as sin² x/2 + C, −cos² x/2 + C or −cos 2x/4 + C; each pair differs by a constant (1/2 or 1/4), so all 3 are correct. Differentiate both answers to compare: they must give the same integrand.

    Why does ln|x| have absolute value bars?

    ln|x| has absolute value bars since 1/x is defined for negative x, and ln x is not. The derivative of ln|x| is 1/x on both sides of 0: for x < 0, d/dx ln(−x) = (−1)/(−x) = 1/x. Without the bars, the antiderivative covers only x > 0.

    Can every function be integrated?

    No, not every function has an antiderivative written with elementary functions, but every continuous function has an antiderivative. e^(−x²), sin x / x and 1/ln x have no elementary antiderivative; their antiderivatives are named special functions such as erf, Si and li. A definite integral of any of them still has a numeric value.

    What does C stand for?

    C stands for the constant of integration, an arbitrary real number added to every antiderivative. The derivative of any constant is 0, so F(x) + C has derivative f(x) for every C. An initial condition fixes it: for F′(x) = 2x with F(0) = 3, F(x) = x² + 3.

    Which integration method should I try first?

    Try the basic table of integrals first, then u-substitution, then integration by parts, then partial fractions for rational functions, then trig identities. Simplify before each step. Look for an inner function whose derivative appears in the integrand before trying anything harder; ∫ x cos(x²) dx falls to substitution in 1 line.

    This indefinite integral calculator finds the antiderivative + C with steps, names each integration method, checks the answer by differentiation and graphs the family of antiderivatives.