Integral Test Calculator

Check the integral test hypotheses, evaluate the improper integral, and decide convergence.

Integral Test Calculator

What Is the Integral Test?

The integral test decides convergence of an infinite series by comparing it with an improper integral. If f(x) is positive, continuous, and decreasing on [N, ∞) and aₙ = f(n), then

Σ aₙ converges  ⇔  ∫N f(x) dx converges

The series and the integral either both settle to finite values or both blow up, because the sum is squeezed between two integrals: ∫N+1 f ≤ Σn>N aₙ ≤ ∫N f. Geometrically, the terms are unit-width rectangles hugging the curve, drawn one way they fit under it, drawn the other they cover it. The test converts a discrete question, infinitely many additions, into a calculus question you can often answer exactly. This calculator checks both hypotheses by dense sampling, evaluates the improper integral over widening windows to detect convergence or divergence numerically, states the verdict, and draws the rectangles-against-curve picture that makes the proof visible.

How to Use the Integral Test Calculator

Enter the general term aₙ in n, and the starting index (use N = 2 for terms involving ln n). The steps report the positivity check, the monotonicity check, and the integral's values over the windows [N, N+10], [N, N+100], [N, N+1000], and [N, N+10000]. Stabilizing values mean a convergent integral, hence a convergent series, and the tool adds the remainder bracket ∫M+1 f ≤ RM ≤ ∫M f, the error-control bonus the test uniquely offers. Steadily growing values mean divergence, and the harmonic chip shows the characteristic slow logarithmic climb.

Worked Example

For aₙ = 1/n² from N = 1: the function 1/x² is positive, continuous, and decreasing on [1, ∞), so the test applies. The integral is elementary:

1 x−2 dx = [−1/x]1 = 1

Finite, so Σ1/n² converges. Note what the test does and does not deliver: it certifies convergence and bounds the sum between 1 and 1 + a₁ = 2, but the actual value π²/6 ≈ 1.6449 (Euler's Basel problem) comes from entirely different mathematics. Contrast aₙ = 1/n: the integral ∫dx/x = ln x grows without bound, so the harmonic series diverges even though its terms vanish, the canonical warning that terms going to zero is necessary but nowhere near sufficient.

The p-Series Boundary and Logarithmic Refinements

Applied to aₙ = 1/nᵖ, the integral test settles the entire p-series family in one stroke: ∫x−pdx converges exactly when p > 1, so Σ1/nᵖ converges for p > 1 and diverges for p ≤ 1. The boundary case is where the test truly earns its keep: series like Σ1/(n ln n) and Σ1/(n ln²n) all have terms of nearly identical size, yet the first diverges (its integral is ln ln x, unbounded but agonizingly slow) while the second converges (integral −1/ln x). No ratio or root test can separate them, both give the inconclusive limit 1, but the integral test slices cleanly between. The log-power chip demonstrates the convergent side; changing the exponent from 2 to 1 flips the verdict, one keystroke moving you across the convergence frontier.

Remainder Estimation: The Test's Second Gift

Beyond yes-or-no convergence, the sandwich ∫M+1 f ≤ RM ≤ ∫M f bounds the tail after M terms with computable integrals. For Σ1/n² truncated at M = 100, the remainder lies between 1/101 and 1/100: the partial sum is within about 0.01 of the limit, and averaging the two bounds sharpens the estimate by another order of magnitude. This is how many special-function values are actually computed: sum a manageable number of terms, then correct with the integral bound. The Taylor remainder calculator plays the same error-bounding role for power series.

Common Mistakes to Avoid

  • Skipping the hypotheses. Positive, continuous, decreasing, all three matter. Applying the test to oscillating terms like (−1)ⁿ/n produces nonsense; that series needs the alternating series test.
  • Equating the sum with the integral. They share a fate, not a value: Σ1/n² = π²/6 while the integral is 1. The integral bounds and brackets the sum; it never equals it except by coincidence.
  • Requiring decrease from the very first term. Eventual decrease suffices, convergence ignores any finite prefix. If f rises before falling, run the test from a later N and add the skipped terms separately.
  • Trusting slow growth as convergence. ln ln x reaches 3 only near x = 5 × 10⁸. Numerical windows can look flat while the truth is divergence, which is why this tool inspects the growth trend across decades rather than one endpoint.
  • Forgetting the domain of the terms. 1/(n ln n) is undefined at n = 1. Start such series at N = 2, in the input and in the analysis alike.

Real-World Applications

The integral test's territory, series on the edge of convergence, shows up wherever heavy-tailed behavior appears. Zipf's law says word frequencies decay like 1/rank; whether aggregates over such distributions are finite is exactly a p-series question, answered by this test. In computer science, the harmonic series' divergence explains why the coupon-collector problem needs n ln n draws. Physics meets the test in mode sums and partition functions; statistics uses integral-versus-sum comparisons to approximate discrete likelihoods. The Riemann zeta function ζ(p) = Σ1/nᵖ, convergent precisely on the test's p > 1 side, underpins analytic number theory and the distribution of primes. Explore the neighboring machinery with the ratio test and limit comparison test calculators.

Frequently Asked Questions

Why does comparing a sum with an integral work at all?

Draw the terms as rectangles of width 1. Placed with their left edges at the integers they contain the region under the decreasing curve; shifted one unit they fit inside it. The sum is thus wedged between ∫N+1 f and aₙ + ∫N f, and finiteness on either side forces it on the other.

Does the integral give the value of the series?

No, only its fate and bounds on it. The sum of 1/n² is π²/6 ≈ 1.645 while the matching integral is exactly 1. When you need the value, sum many terms directly and use the integral to bound what remains, the hybrid strategy numerical libraries employ.

Why must the function be decreasing?

The rectangle sandwich needs each term to dominate the curve on one side and be dominated on the other, which fails if f wiggles upward between integers. A function could dip at every integer yet spike between them, making the integral finite while the series diverges. Monotonicity forbids exactly this cheat.

What if my terms increase at first and only later decrease?

Run the test from the index where decrease begins; the finitely many earlier terms cannot affect convergence, only the sum's value. The Gaussian-decay chip n·e−n² technically rises before n = 1; starting anywhere at or beyond the peak is legitimate.

How does this tool detect divergence numerically?

It evaluates the integral over windows widening by factors of ten and watches the trend: values that keep climbing by comparable amounts each decade indicate logarithmic-type divergence, while values whose successive changes shrink sharply indicate convergence. The step list shows the raw window values so you can judge the pattern yourself.

Why do the ratio and root tests fail where the integral test succeeds?

For 1/nᵖ and its logarithmic refinements, consecutive-term ratios and n-th roots both tend to 1, the inconclusive boundary of those tests. They are built to detect geometric-scale behavior; polynomial and logarithmic decay is invisible to them. The integral test reads the decay rate directly instead.

What exactly is the remainder estimate good for?

It converts "converges" into "converges and here is the error after M terms": ∫M+1 f ≤ RM ≤ ∫M f. That is how you decide that 1000 terms of Σ1/n² give three correct decimals, or that no feasible number of harmonic terms reaches 100, since ln n grows past any bound only glacially.

Is Σ1/(n ln n) really divergent? The terms look so small.

Truly divergent: its integral is ln(ln x), which is unbounded. But the growth is doubly logarithmic, partial sums pass 4 only around n ≈ 10²⁴, so no computer will ever watch it diverge. It is the standard example of why numerical evidence cannot replace the test.

Does the test apply to series with negative terms?

Not directly; positivity is a hypothesis. For eventually negative terms, factor out the sign. For genuinely mixed signs, apply the test to |aₙ| to investigate absolute convergence, or use the alternating series test when signs strictly alternate. Each sign pattern has its proper tool.

Where does the p > 1 boundary come from?

From the antiderivative of x−p: for p ≠ 1 it is x1−p/(1−p), which vanishes at infinity exactly when p > 1, and for p = 1 it is ln x, unbounded. One integration explains the entire p-series classification, including the harmonic series sitting precisely on the divergent edge.