Logo

MonoCalc

/

Integral Calculator

Math

Quick Examples

About This Tool

∫ Integral Calculator – Symbolic, Definite, Numerical & Improper

The Integral Calculator is a full-featured calculus tool that evaluates indefinite integrals, definite integrals, improper integrals, and area between curves for single-variable functions. Using the mathjs symbolic engine combined with an adaptive numerical fallback, it delivers exact closed-form antiderivatives when possible and high-precision decimal approximations when not.

📐 What Is an Integral?

An integral is the reverse operation of differentiation. Given a function f(x), its antiderivative (or indefinite integral) is a function F(x) such that F′(x) = f(x). Geometrically, the definite integral of f(x) over an interval [a, b] represents the net signed area between the curve and the x-axis:

∫ₐᵇ f(x) dx = F(b) − F(a)

This relationship — the Fundamental Theorem of Calculus — is the foundation of every computation this tool performs.

⚙️ Five Calculation Modes

1. Indefinite Integral

Finds the full family of antiderivatives and appends the constant of integration + C. For example, entering x^2 returns x³/3 + C. The symbolic engine handles polynomial, trigonometric, exponential, and logarithmic functions, as well as common compositions via substitution rules. The result includes step-by-step reasoning showing which rule was applied.

2. Definite Integral

Evaluates ∫ₐᵇ f(x) dx = F(b) − F(a) over a finite interval. When a symbolic antiderivative is found, the result is exact (e.g., ∫₀³ x² dx = 9). When no elementary antiderivative exists, the tool automatically switches to the numerical engine and reports a decimal approximation.

3. Numerical Approximation

Forces numerical evaluation using composite Simpson’s rule with up to 10 000 sub-intervals, achieving typical error below 1 × 10⁻⁶ for smooth functions. This mode is ideal for integrands like exp(-x²) or sin(x)/x where no closed form exists. You can set the number of sub-intervals and the output precision (0–10 decimal places).

4. Improper Integral

Handles infinite bounds (inf / -inf) and interior singularities. The tool applies a variable substitution that maps the infinite interval to [0, 1], then integrates numerically. It also tests for divergence near the boundary and displays a clear Convergent or Divergent badge alongside the result. Example: ∫₁^∞ 1/x² dx = 1 (convergent).

5. Area Between Curves

Integrates |f(x) − g(x)| over [a, b] to find the geometric (unsigned) area between two curves. Toggle Signed area to instead compute the net integral of f(x) − g(x). The dual-curve plot visually highlights the enclosed region, making this mode especially useful for visualising intersection problems.

📊 Interactive Function Graph

Every calculation generates a live chart of f(x) with the integration interval highlighted in a shaded region. In area-between-curves mode the chart overlays both f(x) and g(x), filling the enclosed area. You can adjust the plot range to zoom into features of interest. The graph gives immediate geometric intuition — essential for spotting sign changes or verifying that bounds are set correctly.

📋 Key Integration Rules Applied

  • Power Rule: ∫ xⁿ dx = xⁿ⁺¹/(n+1) + C (n ≠ −1)
  • Reciprocal Rule: ∫ 1/x dx = ln|x| + C
  • Exponential: ∫ eˣ dx = eˣ + C
  • Trig: ∫ sin x dx = −cos x + C, ∫ cos x dx = sin x + C
  • Substitution (u-sub): applied automatically when the integrand contains a linear inner function, e.g. ∫ sin(2x) dx = −cos(2x)/2 + C
  • Numerical fallback: adaptive composite Simpson for all remaining cases
Supported Input Syntax
Use standard notation: x^2, sin(x), cos(x), tan(x), exp(x), log(x) (natural log), sqrt(x), abs(x). Constants pi and e are recognised. Multiplication must be explicit: write 2*x, not 2x. For infinite bounds enter inf or -inf.

💡 Practical Applications

Integration is ubiquitous across science, engineering, economics, and data science:

  • Physics — displacement from velocity, work from force, electric charge from current.
  • Engineering — moment of inertia, signal energy in DSP, fluid flow through a cross-section.
  • Statistics & Probability — computing probabilities from PDF curves (e.g., normal distribution) is a definite integral.
  • Economics — consumer surplus is the area between a demand curve and the market price line.
  • Computer Graphics — path integrals and surface area calculations underpin rendering algorithms.

🔢 Numerical Methods Explained

When symbolic integration is unavailable, the tool uses composite Simpson’s rule, which approximates the integral by fitting parabolas to pairs of sub-intervals. With n even sub-intervals of width h = (b − a)/n:

∫ₐᵇ f(x) dx ≈ (h/3) × [f(x₀) + 4f(x₁) + 2f(x₂) + 4f(x₃) + ⋯ + f(xₙ)]

This method converges at order O(h⁴), making it significantly more accurate than the trapezoidal rule for smooth functions. For improper integrals, a change of variables maps the infinite domain to a bounded one before applying Simpson’s rule.

⚠️ Accuracy & Limitations

Symbolic results are exact whenever the engine can find a closed-form antiderivative. Numerical results carry floating-point rounding errors proportional to the function’s smoothness and the number of sub-intervals chosen. Functions with sharp discontinuities, rapid oscillations, or singularities inside the integration interval may require manual splitting at breakpoints for reliable numerical results. The tool will display a warning when it detects potential convergence issues.

Frequently Asked Questions

Is the Integral Calculator free?

Yes, Integral Calculator is totally free :)

Can I use the Integral Calculator offline?

Yes, you can install the webapp as PWA.

Is it safe to use Integral Calculator?

Yes, any data related to Integral Calculator only stored in your browser (if storage required). You can simply clear browser cache to clear all the stored data. We do not store any data on server.

How does the Integral Calculator work?

Enter a mathematical expression such as x^2 or sin(x) and select a mode. For indefinite integrals the tool applies symbolic rules (power rule, trig, exponential, and logarithm rules) to find an antiderivative F(x) + C. For definite integrals it evaluates F(b) − F(a) when a closed form exists, otherwise it falls back to adaptive composite Simpson numerical integration.

What is the difference between definite and indefinite integrals?

An indefinite integral finds a family of antiderivatives F(x) + C where C is any constant. A definite integral evaluates the net signed area between the function and the x-axis over a specific interval [a, b], producing a single numeric value.

How does numerical integration work in this tool?

When a closed-form antiderivative cannot be determined, the tool uses composite Simpson's rule with up to 10 000 sub-intervals. This method achieves high accuracy for smooth functions — typical error is below 1 × 10⁻⁶ for well-behaved integrands. Infinite bounds are handled by a variable substitution that maps the infinite interval to a finite one.

Can this tool handle improper integrals with infinite bounds?

Yes. Enter inf or -inf as a bound. The tool applies a substitution t = 1/(1 + |x|) to map the infinite interval to [0, 1] and then numerically integrates. It also warns when the integrand appears to diverge near the boundary.

How do I calculate the area between two curves?

Select the 'Area Between Curves' mode, enter both f(x) and g(x), and specify the interval. The tool integrates |f(x) − g(x)| over [a, b] to give the geometric (unsigned) area. Toggle 'Signed area' to see the net integral of f(x) − g(x) instead.

What expressions are supported as input?

The tool accepts standard mathematical notation: x^2, sin(x), cos(x), tan(x), exp(x), log(x) (natural log), sqrt(x), and combinations thereof using +, -, *, /. Constants pi and e are recognised. Use * for multiplication (2*x not 2x). Both x and user-defined variables such as t or theta are accepted.