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

(This is a form of Wallis' integrals.) Integrate by parts:

![{\displaystyle {\begin{aligned}\Rightarrow I(n)&=\int _{0}^{\pi }\sin ^{n}x\,dx\\[6pt]{}&=-\sin ^{n-1}x\cos x{\Biggl |}_{0}^{\pi }-\int _{0}^{\pi }(-\cos x)(n-1)\sin ^{n-2}x\cos x\,dx\\[6pt]{}&=0+(n-1)\int _{0}^{\pi }\cos ^{2}x\sin ^{n-2}x\,dx,\qquad n>1\\[6pt]{}&=(n-1)\int _{0}^{\pi }(1-\sin ^{2}x)\sin ^{n-2}x\,dx\\[6pt]{}&=(n-1)\int _{0}^{\pi }\sin ^{n-2}x\,dx-(n-1)\int _{0}^{\pi }\sin ^{n}x\,dx\\[6pt]{}&=(n-1)I(n-2)-(n-1)I(n)\\[6pt]{}&={\frac {n-1}{n}}I(n-2)\\[6pt]\Rightarrow {\frac {I(n)}{I(n-2)}}&={\frac {n-1}{n}}\\[6pt]\end{aligned}}}](//wikimedia.org/api/rest_v1/media/math/render/svg/fb327a4dcf3b4321e18cd38e4ab967de34205e3d)
Now, we make two variable substitutions for convenience to obtain:


We obtain values for
and
for later use.
![{\displaystyle {\begin{aligned}I(0)&=\int _{0}^{\pi }dx=x{\Biggl |}_{0}^{\pi }=\pi \\[6pt]I(1)&=\int _{0}^{\pi }\sin x\,dx=-\cos x{\Biggl |}_{0}^{\pi }=(-\cos \pi )-(-\cos 0)=-(-1)-(-1)=2\\[6pt]\end{aligned}}}](//wikimedia.org/api/rest_v1/media/math/render/svg/61d7bb90cabaa8b31f60711a286f7d3905dc4470)
Now, we calculate for even values
by repeatedly applying the recurrence relation result from the integration by parts. Eventually, we end get down to
, which we have calculated.


Repeating the process for odd values
,


We make the following observation, based on the fact that 


Dividing by
:
, where the equality comes from our recurrence relation.
By the squeeze theorem,


