# Seeking proof for the formula relating Pi with its convergents

Could anyone try to prove that the below conjectured formula is valid for relating $$\pi$$ with ALL of its convergents - those, which are described in OEIS via $$\mathrm{A002485}(n)/\mathrm{A002486}(n)$$ ?

$$(-1)^n\cdot\left( \pi - \frac{\mathrm{A002485}(n)}{\mathrm{A002486}(n)} \right) = \frac{1}{|i|\cdot2^j} \int_0^1 \frac{x^l(1-x)^{2(j+2)}(k+(i+k)x^2)}{1+x^2} \,\mathrm{d}x \tag{1}$$ (1)

and in Maple notations:

$$(-1)^n*(Pi−A002485(n)/A002486(n))=(abs(i)*2^{j})^{}(-1)Int((x^{l}(1-x)^{(2*(j+2))}*(k+(i+k)*x^{2}))/(1+x^{2}),x=0...1)$$

where integer $$n >2$$ serves as the index for terms in OEIS $$\mathrm{A002485}(n)$$ and $$\mathrm{A002486}(n)$$, and $$\{i, j, k, l\}$$ are some integer parameters (which are some implicit functions of $$n$$ and so far to be found experimentally for each value of $$n$$), .

When n->infinity then A002485(n)/A002486(n)->Pi while the integral will approach value of 0. So the way to strengthen or to disproof my conjecture is to see wether there exists set of i, j, k and l under which integral, and consequently, the resulting expression consisting of hypergeometric and gamma functions attains the value of zero (0).

It is shown in examples below that the formula under question is applicable for some first few convergents (of the $$\mathrm{A002485}(n)/\mathrm{A002486}(n)$$ type).

1. For example, for $$\frac{22}{7}$$

$$\frac{22}{7} - \pi = \int_{0}^{1}\frac{x^4(1-x)^4}{1+x^2}\,\mathrm{d}x$$

with $$n=3, i=-1, j=0, k=1, l=4$$ - with regards to my above suggested generalization.

In Maple notation,

i:=-1; j:=0; k:=1; l:=4;
Int(x^l*(1-x)^(2*(j+2))*(k+(k+i)*x^2)/((1+x^2)*(abs(i)*2^j)),x= 0...1)


yields 22/7 - Pi.

1. It also works for found by Lucas formula for $$\frac{333}{106}$$

$$\pi - \frac{333}{106} = \frac{1}{530}\int_{0}^{1}\frac{x^5(1-x)^6(197+462x^2)}{1+x^2}\,\mathrm{d}x$$

with $$n=4, i=265, j=1, k=197, l=5$$ - with regards to my above suggested generalization.

In Maple notation

i:=265; j:=1; k:=197; l:=5;
Int(x^l*(1-x)^(2*(j+2))*(k+(k+i)*x^2)/((1+x^2)*(abs(i)*2^j)),x= 0...1)


yields Pi - 333/106.

1. And it works for Lucas's formula for $$\frac{355}{113}$$

$$\frac{355}{113} - \pi = \frac{1}{3164}\int_{0}^{1}\frac{x^8(1-x)^8(25+816x^2)}{(1+x^2)}\mathrm dx$$

with $$n=5, i=791, j=2, k=25, l=8$$ - with regards to my above suggested generalization.

In Maple notation

i:=791; j:=2; k:=25; l:=8;
Int(x^(2*(j+2))*(1-x)^l*(k+(k+i)*x^2)/((1+x^2)*(abs(i)*2^j)),x= 0...1)


yields 355/113 - Pi.

1. And it works as well for Lucas's formula for $$\frac{103993}{33102}$$

$$\pi - \frac{103993}{33102} = \frac{1}{755216}\int_{0}^{1}\frac{x^{14}(1-x)^{12}(124360+77159x^2)}{1+x^2}\,\mathrm{d}x$$

with $$n=6, i= -47201, j=4, k=124360, l=14$$ -with regards to my above suggested generalization.

In Maple notation

i:=-47201; j:=4; k:=124360; l:=14;
Int(x^l*(1-x)^(2*(j+2))*(k+(k+i)*x^2)/((1+x^2)*(abs(i)*2^j)),x= 0...1)


yields Pi - 103993/33102

1. And also it works Lucas's formula for $$\frac{104348}{33215}$$

$$\frac{104348}{33215} - \pi = \frac{1}{38544}\int_{0}^{1}\frac{x^{12}(1-x)^{12}(1349-1060x^2)}{1+x^2}\,\mathrm{d}x$$

with $$n=7, i= -2409, j=4, k=1349, l=12$$ - with regards to my above suggested generalization.

In Maple notation

i:=-2409; j:=4; k:=1349; l:=12;
Int(x^l*(1-x)^(2*(j+2))*(k+(k+i)*x^2)/((1+x^2)*(abs(i)*2^j)),x= 0...1)


yields 104348/33215 - Pi

1. And it works as well for $$\frac{618669248999119}{196928538206400}$$

which, by the way, is not part of A002485/A002486 OEIS sequences:

$$\frac{618669248999119}{196928538206400} - \pi = \frac{1}{755216}\int_{0}^{1}\frac{x^{14}(1-x)^{12}(77159+124360x^2)}{1+x^2}\,\mathrm{d}x$$

with $$i= 47201, j=4, k=77159, l=14$$ -with regards to my above suggested generalization.

In Maple notation

i:=47201; j:=4; k:=77159; l:=14;
Int(x^l*(1-x)^(2*(j+2))*(k+(k+i)*x^2)/((1+x^2)*(abs(i)*2^j)),x= 0...1)


yields 618669248999119/196928538206400 - Pi.

This question relates to my answer given in Is there an integral that proves $\pi > 333/106$?

Update#1:

Recently Thomas Baruchel (see his answer below) has conducted extensive calculations and found that four parameters formula yields infinite number of solutions for each $$n$$.

Thomas shared with me his calculations results and supplied me with quite a few of valid combinations of $$i, j, k, l$$ values - so now I have a lot of experimentally found five-tuples $$\{ n,i, j, k, l\}$$, which satisfy above parametrization, where $$n$$ varies in the range from 2 to 26.

Looking at all available {i,j,k,l} solutions (initial ones found by me and those which were found by Thomas Baruchel program) one could observe that in all of them abs(l-j)=2*m where "m" is some positive integer.

Based on this data, of course, it would be nice to find how (if at all) $$i, j, k, l$$ are inter-related between each other and with "$$n$$" - but such inter-relation (if exists) is not obvious and difficult to derive just by observation ... (though it is clearly seen that an absolute value of "$$i$$" is strongly increasing as "$$n$$" is growing from 2 to 26).

Update #2:

Thanks to Jaume Oliver Lafont, at least one case, answering affirmatively to the last question, is identified: i=-1, j=-2, k=1, l=0

$$\pi = \int_{0}^{1}\frac{4}{1+x^2}\,\mathrm{d}x$$

Should there be an infinite number of such cases?

David Trimas looked into the option involving partial solution for my conjecture by setting j=l=0 and deriving formulas for "i" and "k" for j=l=0 condition.

The result is following:

(-1) ^ n * (Pi − A002485(n)/A002486(n)) = ((Abs(i)) * 2 ^ j) ^ (-1) * Int((x ^ l * (1 - x) ^ (2 * (j + 2)) * (k + (i + k) * x ^ 2 ))/(1 + x ^ 2 ), x=0 ...1)

holds true for any n>2 and j=l=0 when

i =(-1)^(n) * 3 * A002486(n)

k = (-1)^(n) * (47 * A002486(n) - 15 * A002485(n)

For example for n=3 where A002485(3)=22 and A002486(3)=7

i=(-1)^337=-21

k=(-1)^3*(477 - 1522)=1

and the quick check via Inverse Symbolic Calculator using Maple (also could be done using Mathematica) provides the confirmation.

i:=-21;j:=0;k:=1;l:=0;(abs(i)2^j)^(-1)int((x^l(1-x)^(2(j+2))*(k+(i+k)*x^2))/(1+x^2),x=0...1) = 22/7 - Pi

Substitution of

i =(-1)^(n) * 3 * A002486(n)

and

k = (-1)^(n) * (47 * A002486(n) - 15 * A002485(n)

into general conjectured formula with the condition that j=l=0 (under which above formulas for "i" and "k" were derived) confirmed those formulas for "i" and "k" validity by bringing lhs and rhs to be equal.

Though above finding is obviously circular in nature (it doesn't reveal direct dependency of "i" and and "k" on "n" but rather does it via A002485(n) and A002486(n) ) - it is in my view a step forward.

As I mentioned above, observation of all obtained solutions for my conjectured identity (which represents generalization of Stephen Lucas' experimentally obtained identities between Pi and its convergents) shows that abs(l-j)=2*m where "m" is some positive integer. Going further I make another conjecture re identity which relates Log(2) and its convergents and is analogous to the one which relates Pi and its convergents.

Below is conjectured by me formula (expressed in Maple notations) for relating Log(2) (that is Ln(2)) with ALL of its convergents - those, which are described via A079942(n)/A079943(n) ratio where A079942(n) and A079943(n) are OEIS integer sequences.

(-1)^n*(Log(2) − A079942(n)/A079943(n))=(Abs(i)2^j)^(-1)Int((x^l(1-x)^(2(j+2))*(k+(i+k)*x^2))/(1+x^2),x=0...1)

where integer n>2 serves as the index for the terms in the OEIS A079942(n) and A079943(n) integer sequences, and {i,j,k,l} are some signed integer parameters (which are some implicit functions of “n” and to be found experimentally or otherwise for each value of “n”) , and abs(l - j) = 2*m + 1, where “m" is some positive integer.

• Also posted at mathoverflow.net/q/175762/12357
– JRN
Commented Jul 14, 2014 at 0:43
• I fixed some formatting for you; hope you like it. Commented Jan 25, 2016 at 19:44
• Is it relevant whether the fraction is a convergent or not? Commented Jan 30, 2016 at 22:58
• @Jaume Oliver Lafont - I can't say for sure - but so far all calculations were done with fractions approximating Pi. What do you think?
– Alex
Commented Jan 30, 2016 at 23:13
• My guess is that the pattern holds be it a convergent or not. Commented Jan 30, 2016 at 23:16

Not giving the solution, but some ideas that could lead to it.

If this formula works, it will be because the integral can be decomposed on $P(x) + \frac{1}{1+x^2}$. It's easy to integrate a polynomial (and will give you a rational number), and $1 \over {1+x^2}$ will give you arctan and as such $\pi \over 4$.

So, taking the problem in reverse, you can look at the expansion of arctan between 0 and $\pi \over 4$. You can then convert that polynomial in a continued fraction that will give you the approximations you're looking at.

This reference could help http://www.math.binghamton.edu/dikran/478/Ch7.pdf (p10)

I'll try to have a closer look later.

EDIT: Ok, so after peeking through Mathoverflow as well, here is the idea.

Starting from the very general following integral: $I_n = \int_0^1 \frac{x^l(1-x)^m(\alpha + \beta x^2) }{\gamma(1+x^2)}dx$.

As previously discussed, you want to be able to represent this as follows: $\int_0^1 \frac{P(x)(1+x^2) + C}{\gamma(1+x^2)}dx$ with $P(x)$ a polynomial and $C$ a constant.

With some algebra on the polynomials you know that $P(x)= Q(x)(1+x^2) + Ax+B$. So you want to find $A=0$ and if possible get some ideas on $B$.

You need to evaluate the above polynomial on $x=i=e^{i\frac{\pi}{2}}$ and $-i$ to identify the coefficient.

$A=0 \Leftrightarrow P(i)=P(-i)=0 \Leftrightarrow A = \Im (i^l(1-i)^m(\alpha - \beta) ) = (\alpha - \beta) 2 ^\frac{m}{2} \sin(\frac{l \pi}{2} + \frac{-m\pi}{4} ) = (\alpha - \beta) 2 ^\frac{m}{2} \sin(\frac{\pi}{4} (2l-m) )$

So we have a condition on $2l-m$ to zero $A$ which is $\frac{\pi}{4} (2l-m) = K\pi \Leftrightarrow 2l-m \equiv 0 [4]$.

In particular, $m=2m'$ which we will use going forward and $l-m' \equiv 0[2]$. We can set $l-m' = 2 \epsilon$

Second part is to look at $B$

$B= \Re (i^l(1-i)^m(\alpha - \beta) ) = (\alpha - \beta) 2 ^\frac{m}{2} \cos(\frac{\pi}{4} (2l-m) ) = (\alpha - \beta) 2 ^{m'} \cos(\frac{\pi}{2} (l-m') ) = (\alpha - \beta) 2 ^{m'} (-1)^\epsilon$

So, to sum up, we have $I_n = \int_0^1 Q(x) + \frac{B}{\gamma(1+x^2)}$. As you're trying to approximate $\pi$, you need to take $\gamma = B/4$.

So, provided that $\int_0^1 Q(x) dx$ can be used to approximate fractions of $\pi$, which is likely given the numbers of degress of freedom, we've proved that $I_n$ would be of the following form, which is slightly better as you can drop $j$ from your variables and it shows some relationships better (provided that $\alpha - \beta \not = 0)$:

$(-1)^n (\pi- \frac{p_n}{q_n}) = \int_0^1 \frac{x^{\epsilon+2m'}(1-x)^{2m'}(\alpha + \beta x^2) }{(\alpha - \beta) 2 ^{m'-2} (-1)^{\epsilon}(1+x^2)}dx$.

In your last example, that yields: $n=6,m'=6,\epsilon = -8,\alpha = 77159, \beta = 124360$

I leave it to you to verify it works on the rest of them.

• @Alex : I've amended the end of my answer so you can see it better. Commented Jul 16, 2014 at 13:07
• I am not sure you understood my proof. I started with a more general integral than yours, but as you have already computed the values for particular cases, we know that this integral yields the approximation you want as there is a direct relationship between the 2. Then I have shown that for my general integral to work (and by extension yours which a particular case), I had to have several conditions on the different coefficient. This proves that your coefficients will translate into mines for sure. (apart from the case $\alpha = \beta$ that I have left alone. Commented Jul 16, 2014 at 17:04
• @(Matt B.) In the next two comments I list parameters in your formula for all cases (I replaced alpha by a, bets by b, epsilon by c, m' by p) 104348/33215 - Pi -> a:=1349;b:=-1060;p:=6;c:=0;int((x^(c+2*p)*(1-x)^(2*p)*(a+b*x^2))/((a-b)*2^(p-2)*((-1)^(c)*(1+x^2))),x=0...1)
– Alex
Commented Jul 18, 2014 at 0:59
• Pi - 103993/33102 -> a:=124360;b:=77159;p:=6;c:=2;int((x^(c+2*p)*(1-x)^(2*p)*(a+bx^2))/((a-b)*2^(p-2‌​)*((-1)^(c)*(1+x^2))),x=0...1) 355/113 - Pi -> a:=25;b:=816;p:=4;c:=0;int((x^(c+2*p)*(1-x)^(2*p)*(a+bx^2))/((a-b)*2^(p-2)*((-1‌​)^(c)*(1+x^2))),x=0...1) Pi - 333/106 -> a:=197;b:=462;p:=3;c:=-1;int((x^(c+2*p)*(1-x)^(2*p)(a+bx^2))/((a-b)*2^(p-2)*((-‌​1)^(c)*(1+x^2))),x=0...1) 22/7 - Pi -> a:=1;b:=0;p:=2;c:=0;int((x^(c+2*p)*(1-x)^(2*p)*(a+bx^2))/((a-b)*2^(p-2)*((-1)‌​^(c)*(1+x^2))),x=0...1)
– Alex
Commented Jul 22, 2014 at 18:28
• Obviously parameters in the formula somehow depend on "n". The most straight forward dependency on "n" is observed in what you call "m'" (and I call "p") ;{2,3,4,4,6,6} ... It appears that when "n" -> infinity - then the integral should come to 0 ...
– Alex
Commented Jul 22, 2014 at 18:29

I computed some more values and got convinced this formula isn't relevant yet unless you remove at least the three variables $j$, $l$ and $m$. It is actually very easy to trivially find arbitrarily many tuple $(i,j,k,l,m)$. First of all, if I understand well, your $j$ value seems to be $(m/2-2)$, or am I wrong?

Even after having discarded $j$, it looks like you can find $(i,k)$ solutions for almost any arbitrary tuple $(l,m)$; thus I suggest you find some interesting rule on $(l,m)$ in order to minimize $(i,k)$ if you want your formula to be strong enough. Of course using only one $i$ variable instead of $(i,j,k,l,m)$ would be a significant improvement.

The code below can help you; it is Maxima code yielding thousands and thousand $(i,j,k,l,m)$:

display2d:false$A002485: [ 3,22,333,355,103993,104348,208341,312689,833719,1146408,4272943, 5419351,80143857,165707065,245850922,411557987,1068966896,2549491779, 6167950454,14885392687,21053343141,1783366216531,3587785776203, 5371151992734,8958937768937 ]$

A002486: [ 1,7,106,113,33102,33215,66317,99532,265381,364913,1360120,
1725033,25510582,52746197,78256779,131002976,340262731,811528438,
1963319607,4738167652,6701487259,567663097408,1142027682075,
1709690779483,2851718461558 ] $for n:2 thru 26 do ( for l:1 thru 36 do ( for m:1 thru 36 do ( e: expand(integrate(x^l *(1-x)^m*(k+(i+k)*x^2)/(1+x^2), x, 0, 1)), myi: coeff(e, i, 1), p: coeff(myi, %pi, 1), myi2: myi - p*%pi, if coeff(myi2, log(2), 1) = 0 then ( myk: coeff(coeff(e, i, 0),k, 1), if myk # 0 then ( j: round(float(log(abs(p))/log(2))), kipos: (-1)^n * (-A002485[n-1]/A002486[n-1])*(2^j) - myi2, if kipos # 0 then ( k1: denom(myk/kipos), i1: num(myk/kipos), check1: expand( (k1*myk+p*i1*%pi+myi2*i1)/( abs(i1)*(2^j))*(-1)^(n) - %pi + A002485[n-1]/A002486[n-1] ), if check1 = 0 then print ("n =",n,"==> (",i1,j,k1,l,m,")" )), kineg: -myk/((-1)^n * (-A002485[n-1]/A002486[n-1])*(2^j) + myi2), if kineg # 0 then ( k2: denom(kineg), i2: num(kineg), check2: expand( (k2*myk+p*i2*%pi+myi2*i2)/( abs(i2)*(2^j))*(-1)^(n) - %pi + A002485[n-1]/A002486[n-1] ), if check2 = 0 then print ("n =",n,"==> (",i2,j,k2,l,m,")" )))))))$


You asked me by mail if I could find some $(i,j,k,l,m)$ solutions for $n=8$, but there is an infinite number of such solutions; for instance:

n = 8 ==> ( -66317 -1 9977 1 2 )
n = 8 ==> ( -6963285 3 212651 1 10 )
n = 8 ==> ( -66383317 7 833127 1 18 )
n = 8 ==> ( -103605391175 11 720252257 1 26 )
n = 8 ==> ( -55884747999795 15 517817918873 1 34 )
n = 8 ==> ( -66317 0 8805 2 4 )
n = 8 ==> ( -2188461 4 89050 2 12 )
n = 8 ==> ( -16380299 8 317214 2 20 )
n = 8 ==> ( -1305427928805 12 23297755114 2 28 )
n = 8 ==> ( 896546759355 14 27371124886 2 32 )
n = 8 ==> ( -23756674250925 16 5393931750178 2 36 )
n = 8 ==> ( -66317 1 8246 3 6 )
etc.

• Yes, indeed, for all cases covered (included your results for n=8) it appears that j = m/2 -2 and that is why Matt B reduced number of parameters from 5 to 4.
– Alex
Commented Jan 9, 2016 at 17:47
• And, of course, it would be nice to find some interesting rule on (l,m) in order to minimize (i,k) and, even better, it would be real cool to reduce number of parameters just to one. I was hoping to try to achieve empirically/experimentally - by collecting more data.
– Alex
Commented Jan 9, 2016 at 18:10
• I appreciate your input, Thomas.
– Alex
Commented Jan 9, 2016 at 21:49

I took the liberty of using Wolframs Integrator calculator for the following integrals:

(1) $$\int_0^1\frac{x^2(1-x)^2(a+bx^2)}{1+x^2} dx = (\pi-\frac{47}{15})a + (\frac{22}{7} - \pi)b$$ (2) $$\int_0^1\frac{x^2(1-x)^8(a+bx^2)}{1+x^2} dx = (\frac{3959}{315}-4\pi)a + (4\pi - \frac{4838}{385})b$$ (3) $$\int_0^1\frac{x^4(1-x)^4(a+bx^2)}{1+x^2} dx = (\frac{22}{7}-\pi)a + (\pi - \frac{1979}{630})b$$ (4) $$\int_0^1\frac{x^4(1-x)^8(a+bx^2)}{1+x^2} dx = (4\pi - \frac{4838}{385})a + (\frac{566063}{45045} - 4\pi)b$$ (5) $$\int_0^1\frac{x^6(1-x)^4(a+bx^2)}{1+x^2} dx = (\pi - \frac{1979}{630})a + (\frac{10886}{3465} - \pi)b$$ (6) $$\int_0^1\frac{x^6(1-x)^8(a+bx^2)}{1+x^2} dx = (\frac{566063}{45045} - 4\pi)a + (4\pi - \frac{188685}{15015})b$$ (7) $$\int_0^1\frac{x^8(1-x)^4(a+bx^2)}{1+x^2} dx = (\frac{10886}{3465} - \pi)a + (\pi - \frac{141511}{45045})b$$

From this you can see the trend. Since there are 2 degrees of freedom for a,b, with one condition that $a-b = \pm 1$, then their value can be fixed in such a way to match any n-th convergent of $\pi$. This accounts for why there are multiple solutions for $i,j,k,l$ being found. Actually only 2 parameters are necessary.

I don't see the point, since we have only pushed finding the convergent for $\pi$ into finding $a_n,b_n$ for the n-th convergent of $\pi$, any of the above integrals would work, and I am not sure that discovering the rule for generating $a,b$ will be easy.

• The 1st, 2nd ad 5th formulas (counting from the top down) found by Jaume Oliver Lafont in oeis.org/wiki/User:Jaume_Oliver_Lafont/Dalzell-type_integrals are covered by my suggested parametrical formula: for the 1st {i, j, k, l} = {-1, 0, 1, 4} for the 2nd {i, j, k, l} = {-1, -1, 1, 1} for the 5th {i, j, k, l} = {-1, 1, 1, 5} Alas the 3rd, 4th and the 6th formulas and Jaume's formula for pi-333/106 in math.stackexchange.com/questions/1956/… are NOT covered by suggested parametrical formula,
– Alex
Commented Apr 17, 2017 at 22:34

Here is the proof of my conjecture developed by Ute Hahn: