Use x as your variable. Supported functions include sin, cos, tan, log, ln, sqrt, abs, exp, floor, ceil, round, min, max, pow.
sin(x) from 0 to pi •
exp(-x^2) from -1 to 1 •
1/(1+x^2) from 0 to 1
What this integration calculator does
This calculator estimates a definite integral, which means it finds the area under a curve between two bounds: \(\int_a^b f(x)\,dx\). It is designed for quick numerical work when an exact symbolic antiderivative is hard, messy, or simply unnecessary.
Instead of trying to do full symbolic algebra, the calculator applies reliable numerical methods. That makes it useful for students, engineers, data analysts, and anyone who needs a practical answer with controlled accuracy.
How to use it in 4 steps
1) Enter the function
Type your function in terms of x, such as x^2 + 3*x - 1 or sin(x). You can also use constants like pi and common math functions.
2) Set the lower and upper bounds
Choose your interval \([a, b]\). If you reverse bounds (for example \(b < a\)), the calculator still works and returns the expected negative value.
3) Choose subintervals and method
Larger n usually means better accuracy but slightly more computation. If you pick “Compare all methods,” you can see how midpoint, trapezoidal, and Simpson’s rule align.
4) Calculate and interpret
Review the estimate and compare methods. If the methods agree closely, your result is typically stable. If not, increase n or inspect the function for steep changes/singularities.
Methods explained briefly
Midpoint Rule
Splits the interval into rectangles centered at each midpoint. Often more accurate than trapezoidal for smooth curves at the same n.
Trapezoidal Rule
Connects function values with straight lines, creating trapezoids. Simple and robust, especially for quick approximations.
Simpson’s Rule
Uses quadratic arcs over pairs of subintervals. For smooth functions, Simpson’s rule is usually much more accurate for the same n (with even n required).
Supported function syntax
- Arithmetic:
+,-,*,/,^ - Grouping: parentheses
( ... ) - Trigonometric:
sin,cos,tan,asin,acos,atan - Exponential/log:
exp,log,ln,log10 - Other:
sqrt,abs,floor,ceil,round,min,max,pow
Practical tips for better accuracy
- Start with
n = 200ton = 1000for smooth functions. - Increase
nif your function oscillates rapidly or changes sharply. - Avoid bounds where the function is undefined (for example
1/xatx = 0). - Compare methods: close agreement is a good sign.
- Use Simpson’s rule for smooth functions when possible.
Common issues and fixes
“Unsupported token” error
Your expression includes a name that is not in the supported list. Check spelling and function names.
“Non-finite value encountered” error
The function likely becomes undefined or infinite somewhere in the interval. Narrow the interval or rewrite the function.
Unexpected result sign
If upper bound is smaller than lower bound, the integral is negative by definition. Swap bounds if you want positive orientation.
Final takeaway
A good integration calculator is about speed, clarity, and trustworthy approximations. Use this tool to build intuition, check homework, validate modeling work, and compare numerical methods in one place.