integral calculator
Integration reverses differentiation: the integral of f(x) is a function whose derivative is f(x), plus a constant C. Type a function to see which method works — standard integrals, substitution, integration by parts or partial fractions — and every answer is checked by differentiating it.
Enter solves · Shift+Enter for a new line · put systems on separate lines or separate them with commas
✓ checked: differentiating the answer gives back the original function (tested at several points).
step-by-step working
Integration by parts: ∫u dv = u·v − ∫v du, with u = x and dv = e^x dx. Then du = dx and v = e^x.
∫ x·e^x dx = x·e^x − ∫ e^x dxStandard integral: ∫eᵘ du = eᵘ.
∫ e^x dx = e^xPut the pieces together.
∫ x·e^x dx = x·e^x − e^xAdd the constant of integration C (any constant differentiates to 0).
Methods it uses
- Linearity: split sums into separate integrals and move constants outside.
- Power rule: ∫xⁿ dx = xⁿ⁺¹/(n + 1) for n ≠ −1, and ∫1/x dx = ln|x|.
- Standard integrals for eˣ, aˣ, sin, cos, sec², 1/(1 + x²) and 1/√(1 − x²), including a linear inside like cos(3x + 1).
- Substitution (u-substitution) when the integrand contains a function and its derivative, like 2x·cos(x²).
- Integration by parts, ∫u dv = uv − ∫v du, for products like x·eˣ, x·sin(x) and ln(x).
- Identities such as sin²(x) = (1 − cos 2x)/2 and tan²(x) = sec²(x) − 1.
- Partial fractions for rational functions like 1/(x² − 1).
Worked examples
∫ (3x² + 2x − 5) dx
✓ checked: differentiating the answer gives back the original function (tested at several points).
step-by-step working
Integrate term by term (the integral of a sum is the sum of the integrals).
Move the constant 3 outside the integral.
∫ 3x² dx = 3·∫ x² dxPower rule: ∫uⁿ du = uⁿ⁺¹/(n + 1) with n = 2.
∫ x² dx = x³/3Move the constant 2 outside the integral.
∫ 2x dx = 2·∫ x dxPower rule: ∫x dx = x²/2.
∫ x dx = x²/2The integral of a constant k is k·x.
∫ −5 dx = −5xAdd the constant of integration C (any constant differentiates to 0).
∫ x·cos(x) dx
✓ checked: differentiating the answer gives back the original function (tested at several points).
step-by-step working
Integration by parts: ∫u dv = u·v − ∫v du, with u = x and dv = cos(x) dx. Then du = dx and v = sin(x).
∫ x·cos(x) dx = x·sin(x) − ∫ sin(x) dxStandard integral: ∫sin(u) du = −cos(u).
∫ sin(x) dx = −cos(x)Put the pieces together.
∫ x·cos(x) dx = x·sin(x) + cos(x)Add the constant of integration C (any constant differentiates to 0).
∫ 2x/(x² + 1) dx
✓ checked: differentiating the answer gives back the original function (tested at several points).
step-by-step working
Move the constant 2 outside the integral.
∫ 2x/(x² + 1) dx = 2·∫ x/(x² + 1) dxThe top is 1/2 times the derivative of the bottom, so ∫f′/f dx = ln|f|.
∫ x/(x² + 1) dx = ln(x² + 1)/2Add the constant of integration C (any constant differentiates to 0).
Definite integrals
Type limits with from and to, for example "integrate x^2 from 0 to 1". The solver finds the antiderivative F, works out F(upper) − F(lower) exactly, and compares it with a numerical estimate (Simpson's rule). If the function blows up between the limits, it tells you the integral is improper instead of giving a misleading number.
When there are no steps
Some integrals need techniques the step-by-step engine doesn't cover. In that case a larger algebra library may find the answer; you'll see it marked "steps not available", still checked by differentiating. A few functions, such as e^(x²) and sin(x)/x, have no antiderivative made of ordinary functions at all.
Common mistakes
- Forgetting + C on an indefinite integral.
- Using the power rule on 1/x: x⁻¹ would give x⁰/0. The integral of 1/x is ln|x|.
- Forgetting to divide by the inside's derivative: ∫cos(3x) dx = sin(3x)/3.
- Integrating a product factor by factor: ∫x·eˣ dx is not (x²/2)·eˣ.
Common integrals, worked out
- integral of ln(x)
- integral of 1/x
- integral of e^x
- integral of sin(x)
- integral of cos(x)
- integral of tan(x)
- integral of sec²(x)
- integral of x·e^x
- integral of x·sin(x)
- integral of x·cos(x)
- integral of sin²(x)
- integral of cos²(x)
- integral of 1/(1 + x²)
- integral of 1/√(1 − x²)
- integral of √x
- integral of x²
- integral of 1/x²
- integral of e^(2x)
- integral of 2^x
- integral of x·ln(x)
- integral of sec(x)
- integral of tan²(x)
- integral of cot(x)
- integral of csc²(x)
- integral of sin(x)·cos(x)
- integral of arctan(x)
- integral of 1/(x² − 1)
- integral of ln(x)/x
- integral of e^(−x)
Frequently asked questions
How do I type an integral?
Start with integrate or ∫, or pick the integral mode, then type the function. A trailing dx is optional. For a definite integral add from a to b, e.g. integrate sin(x) from 0 to pi.
How do I know the answer is right?
Differentiate it: you should get back the function you started with. The solver does exactly that at several test points before showing the answer.
Why is there an absolute value in ln|x|?
ln(x) only exists for positive x, but 1/x is defined for negative x too. ln|x| works on both sides, and its derivative is 1/x everywhere except 0.
Why might my answer differ from another calculator's?
Antiderivatives can differ by a constant, and identities can change their look: −cos²(x)/2 and sin²(x)/2 differ only by a constant, so both are correct.