What the relationship means
The two-point rule is a quadrature formula with weight function 1 on a finite interval a<b. It is exact for every polynomial of degree at most 3. The classical error expression requires sufficient fourth differentiability. The calculator is restricted to explicit polynomials through degree 4 and can therefore independently report the exact integral and signed error Q−I.
The definite integral supplies the signed total area. Polynomial interpolation explains how weighted node values become integration rules. The fundamental theorem of calculus provides an independent antiderivative check for these polynomials. Gaussian quadrature is useful when function evaluations are costly and the integrand is smooth inside the interval.
Derive it step by step
Rather than prescribe node spacing, choose nodes and weights together to match as many polynomial moments as possible. On [−1,1], symmetry suggests nodes ±c with equal weight w. Matching constant and quadratic moments gives w=1 and c=1/√3. Odd moments agree automatically by symmetry.
- The constant function requires 2w=∫−111 dx=2, hence w=1.
- For x2, 2c2=∫−11x2dx=2/3, hence c=1/√3; both x and x3 integrate symmetrically to zero.
- Transform [a,b] to [−1,1] through x=m+dt, m=(a+b)/2, d=(b−a)/2. The differential contributes dx=d dt.
- Thus Q2=d[f(m−d/√3)+f(m+d/√3)]. For a quartic, I−Q2=c4(b−a)5/180, following from the fourth moment, the only inexact one.
Visualize the model
x4 exceeds the degree of exactness
Free with a Quanta account. Your download stays ready after registration.
Two worked examples
Quartic error on [−1,1]
- Given
- Author calculation: f(x)=x4, a=−1,b=1.
- Find
- Compare quadrature with the exact integral.
Both nodes ±1/√3 have function value 1/9.
Unit weights give Q2=2/9≈0.222222222.
Antiderivative x5/5 gives I=2/5. Q2−I=−8/45.
Result: The rule underestimates the integral by 8/45≈0.177777778.
Check: The quartic relation gives −25/180=−8/45, the same difference.
Cubic function on another interval
- Given
- Author calculation: f(x)=1+2x−x2+3x3 on [0,2].
- Find
- Use transformation and degree exactness.
m=1,d=1; nodes 1±1/√3. The outer factor is 1.
With x=1+t, f=5+9t+8t2+3t3. The node sum is 10+16/3=46/3.
Direct integration gives 2+4−8/3+12=46/3.
Result: Q2=I=46/3≈15.333333333 because the degree is only 3.
Check: Symmetry in transformed t removes odd terms while retaining the Jacobian factor.
Recall the method later with the formula’s flashcards.
10 flashcards · English materials
Already have an account? Sign in for flashcardsAvailable from Essential. A ready-made formula set, no AI credits required. Article exercises are not all included.
Limits and result checks
Two nodes do not mean exactness for every function. Jumps, narrow peaks, singularities or strong oscillation can defeat a simple rule. Nodes are interior, not endpoints. The factor (b−a)/2 must not be omitted in changing intervals. The general n-point rule reaches degree 2n−1; this calculator deliberately is not adaptive integration software with arbitrary function syntax.
- The interval factor is missing. Transform dx=(b−a)dt/2 as well.
- Two nodes imply exactness through degree four. The degree limit is 2n−1=3.
- Errors Q−I and I−Q are equated. Retain the stated sign convention explicitly.
Five exercises with solutions
Calculate · Foundation
Find Q2 for f(x)=x4 on [−1,1], with nodes ±1/√3 and weights 1.
Show hint
(1/√3)4=1/9.
Learning goal: Calculate quartic two-point quadrature
Show solution and calculation
Both function values are 1/9.
Hence Q2=2/9≈0.222222222; the exact integral 2/5 is larger.
Rearrange · Foundation
Find the two Gaussian nodes and outer factor for [2,6].
Show hint
m=4,d=2.
Learning goal: Map nodes onto an interval
Show solution and calculation
Nodes 4±2/√3≈2.845299462 and 5.154700538; the outer factor is 2.
The unit reference weights are both scaled by 2.
Interpret · Application
Why is the two-point rule exact for every cubic although it uses only two values?
Show hint
Nodes and weights were chosen together.
Learning goal: Interpret degree of exactness
Show solution and calculation
The four moments for 1,x,x2,x3 agree.
Their linear combinations are therefore integrated exactly.
This does not reconstruct an arbitrary cubic from only two data points.
Error analysis · Application
For ∫261 dx, a solution gives only 1+1=2. What correction is missing?
Show hint
dx=(b−a)dt/2.
Learning goal: Retain the Jacobian factor
Show solution and calculation
The outer factor (6−2)/2=2 is missing.
Correctly Q2=2·(1+1)=4, the interval length.
Even a constant integrand detects this transformation error.
Transfer · Challenge
For x4 the interval length is halved with the same quartic coefficient. How does absolute two-point error scale?
Show hint
|I−Q2|=|c4|(b−a)5/180.
Learning goal: Scale quartic error
Show solution and calculation
Error decreases by a factor of 25=32.
This is exact for a quartic with fixed c4, not a universal guarantee for an arbitrary insufficiently known function.
Check your understanding with the formula’s reference test.
8 test questions · English materials
Already have an account? Sign in for the testAvailable from Essential. A ready-made formula set, no AI credits required. Article exercises are not all included.
Sources for this explanation
Quanta · Updated November 8, 2026
Editorial responsibility: Quanta Study editorial team
Review scope
This explanation, 2 worked examples and 5 exercises are available in German and English. Structure, source references and mathematical notation undergo automated checks. Calculations, model assumptions and both language versions receive a separate AI review.
An independent, named human subject review has not yet been documented. Our exercise numbers are worked examples, rather than measurements published by the cited sources.
Editorial responsibility, sources and methodsChange history
- Added a full article with model limits, independently calculated examples, five exercise paths and source references.
Cite this reference page
Quanta. Gauss–Legendre Quadrature. Updated November 8, 2026. https://quanta-study.de/en/formula-sheet/gauss-legendre-quadratur
When citing a specific scientific statement, also cite the specialist source linked to that statement.