Integral Calculator symbolic and numeric

The antiderivative of x²·sin(x) is 2·cos(x)+2·x·sin(x)-x^2·cos(x) + C (by integrating by parts twice). The definite integral from 0 to π is 5.8696044011, which equals π² − 4.

Your result

∫ from 0 to 3.1416 of x^2 * sin(x) dx

5.8696044011

Antiderivative F(x)
2·cos(x)+2·x·sin(x)-x^2·cos(x) + C
Average value on [a, b]
1.86835311

Step-by-step working

  1. Find F(x) = 2·cos(x)+2·x·sin(x)-x^2·cos(x)
  2. Evaluate F(3.141593) − F(0)
  3. Numerical check (adaptive Simpson): 5.8696044011
  • f(x)
  • Region [a, b]
f(x) and the integrated regionf(x), Region [a, b]-15-10-5050123xf(x)

Understand it

What the Integral Calculator Does

An integral calculator finds the antiderivative of a function — the F(x) whose derivative is f(x) — and the definite integral, the signed area under the curve between two limits.

This tool uses a computer-algebra engine for exact antiderivatives (polynomials, trig, exponentials, logs and many products) and adaptive Simpson’s rule for the definite integral, accurate to around 10 significant digits. When no closed form exists, such as e^(−x²), you still get the numeric answer.

How the Integral Formula Works

∫ₐᵇ f(x) dx = F(b) − F(a), where F′(x) = f(x) Simpson: ∫ ≈ (h/6)[f(a) + 4f(m) + f(b)], refined adaptively
F(x)
antiderivative (plus constant C)
a, b
limits of integration

Syntax: x^n, sqrt(x), exp(x), ln(x) for natural log, sin(x) in radians. Regions below the x-axis count as negative area.

Worked Examples

∫ 3x² dx from 0 to 2

Integrate f(x) =: 3*x^2 · Lower limit a: 0 · Upper limit b: 2

∫ from 0 to 2 of 3*x^2 dx8

= 8; F(x) = x^3 + C.

Bell curve (no closed form)

Integrate f(x) =: exp(-x^2) · Lower limit a: -3 · Upper limit b: 3

∫ from -3 to 3 of exp(-x^2) dx1.7724146965

≈ 1.7724146965, close to √π.

∫ 1/x dx from 1 to e

Integrate f(x) =: 1/x · Lower limit a: 1 · Upper limit b: 2.718

∫ from 1 to 2.7183 of 1/x dx0.9999999998

= 0.9999999998: ln(e) − ln(1).

Original analysis

Integral Analysis in numbers

Every chart below is generated from the same tested formula that powers the calculator above, so you can see the patterns behind a single result.

  • Left Riemann
  • Trapezoid
Absolute error by number of slices, ∫₀³ x² dxLeft Riemann, Trapezoid02462 slices4 slices8 slices16 slices32 slices64 slicesNumber of slicesLeft RiemannTrapezoid
View data table
Number of slicesLeft RiemannTrapezoid
2 slices5.631.13
4 slices3.090.28
8 slices1.620.07
16 slices0.830.02
32 slices0.420
64 slices0.210

How fast numerical methods converge

For ∫₀³ x² dx = 9, a left Riemann sum with 64 rectangles is still off by 0.2098. The trapezoid rule is off by 0.0011, and Simpson’s rule is exact for polynomials up to degree 3. Smarter rules beat brute force.

Common Integral Questions

Is this an antiderivative calculator?

Yes. The “Antiderivative F(x)” line gives the indefinite integral; add any constant C.

How do I find the area under a curve?

Enter the function and the x-limits. The definite integral is the signed area; for total area where the curve dips below the axis, split the interval at the roots and add absolute values.

Tips and Common Mistakes

  • Write multiplication explicitly: 2*x, x*sin(x).
  • Check an antiderivative by differentiating it.
  • Improper integrals (infinite limits or singularities) need care — use large finite limits to approximate.

Frequently asked questions

What is the integral of x²?

x³/3 + C. Over [0, 3] the definite integral is 9.

What is the difference between definite and indefinite integrals?

An indefinite integral is a family of functions F(x) + C. A definite integral is a number: F(b) − F(a).

Why can’t some functions be integrated?

Every continuous function has an antiderivative, but some, like e^(−x²), can’t be written with elementary functions. They are still computed numerically.

How accurate is the numeric result?

Adaptive Simpson’s rule typically gives 10+ correct digits for smooth functions on finite intervals.

Sources and methodology

Last reviewed

byBhuvanesh S. Runs through our automated test suite on every build.

Results are estimates. Double-check anything important before relying on it.