The integral calculator finds the antiderivative of a function, also called the indefinite integral, and the definite integral between two limits. Type the function, and optionally a lower and upper limit, to get the answer in a moment. For example, the integral of x² + 3 cos(x) is x³/3 + 3 sin(x) + C, and the integral of x² from 0 to 3 is 9.
How to use the integral calculator
- Type your function using x, such as x^2, sin(3x) or x*e^x. Tap an example to try one.
- Pick the variable if your function uses t, y or u.
- Leave the limits empty for the antiderivative, or enter both limits for a definite integral. Limits can be numbers or expressions such as pi/2.
- Read the result. Indefinite integrals end with + C, the constant of integration.
Integration rules the calculator uses
- Power rule: the integral of xⁿ is xⁿ⁺¹/(n + 1) + C, for n ≠ −1. The integral of 1/x is ln|x| + C.
- Sum and constant multiple rules: integrate each term separately and keep constants in front.
- Linear substitution: for f(ax + b), integrate f and divide by a. So sin(3x) gives −cos(3x)/3.
- Substitution: when the derivative of an inner function appears as a factor, as in 2x cos(x²), the answer is sin(x²).
- Logarithm rule: a fraction whose top is a multiple of the bottom’s derivative integrates to a logarithm, as in 2x/(x² + 1).
- Integration by parts: a polynomial times eˣ, sin or cos, such as x·eˣ, gives x·eˣ − eˣ + C.
Common integrals
| Function | Integral |
|---|---|
| xⁿ | xⁿ⁺¹/(n + 1) + C |
| 1/x | ln|x| + C |
| eˣ | eˣ + C |
| sin(x) | −cos(x) + C |
| cos(x) | sin(x) + C |
| sec²(x) | tan(x) + C |
| 1/(1 + x²) | arctan(x) + C |
| ln(x) | x ln(x) − x + C |
Every answer is checked
Integration is harder than differentiation, and a rule applied in the wrong place gives a wrong answer. So after finding an antiderivative, the calculator differentiates it and compares the result with your function at several points. If they don’t match, it shows no formula rather than a wrong one. Some functions, such as e^(x²) and sin(x)/x, have no antiderivative made of ordinary functions at all, so the calculator says so; their definite integrals can still be worked out.
Definite integrals
A definite integral gives the signed area between the graph and the x-axis from the lower limit to the upper limit: area above the axis counts as positive and area below as negative. The calculator works it out with an adaptive numerical method, Simpson’s rule, which keeps splitting the interval until the answer is accurate to many decimal places. That means it works even when there’s no formula, such as the integral of e^(x²) from 0 to 1, which is about 1.46265. If the function shoots off to infinity inside the interval, as 1/x does at 0, the integral doesn’t exist and you’ll see a message saying so.
Worked examples
Power rule: the integral of 3x² + 2x + 1 is x³ + x² + x + C, because each term’s power goes up by one and is divided by the new power.
Definite integral: the integral of sin(x) from 0 to π is [−cos(x)] from 0 to π = −cos(π) + cos(0) = 1 + 1 = 2.
By parts: for x·eˣ, take u = x and dv = eˣ dx. Then the integral is x·eˣ − ∫eˣ dx = x·eˣ − eˣ + C.
Tips for typing functions
- Use ^ for powers and * or a space-free number for multiplication: 3x^2 or 3*x^2.
- Put function inputs in parentheses: sin(2x), not sin 2x.
- Use e^x or exp(x) for exponentials, and ln(x) for the natural log.
- Trig functions use radians, as in calculus.
Indefinite and definite integrals
An indefinite integral is a family of functions: every function whose derivative is the one you typed. That’s why the answer ends with + C, as adding any constant doesn’t change the derivative. A definite integral is a single number. By the fundamental theorem of calculus, it equals the antiderivative at the upper limit minus the antiderivative at the lower limit, so the + C cancels out. When the calculator finds a formula and you add limits, it shows both the antiderivative and the value.
What integrals are used for
- Area: the area under a curve between two points, such as the area of an irregular plot of land from a formula for its edge.
- Distance from speed: integrating a speed in miles per hour over a number of hours gives the distance traveled in miles.
- Totals from rates: water flowing in at a changing rate, or energy used from power over time.
- Averages: the average value of a function is its integral divided by the length of the interval.
- Probability: the chance of a value falling in a range is the integral of its probability density.
Common mistakes
- Forgetting + C on indefinite integrals.
- Using the power rule on 1/x. It gives division by zero; the answer is ln|x| instead.
- Ignoring the inner function. The integral of cos(2x) is sin(2x)/2, not sin(2x).
- Integrating across a break. The integral of 1/x² from −1 to 1 isn’t a number, because the function is infinite at 0.
To differentiate instead, use the derivative calculator, and see the area on a graph with the graphing calculator.
What next
Use this often? Add Integral to your Home screen.
Frequently asked questions
How does the integral calculator find an antiderivative?
It applies standard rules such as the power rule, substitution and integration by parts, then checks the answer by differentiating it.
What does + C mean?
It’s the constant of integration. Any constant has a derivative of 0, so every function has many antiderivatives that differ by a constant.
Can it do definite integrals without a formula?
Yes. Definite integrals are worked out numerically, so functions like e^(x²) still get an accurate value.
Why does it say the integral doesn’t exist?
The function becomes infinite between your limits, such as 1/x at 0, so the area isn’t a finite number.
Was this tool helpful?
What went wrong?
We only receive the reason you pick, never what you typed into the tool.
Thanks for your feedback.