ArticleslgStudy

computer science

Wallis product

Wallis product is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Wallis product rather than just read about it. In short: The Wallis product is the infinite product representation of π: π2=∏n=1∞4n24n2−1=∏n=1∞(2n2n−1⋅2n2n+1)=(21⋅23)⋅(43⋅45)⋅(65⋅67)⋅(87⋅89)⋅⋯ It was published in 1656 by John Wallis. Proof using integration Wallis derived this infinite product using interpolation, though his method is not regarded as rigorous.

Wallis product — main illustration
Wallis product — illustration

Key takeaways

  • Wallis product belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Wallis product to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Wallis product from memory before moving on to harder problems.

Reference excerpt

The Wallis product is the infinite product representation of π:

π2=∏n=1∞4n24n2−1=∏n=1∞(2n2n−1⋅2n2n+1)=(21⋅23)⋅(43⋅45)⋅(65⋅67)⋅(87⋅89)⋅⋯ It was published in 1656 by John Wallis.

Proof using integration Wallis derived this infinite product using interpolation, though his method is not regarded as rigorous. A modern derivation can be found by examining ∫0πsinnxdx for even and odd values of n, and noting that for large n, increasing n by 1 results in a change that becomes ever smaller as n increases. Let

I(n)=∫0πsinnxdx. (This is a form of Wallis' integrals.) Integrate by parts:

u=sinn−1x⇒du=(n−1)sinn−2xcos⁡xdxdv=sin⁡xdx⇒v=−cos⁡x ⇒I(n)=∫0πsinnxdx=−sinn−1xcos⁡x|0π−∫0π(−cos⁡x)(n−1)sinn−2xcos⁡xdx=0+(n−1)∫0πcos2xsinn−2xdx,n>1=(n−1)∫0π(1−sin2x)sinn−2xdx=(n−1)∫0πsinn−2xdx−(n−1)∫0πsinnxdx=(n−1)I(n−2)−(n−1)I(n)=n−1nI(n−2)⇒I(n)I(n−2)=n−1n Now, we make two variable substitutions for convenience to obtain:

I(2n)=2n−12nI(2n−2) I(2n+1)=2n2n+1I(2n−1) We obtain values for I(0) and I(1) for later use.

I(0)=∫0πdx=x|0π=πI(1)=∫0πsin⁡xdx=−cos⁡x|0π=(−cos⁡π)−(−cos⁡0)=−(−1)−(−1)=2 Now, we calculate for even values I(2n) by repeatedly applying the recurrence relation result from the integration by parts. Eventually, we get to I(0), which we have calculated.

I(2n)=∫0πsin2nxdx=2n−12nI(2n−2)=2n−12n⋅2n−32n−2I(2n−4) =2n−12n⋅2n−32n−2⋅2n−52n−4⋅⋯⋅56⋅34⋅12I(0)=π∏k=1n2k−12k Repeating the process for odd values I(2n+1),

I(2n+1)=∫0πsin2n+1xdx=2n2n+1I(2n−1)=2n2n+1⋅2n−22n−1I(2n−3) =2n2n+1⋅2n−22n−1⋅2n−42n−3⋅⋯⋅67⋅45⋅23I(1)=2∏k=1n2k2k+1 We make the following observation, based on the fact that sin⁡x≤1

sin2n+1x≤sin2nx≤sin2n−1x,0≤x≤π ⇒I(2n+1)≤I(2n)≤I(2n−1) Dividing by I(2n+1):

⇒1≤I(2n)I(2n+1)≤I(2n−1)I(2n+1)=2n+12n, where the equality comes from our recurrence relation. By the squeeze theorem,

⇒limn→∞I(2n)I(2n+1)=1 limn→∞I(2n)I(2n+1)=π2limn→∞∏k=1n(2k−12k⋅2k+12k)=1 ⇒π2=∏k=1∞(2k2k−1⋅2k2k+1)=21⋅23⋅43⋅45⋅65⋅67⋅⋯

Proof using Laplace's method See the main page on Gaussian integral.

Proof using Euler's infinite product for the sine function While the proof above is typically featured in modern calculus textbooks, the Wallis product is, in retrospect, an easy corollary of the later Euler infinite product for the sine function.

sin⁡xx=∏n=1∞(1−x2n2π2) Let x=π2:

⇒2π=∏n=1∞(1−14n2)⇒π2=∏n=1∞(4n24n2−1)=∏n=1∞(2n2n−1⋅2n2n+1)=21⋅23⋅43⋅45⋅65⋅67⋯

Relation to Stirling's approximation Stirling's approximation for the factorial function n! asserts that

n!=2πn(ne)n[1+O(1n)]. Consider now the finite approximations to the Wallis product, obtained by taking the first k terms in the product

pk=∏n=1k2n2n−12n2n+1, where pk can be written as

pk=12k+1∏n=1k(2n)4[(2n)(2n−1)]2=12k+1⋅24k(k!)4[(2k)!]2. Substituting Stirling's approximation in this expression (both for k! and (2k)!) one can deduce (after a short calculation) that pk converges to π2 as k→∞.

Derivative of the Riemann zeta function at zero The Riemann zeta function and the Dirichlet eta function can be defined:

ζ(s)=∑n=1∞1ns,ℜ(s)>1η(s)=(1−21−s)ζ(s)=∑n=1∞(−1)n−1ns,ℜ(s)>0 Applying an Euler transform to the latter series, the following is obtained:

η(s)=12+12∑n=1∞(−1)n−1[1ns−1(n+1)s],ℜ(s)>−1⇒η′(s)=(1−21−s)ζ′(s)+21−s(ln⁡2)ζ(s)=−12∑n=1∞(−1)n−1[ln⁡nns−ln⁡(n+1)(n+1)s],ℜ(s)>−1 ⇒η′(0)=−ζ′(0)−ln⁡2=−12∑n=1∞(−1)n−1[ln⁡n−ln⁡(n+1)]=−12∑n=1∞(−1)n−1ln⁡nn+1=−12(ln⁡12−ln⁡23+ln⁡34−ln⁡45+ln⁡56−⋯)=12(ln⁡21+ln⁡23+ln⁡43+ln⁡45+ln⁡65+⋯)=12ln⁡(21⋅23⋅43⋅45⋅⋯)=12ln⁡π2⇒ζ′(0)=−12ln⁡(2π)

See also

John Wallis, English mathematician who is given partial credit for the development of infinitesimal calculus and pi. Viète's formula, a different infinite product formula for π. Leibniz formula for π, an infinite sum that can be converted into an infinite Euler product for π. Wallis sieve The Pippenger product formula obtains e by taking roots of terms in the Wallis product.

Notes

External links "Wallis formula", Encyclopedia of Mathematics, EMS Press, 2001 [1994] "Why does this product equal π/2? A new proof of the Wallis formula for π." 3Blue1Brown. April 20, 2018. Archived from the original on 2021-12-12 – via YouTube.

Illustrations

Wallis product: Comparison of the convergence of the Wallis product (purple asterisks) and several historical infinite series for .mw-parser-output .texhtml{font-family:"Nimbus Roman No9 L","Times New Roman",Times,serif;font-size:118%;line-height:1;font-variant-numeric:lining-nums tabular-nums;font-kerning:none}.mw-parser-output .texhtml .texhtml{font-size:100%}.mw-parser-output .texhtml-big{font-size:165%}.mw-parser-output .mvar{font-style:italic}@media(min-width:420px){.mw-parser-output .texhtml{white-space:nowrap}}π. Sn is the approximation after taking n terms. Each subsequent subplot magnifies the shaded area horizontally by 10 times. (click for detail)
Comparison of the convergence of the Wallis product (purple asterisks) and several historical infinite series for .mw-parser-output .texhtml{font-family:"Nimbus Roman No9 L","Times New Roman",Times,serif;font-size:118%;line-height:1;font-variant-numeric:lining-nums tabular-nums;font-kerning:none}.mw-parser-output .texhtml .texhtml{font-size:100%}.mw-parser-output .texhtml-big{font-size:165%}.mw-parser-output .mvar{font-style:italic}@media(min-width:420px){.mw-parser-output .texhtml{white-space:nowrap}}π. Sn is the approximation after taking n terms. Each subsequent subplot magnifies the shaded area horizontally by 10 times. (click for detail)

Worked examples

Example 1 — a first encounter with Wallis product

Start with the simplest possible case. Write down what Wallis product claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Wallis product before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Wallis product ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Wallis product

In research
Wallis product appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Wallis product in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Wallis product is common in secondary-school and first-year university syllabi. It links to neighbouring topics Infinite products, Pi algorithms, so understanding it makes those chapters shorter.
In everyday life
Look for Wallis product outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Wallis product” →

How to study Wallis product in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Wallis product means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Wallis product out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Wallis product in simple terms?

The Wallis product is the infinite product representation of π: π2=∏n=1∞4n24n2−1=∏n=1∞(2n2n−1⋅2n2n+1)=(21⋅23)⋅(43⋅45)⋅(65⋅67)⋅(87⋅89)⋅⋯ It was published in 1656 by John Wallis. Proof using integration Wallis derived this infinite product using interpolation, though his method is not regarded as rig…

Why does Wallis product matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Wallis product?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Wallis product.

Tags

  • Infinite products
  • Pi algorithms

Keep exploring