Free tool · Math and study
Integral calculator
Type a function of x into this integral calculator and read its integral. For 3x^2 + 2x + 1 between 0 and 2 the answer is 14, found from the antiderivative x^3 + x^2 + x and checked against a numeric sum.
- Free
- No sign-up
- Runs in your browser
14the integral of 3x^2 + 2x + 1 dx
- Closed form checked numerically
- From 0 to 2
- Antiderivative
- F(x) = x^3 + x^2 + x + C
- F(2) − F(0)
- 14 − 0
| x | Function value | Antiderivative value |
|---|---|---|
| 0 | 1 | 0 |
| 0.5 | 2.75 | 0.875 |
| 1 | 6 | 3 |
| 1.5 | 10.75 | 7.125 |
| 2 | 17 | 14 |
How to use the Integral Calculator
- Type the Function f(x), for example 3x^2 + 2x + 1 or sin(2x).
- Leave both bounds empty to get the antiderivative, or fill in the Lower bound and Upper bound for a definite integral.
- Read the value, the antiderivative F(x) and the table of f(x) and F(x) at five points between the bounds.
- If the message says the function is outside the rules, add bounds to get the numeric value.
How does an integral calculator find the antiderivative?
An antiderivative of f(x) is a function F(x) whose derivative is f(x). The page applies a short list of rules to each term of the function and adds the results. A power x^n becomes x^(n+1) divided by n+1, so 3x^2 + 2x + 1 turns into x^3 + x^2 + x: 3x^2 gives x^3, 2x gives x^2 and 1 gives x. Because the derivative of any constant is zero, the full answer carries a + C for an unknown constant.
A linear expression inside a function changes the result by a factor. For sin(2x), the antiderivative is minus cos(2x) divided by 2, since the derivative of cos(2x) brings out a factor of 2 that has to be divided away. The same idea handles exponentials, logarithms and square roots, as the table shows.
| f(x) | Antiderivative |
|---|---|
| 5 | 5x + C |
| x^3 | x^4/4 + C |
| 1/x | ln|x| + C |
| (2x+1)^3 | (2x + 1)^4/8 + C |
| sqrt(x) | 2x^(3/2)/3 + C |
| e^(3x) | e^(3x)/3 + C |
| 2^x | 2^x/ln(2) + C |
| sin(2x) | -cos(2x)/2 + C |
| cos(x) | sin(x) + C |
| ln(x) | x*ln(x) - x + C |
How do I find a definite integral and the area under a curve?
A definite integral from a to b is F(b) minus F(a). For 3x^2 + 2x + 1 from 0 to 2, F(2) is 14 and F(0) is 0, so the value is 14. The same figure comes out of an independent numeric sum, which the page runs every time and compares with the exact result before showing it.
The value is a signed area. Where the function lies below the x axis it counts as negative: sin(x) from 0 to pi gives 2, while cos(x) from 0 to pi gives 0 because the positive and negative parts cancel. Swapping the bounds flips the sign, so 3x^2 + 2x + 1 from 2 to 0 is -14. For an unsigned area, split the range where the function crosses zero and add the parts as positive numbers.
Bounds can be numbers or short expressions such as pi, pi/2 or 2*e.
| x | Function value | Antiderivative value |
|---|---|---|
| 0 | 1 | 0 |
| 0.5 | 2.75 | 0.875 |
| 1 | 6 | 3 |
| 1.5 | 10.75 | 7.125 |
| 2 | 17 | 14 |
How do I type a function so it is read correctly?
Use x as the variable and write powers with the caret: x^2. Multiplication can be written with a star or left out, so 3x^2, 3*x^2 and 3(x^2) mean the same thing. Functions need brackets: sin(x), not sin x. The names accepted are sin, cos, tan, exp, ln, log, sqrt and abs, and pi and e work as numbers. Angles are in radians.
A negative exponent such as x^(-2) or 1/x^2 is fine. A leading minus applies after the power, so -x^2 means minus the square of x. Write e^(2x) with brackets around the whole exponent. Scientific notation such as 1e3 or 2.5e-3 is read as a plain number. A digit placed straight after x, e, pi or a closing bracket, as in 3x2 or (x+1)2, is refused with a message, because it could mean a product or a power; write 3*x^2 or (x+1)*2 to say which one you want.
What if the function has no closed form or breaks inside the bounds?
Some products, such as x times sin(x), are outside the rules. With bounds, the page then gives the numeric value from an adaptive sum, for example 1.440422421 for x*sin(x) from 1 to 2, and says it is numeric. Without bounds it says no closed form is available.
If the function is undefined somewhere between the bounds, the integral is improper and the page refuses it instead of showing a wrong number. Examples are 1/x from -1 to 1, which crosses a division by zero, and tan(x) from 1 to 2, which passes the point where tan has no value at pi/2. The same happens when the function climbs without limit near a point inside the bounds, such as 1/(x^2-0.3) from 0 to 1 or 1/cos(x) from 0 to 2: the page checks the curve at 2,001 points and runs the numeric sum at two precisions, and refuses when they disagree or a sign flip comes with huge values on both sides. To check any antiderivative yourself, differentiate it: the result must be the original function.
Use it with
- Standard Deviation Calculator: sample and population SD with steps.
- Exponential Growth Calculator: growth or decay over time from a start value and rate.
- Quadratic Equation Solver: roots with steps.
Questions
How do I integrate 3x^2 + 2x + 1?
Raise each power by one and divide by the new power: x^3 + x^2 + x + C. Between 0 and 2 the definite integral is 14.
What does + C mean?
C is the constant of integration. Functions that differ by a constant have the same derivative, so every antiderivative is written with an unknown constant. It drops out of a definite integral.
Does the calculator show the steps?
It shows the antiderivative, the values F(b) and F(a) and a table of points. It does not write out each rule that was applied.
Why does it say the integral is improper?
The function is undefined or grows without limit at some point between the bounds, for example by a division by zero or a logarithm of a negative number. The page does not compute those.
Are angles in degrees or radians?
Radians. To integrate sin of an angle in degrees, multiply the angle by pi/180 inside the function.
Is my function sent anywhere?
No. The function and the bounds are processed on your device and nothing is stored or sent.
The tool's results are computed in your browser by the code on this page; the explanations are checked against the tool's own output.