Learning goals and preparation
We assume substitution, integration by parts, continuous definite integrals, finite sums, and finite-average ideas. The Monte Carlo section introduces the expectation/variance notation it uses. We develop integration methods: trigonometric/rational/irrational examples, reduction formulas, integral limits and inequalities, Simpson quadrature, and Monte Carlo estimation. The last method is random and does not provide the same kind of deterministic guarantee as a derivative-based quadrature error bound.
8.1 Choosing an integration structure
Substitution reverses the chain rule and parts reverses the product rule. Other techniques reduce an integrand to these familiar structures. Always retain the original domain and verify an indefinite answer by differentiation.
Worked example 1: rational partial fractions. For
matching coefficients gives , , hence . An antiderivative is on each interval avoiding the poles. A singularity inside definite bounds must be treated as an improper integral; an antiderivative cannot be evaluated across it as if the integrand were continuous.
Before partial fractions, divide polynomials if the numerator degree is not smaller than the denominator degree. For example , giving antiderivative on intervals excluding one. A repeated linear factor needs every denominator power: , with antiderivative . For an irreducible quadratic, split off the denominator derivative: integrates to . Here follows by differentiating on its principal branch.
For an irrational expression, substitute an inner radical or a trigonometric identity. For , gives . For , , , gives . The branch makes ; without it an absolute value is required.
A direct root substitution can avoid trigonometry entirely. For , set in . Since , the integral is . The original denominator still excludes zero; simplifying after substitution does not add that input back.
For odd trigonometric powers, retain a factor for the differential. For example . For even powers, use . A named “trig integral” is not one single recipe; identify its algebraic structure.
8.2 A reduction formula derived by parts
Let for integers . For , integrate by parts with , . Endpoint terms vanish, giving
Hence
The formula reduces the exponent by two and needs separate even and odd starting cases. For example and .
For an indefinite example, let . Integration by parts gives for integers , with . Therefore . At each recurrence the arbitrary constants are absorbed into the one final constant; a definite use instead keeps endpoint terms. Differentiating the final expression checks the reduction independently.
An indefinite reduction formula must retain any boundary term and arbitrary constant. Using a definite formula outside its stated limits or forgetting its base cases is not justified by the word “reduction.”
8.3 Riemann sums as limits to evaluate
A Riemann sum can be used to evaluate a limit only after the integral of a continuous function is known to be the limit of all tagged sums of small mesh. This section therefore begins with the completeness of the real numbers and proceeds through compactness, uniform continuity and the Darboux criterion to that result.
Why the real numbers need more than arithmetic
The rational numbers support the familiar ordered arithmetic, yet the set has no rational least upper bound. The real number system adds a completeness property: bounded nonempty sets have least upper bounds. This is the source of many existence results later in analysis, not simply another rule for manipulating inequalities.
Definition 8.1.1
(Upper bound and supremum)
For a nonempty , is an upper bound if for every . A number is if it is an upper bound and for every upper bound . A maximum is an element of that is also an upper bound. The maximum, when it exists, is the supremum; a supremum need not belong to . Lower bounds, infimum and minimum are defined by reversing inequalities.
Theorem 8.1.2
(Completeness axiom)
Every nonempty subset of that is bounded above has a real supremum. Equivalently, every nonempty subset bounded below has a real infimum, via .
For example, although is not a maximum of that set. Conversely, and it is a maximum. The empty set and an unbounded-above set do not have a real supremum under this definition.
Theorem 8.1.3
(Supremum approximation criterion)
An upper bound of a nonempty set is if and only if, for every , there exists such that .
Proof
(Proving both directions)
If and no element exceeds , then is a smaller upper bound, contradiction. Conversely, suppose is an upper bound and the approximation property holds. If another upper bound were smaller than , choose . The property gives , contradicting that is an upper bound. Thus is the least upper bound.
Worked example 8.1.4
(Use both halves of a supremum proof)
Let . Every element is less than , so is an upper bound. Given , choose by the Archimedean property below. Then . Thus . No element equals , so has no maximum. An upper-bound calculation alone would not prove leastness: is also an upper bound.
Archimedean property and density
Theorem 8.1.5
(Archimedean property)
For every real there exists a positive integer . Consequently, for every there is such that .
Proof
(Completeness forces integers to be unbounded)
If the positive integers were bounded above, completeness would give . Since is not an upper bound, some satisfies . But and , contradicting that bounds the set. Apply this to to obtain the second statement.
Between any real numbers there is a rational number. Indeed choose with ; the Archimedean property and the integer-part property yield an integer with , so . The integer-part property follows from the unboundedness of integers in both directions and the well-ordering of the natural numbers. An irrational also lies between and : choose a rational with ; then is irrational and lies in the interval. Thus density does not say rationals and irrationals are equal sets.
Worked example 8.1.6
(An infimum via reflection)
For , every element exceeds . Given , choose to obtain . Therefore is the infimum, but not a minimum. The maximum is , attained at .
Quantifiers in convergence
Definition 8.1.7
(Convergence of a real sequence)
A sequence converges to if for every there exists such that for every , . Write . The index may depend on but must work for all later indices.
To negate convergence to , there must be some such that for every there is an with . A few early terms do not affect convergence; a recurring failure arbitrarily late does.
Worked example 8.1.8
(Construct an epsilon–N proof)
For , guess . Since
choose . Then every gives . The guess is motivation; the inequality and quantified choice establish the proof.
Theorem 8.1.9
(Uniqueness, boundedness and limit laws)
A convergent real sequence has a unique limit and is bounded. If and , then , , and when and the quotient is defined eventually. If eventually and both outer sequences converge to , then .
Proof
(Uniqueness and boundedness)
If and , then for any , sufficiently late terms satisfy both and . The triangle inequality yields . Since this holds for every positive , . For boundedness choose so that for . The finite initial terms and the bound for the tail together give a finite bound for the whole sequence.
The converse of boundedness is false: is bounded but does not converge. If it converged to , its even subsequence would converge to and its odd subsequence to , violating uniqueness.
Proof
(Product law mechanism)
A convergent sequence is bounded, say . Write
Both terms tend to zero. For the quotient, implies eventually; this keeps the denominator away from zero and gives .
Subsequences
Definition 8.1.10
(Subsequence)
A subsequence of is where are positive integers. If , then every subsequence converges to because and therefore eventually lies beyond any prescribed index.
Theorem 8.1.11
(Bolzano–Weierstrass)
Every bounded real sequence has a convergent subsequence.
Proof
(Nested-interval proof)
Place every term in a closed bounded interval . Bisect it. At least one half contains infinitely many terms; choose that half as . Continue, obtaining nested closed intervals of lengths tending to zero, each containing infinitely many terms. Choose indices strictly increasing with ; this is possible because each interval contains infinitely many terms. Completeness gives a common point in all intervals: the supremum of their left endpoints lies in each interval because every left endpoint is at most every right endpoint. Since , their distance is at most the interval length and tends to zero.
The conclusion is about a subsequence, not necessarily the whole sequence. For example, has constant subsequences converging to and , but does not converge.
Real closed sets: the sequence criterion and the open complement
Work on the real line in the usual classical set-theoretic setting, with countable witness selections available. A set is open when every in has some with contained in . We use the Archimedean consequence that tends to zero. For every subset of the real line, the following conditions are equivalent:
- Every sequence of points of that converges in the real line has its limit in .
- The complement of is open.
Proof of 2 implies 1. Suppose belongs to and tends to . If were outside , openness would give with disjoint from . Convergence gives a threshold after which , contradicting in . Therefore belongs to .
Proof of 1 implies 2. Fix outside . If no positive-radius interval around avoided , then for every positive integer there would be a point in with . Choose these witnesses as a sequence. Given , choose with . For , , so tends to . Condition 1 would force into , a contradiction. Hence some interval around avoids . This holds for every point of the complement, proving it open. The witness-sequence step uses the stated classical setting; this proof is not offered as a theorem about choice-free foundations. If is empty there is no sequence in , and its complement is the whole open line. If is the whole line, its empty complement is open vacuously. Both edge cases also satisfy the equivalence.
Compactness on the real line
A set is compact if every family of open sets whose union contains has a finite subfamily still covering . A set is closed if it contains all limits of convergent sequences of its points, equivalently if its complement is open. Sequential compactness means every sequence in has a subsequence converging to a member of .
The empty set is compact, closed and bounded, and sequentially compact vacuously. In proofs using a selected point or an infinite sequence, treat that case separately. We may assume the real completeness property and its nested-interval and Bolzano–Weierstrass consequences from the earlier sequence units.
Theorem: Heine–Borel in the real line
For , the following are equivalent: compactness by open covers; closedness and boundedness; sequential compactness.
Compact implies closed and bounded. The intervals , , cover , hence . A finite subcover gives a bound. To show closedness, take . For each , the interval avoids . A finite subfamily covers . Let be the minimum of their positive half-distances to . Every point in the chosen interval centered at has distance from strictly greater than . Thus misses , showing its complement open. If is empty this is immediate.
Closed and bounded implies compact. Enclose nonempty in a closed bounded interval . Suppose an open cover of has no finite subcover. Bisect . At least one closed half meets in a set not finitely coverable; otherwise two finite collections would cover . Choose such a half and repeat. We obtain nested closed intervals with lengths tending to zero, and not finitely coverable. Each intersection is nonempty; choose . The nested-interval property gives a unique common point , and because both lie in . Closedness gives . Some member of the cover contains , and openness gives a ball around inside . For large , the whole interval lies in that ball, so alone covers , a contradiction.
Closed and bounded implies sequentially compact. Every sequence in is bounded, so Bolzano–Weierstrass supplies a convergent subsequence. Closedness retains its limit in .
Sequentially compact implies closed and bounded. If unbounded, choose with ; no subsequence can converge to a finite real number, a contradiction. If is a limit of points in , choose with . A subsequence converges to a point of by sequential compactness, but it also converges to ; uniqueness of real limits gives . Thus is closed. This completes all implications.
Compact subsets of the real line
A set is compact if every open cover has a finite subcover. In , Heine–Borel says this is equivalent to being closed and bounded; it is also equivalent to every sequence in having a subsequence converging to a point of . The closedness requirement keeps the subsequential limit in the set; boundedness permits extraction. We use the sequential form in the proofs below.
Theorem 8.1.12
(Extreme value theorem)
If is nonempty and compact and is continuous, then is bounded and attains both a maximum and a minimum on .
Proof
(Extract a maximizing subsequence)
If were unbounded above, choose with . A subsequence exists; continuity would give , contradicting divergence to infinity. The same reasoning applied to gives boundedness below. Let . Choose with . A convergent subsequence tends to some , and continuity implies . Apply the argument to for a minimum.
Worked example 8.1.13
(Which hypothesis fails?)
The continuous function on is bounded but has no maximum or minimum: and are not in the domain. The set is bounded but not closed, hence not compact. On , both endpoints are present and the extrema are attained. Compactness is a sufficient global hypothesis, not a condition required for every individual function to attain extrema.
Fermat's necessary condition. At a differentiable interior local maximum or minimum, .
Proof. At a local maximum, sufficiently small positive increments give nonpositive difference quotients and negative increments give nonnegative ones. A two-sided derivative can satisfy both sign limits only by being zero. Negating the function treats a minimum.
The interior hypothesis matters: on has extrema at endpoints despite derivative 1. The converse fails: has zero derivative at zero but no extremum there.
Rolle's theorem. If , is continuous on , differentiable on and , then for some .
Proof. The extreme-value theorem supplies maximum and minimum. If the function is constant, every interior point works. Otherwise a value differs from the equal endpoint values, so either a maximum or a minimum occurs in the interior. Fermat's condition applies there.
Mean value theorem. Under the same continuity and differentiability hypotheses but without equal endpoint values, some satisfies .
Subtract the secant line from and apply Rolle. This proves the theorem without assuming is continuous. Consequences include: derivative zero on an interval makes the function constant; nonnegative derivative makes it nondecreasing; and on an interval gives for points in it. An interval-wide derivative bound cannot be inferred from one derivative value.
Uniform continuity
Definition 8.1.14
(One delta for the entire domain)
A function is uniformly continuous on if for every there exists such that for all , implies . The chosen can depend on but not on or .
Theorem 8.1.15
(Heine–Cantor theorem)
Every continuous real-valued function on a compact set is uniformly continuous.
Proof
(Contradiction using compactness)
If uniform continuity failed, some would permit, for every , points with but . Compactness supplies a subsequence . Since the paired distances tend to zero, also . Continuity gives both and , contradicting the output separation.
Worked example 8.1.16
(Pointwise but not uniform on an unbounded domain)
The function is continuous on but not uniformly continuous there. Take and . Then , but . On any closed bounded interval, Heine–Cantor does give uniform continuity. It is also direct: if , then .
Darboux sums and integrability
Develop the proof behind integrability statements and distinguish boundedness from integrability. Let and be bounded on . For a partition , put , , and define , . The lower integral is the supremum of all lower sums; the upper integral is the infimum of all upper sums. Refining a partition makes lower sums nondecreasing and upper sums nonincreasing.
For any two partitions , their common refinement gives , so . Boundedness ensures these quantities are finite. The function is Riemann integrable when they agree.
Theorem: Darboux criterion
The bounded function is integrable if and only if for every there is a partition with .
Proof. If the two integrals equal , choose a lower sum above and an upper sum below , using supremum and infimum approximation. Their common refinement has gap less than . Conversely the inequalities force the integral gap to be zero when such partitions exist for every positive .
Theorem: finitely many discontinuities are permitted
If is bounded and continuous except possibly at finitely many points, it is integrable.
Proof. Let , taking . Surround the exceptional points by finitely many small intervals, with endpoints included in the partition, having total length less than . At endpoints of use one-sided intervals. Their contribution to the upper-lower gap is at most times their total length, hence less than . On the remaining finitely many closed intervals, is continuous and therefore uniformly continuous. Subdivide each sufficiently finely that its oscillation on every resulting subinterval is less than . Their total gap is less than . Combining all partition points gives gap below . If an exceptional interval endpoint would itself be exceptional, move it slightly so all actual exceptional points lie inside the selected intervals or at the domain endpoints. This keeps the remaining closed intervals continuous.
Continuous functions and all tagged meshes
Let be continuous, where . The extreme value theorem makes bounded, and Heine–Cantor makes it uniformly continuous. For a partition , write and for its lower and upper Darboux sums. The proved Darboux integrability theorem for continuous functions supplies the common integral .
Fix . Uniform continuity supplies such that whenever . If the mesh of is less than , every subinterval has oscillation at most . Therefore
For every selection of tags, its tagged sum lies between and ; so does . Thus . The same works for every partition of sufficiently small mesh and every choice of tags. This proves the tagged-mesh definition for continuous functions on the stated closed interval.
For , take a partition , with , tags , and mesh . A finite number is the definite integral if, for every , there is such that every partition with and every choice of tags satisfy . In that case is the common limit. Continuous functions on a closed interval are integrable.
Let be continuous on and . For and nonzero with , the integral estimate gives
Thus in the interior; at the endpoints the same argument gives one-sided derivatives. If is continuous on , differentiable on , and there, the mean value theorem makes constant on . Therefore .
As a special case, if is continuous on , then with ,
This can evaluate a sequence limit without finding a closed finite sum. Identify both the sample point and the width; a sum with the wrong normalization need not have the same limit.
Worked example 2: recognize the width. Since
the limit is . Omitting the prefactor in the rewritten expression would change the scaling completely.
A function's average over is its integral divided by . A Riemann sum can approximate a total or an average; its normalization determines which.
8.4 Integral inequalities
If continuous functions satisfy pointwise, their integrals obey the same inequality, by comparing each tagged sum. In particular if , then . Also
For real continuous , the integral Cauchy–Schwarz inequality is
If , integrate and minimize the resulting quadratic in ; its minimum cannot be negative, yielding the inequality. If , continuity forces throughout, making the result immediate. This proof uses positive integrals rather than an unsupported transfer of a finite-vector formula.
Worked example 3: a simple integral bound. On , , so its integral lies between one and . Concavity additionally puts the graph below the tangent , giving upper bound , sharper than . Each bound follows from an explicit pointwise inequality.
8.5 Simpson's rule and its conditions
Let and let be a positive even integer. For equal subintervals of width , Simpson's rule is
It integrates the quadratic interpolant on each pair of subintervals. On a pair centred at zero with nodes , the three Lagrange basis polynomials have integrals , producing the familiar weights. Symmetry also makes the cubic term integrate exactly, so Simpson's rule is exact for every polynomial of degree at most three.
For a function with continuous fourth derivative bounded by , the standard composite error theorem gives
The fourth derivative, smoothness and even subdivision requirement are part of the theorem. Here is a derivation of the constant, rather than an inference from observed mesh differences. On a unit panel , define the error functional . It annihilates polynomials through degree three. Insert the integral Taylor remainder about and exchange integrals over the finite triangle (the integrands are continuous). The resulting expression is
For instance, for , the kernel is , equal to the displayed form; symmetry gives the negative half. Its absolute integral is . Thus a panel of half-width has error at most after scaling. There are panels, giving as claimed.
Worked example 4: compare a known integral. For on with , . Exact integral is , so error is . Since and , the theorem's bound is , attained here. For a cubic, the method would be exact under exact arithmetic.
Chapter 2's trapezoidal rule has an derivative bound, while Simpson's has an bound with stronger smoothness. Higher formal order does not remove domain singularities or arithmetic error.
Concept lensAlgebraic
Simpson's rule is a corrected pair of trapezoidal sums
Let be Chapter 2's composite trapezoidal rule on the same nodes. For even , Simpson's rule is the combination
To check this, write both sums in multiples of . The rule gives the node weights , while uses only the even-indexed nodes, with spacing , and so gives the weights . Hence has weights , and dividing by gives exactly the weights of .
This reading explains the coefficients. For a smooth integrand the leading trapezoidal error is proportional to , so halving the step divides it by about four, and is precisely the combination that cancels an term. In Worked example 4, and have errors and , a ratio of about , and . The cancellation explains why the order improves from to ; the bound itself is the theorem proved above, with its fourth-derivative hypothesis.
History of an idea
A rule named after the author who passed it on
The name records transmission rather than origin. J. J. O'Connor and E. F. Robertson's MacTutor biography of Thomas Simpson states that he is best remembered for his work on interpolation and numerical integration, and that the method known today as Simpson's rule, although it did appear in his work, was something he had learned from Newton, as Simpson himself acknowledged. The same biography reports a reverse case for Newton's method of Chapter 1: Newton described an algebraic process for polynomial equations, which Raphson later improved, and that process did not use the differential calculus; the modern iterative form is attributed to Simpson, who published it in 1740.
Both names therefore point to a person in the history of the method, not to a single moment of discovery. For this note, the mathematical content is what can be checked on the page: the rule integrates the quadratic interpolant through three equally spaced values, and its accuracy is certified only by the error theorem with its stated hypotheses, an even number of subintervals and a bounded fourth derivative.
8.6 Monte Carlo integration and random error
Here denotes the probability-weighted average of a random quantity, and its expected squared deviation. For a uniform point on , the definition is . Independent samples have product joint weights/densities; consequently averages of products from different samples factor into products of averages. Expanding the square then shows the variance of their sum is the sum of variances.
Let , let be a positive integer, and let be independent uniformly distributed points on . For integrable with finite second moment, define
Uniformity gives , so the estimator is unbiased: . Independence gives
Its root-mean-square error is therefore proportional to , not or . This is a statistical error statement; a particular random sample can err in either direction.
For , Chebyshev's inequality yields the probabilistic bound
For completeness, the bound follows from , because the squared error is at least on that event and nonnegative elsewhere. Unbiasedness identifies the expected squared error with the variance. The probability refers to repeated independent random sampling under the model. It is not an absolute guarantee that one computed estimate is within the tolerance. A deterministic grid is not an independent uniform sample, and a pseudorandom generator's output does not prove independence merely because it looks irregular.
Worked example 5: exact variance of a toy estimator. For on , , , so variance of is . Thus estimator variance is . At , Chebyshev bounds probability of error at least by , about . The bound is conservative but mathematically explicit. No fixed sample output is claimed here.
8.7 Choosing an approximation responsibly
First inspect continuity, singularities and scale. Use an exact antiderivative or reduction when practical. For smooth one-dimensional functions, deterministic quadrature with a derivative bound often gives a transparent certificate. Monte Carlo is useful when random sampling is part of the problem or geometry/dimension makes grids inconvenient, but requires a statistical uncertainty statement.
A useful report names the method, assumptions, step/subdivision or sample count, arithmetic precision, and the kind of error bound actually established. “More samples” and “more decimal places” are different controls.
8.8 Graded exercises
Foundation
- Find and verify it by differentiation.
- Decompose and integrate on an interval avoiding its poles.
- Use the reduction formula to calculate .
Core
- Evaluate as an integral.
- Bound between two constants using .
- Use integral Cauchy–Schwarz to prove for continuous real .
- Apply Simpson's rule with to on . Explain exactness.
- For on with , what Simpson error bound is obtained with ?
Synthesis
- For uniform on and , derive the Monte Carlo estimator's mean and variance. Give a Chebyshev error probability bound for tolerance and sample size .
- A student reports “the Monte Carlo estimate is unbiased, so its error is zero.” Explain the difference between expectation and the realized estimate, using the variance formula and a possible one-point sample.
Additional method checks
- Integrate by polynomial division.
- Integrate on its real domain.
- Use the recurrence to find and verify its derivative.
8.9 Full solutions
-
Substitution gives . Its derivative is .
-
. An antiderivative is , separately on intervals avoiding zero and negative one.
-
.
-
The right-endpoint sums of the continuous function on converge to .
-
Monotonicity of integration gives .
-
Apply the inequality with ; its squared integral factor is , giving the result directly.
-
, matching the exact integral. Simpson integrates every cubic exactly; equivalently its fourth derivative is zero.
-
Here , so the bound is .
-
, , so variance is . The estimator is the sample mean, with expectation and variance . Chebyshev gives , capped at one if the displayed upper bound exceeds one.
-
Unbiasedness says the average over repeated hypothetical samples equals the true integral; individual samples fluctuate. For and , a sample near zero gives an estimate near zero instead of the true . Positive variance quantifies that variability. Expected signed error zero does not mean absolute or squared error zero.
-
Division gives , so the antiderivative is , separately on intervals avoiding one.
-
The real domain is . Set , , giving . The logarithm argument is positive on the domain.
-
. The derivative adds the polynomial and its derivative, cancelling lower terms to leave .
Summary
Reduction formulas come from actual integration identities and need base cases. Riemann sums can evaluate limits once the width and sampling points are identified. Integral inequalities follow pointwise bounds or positivity arguments. Simpson's rule uses paired quadratic interpolation and a qualified fourth-derivative error theorem. Monte Carlo is unbiased under independent uniform sampling, with random uncertainty rather than a deterministic tolerance guarantee.