Suppose a real number $\alpha$ is a rational linear combination of two linearly independent real numbers, such as $\pi$ and $\sqrt 3$. For instance, say $$\alpha = \tfrac12\pi + 5\sqrt 3.$$

By a simple linear algebra argument ($\{\pi,\sqrt3\}$ is a $\mathbb Q$-basis), it's clear that the coefficients of $\alpha$ are uniquely determined.

Question: Given $\alpha\in\operatorname{span}_\mathbb Q(\{\pi,\sqrt 3\})$, how do we determine the coefficients of $\pi$ and $\sqrt 3$?

It feels like there is enough information, but at the same time, I imagine that we can find different coefficients which give us numbers arbitrarily close to $\alpha$, so it is important that we have an exact expression for $\alpha$.

(In other words, if we only know that $\alpha\approx 10.23105$, say, I imagine it would be hopeless to expect that we can determine the coefficients, even if we restrict our view to the module $\operatorname{span}_{\mathbb Z}(\{\pi,\sqrt 3\})$.)

The reason I ask this question is because for each $n$, the integral $$I(n)=\int_0^{\pi/3}\sin^{2n}x\,dx$$ is a number of the form $a\pi+b\sqrt 3$. It's easy to obtain the recurrence relation $$I(n) = \begin{cases} \hfil\frac\pi3\hfil & \text{if $n=0$}\\[3pt] (1-\tfrac1{2n})\,I(n-1)-\frac1{4n}\big(\tfrac{\sqrt3}2\big)^{2n-1} & \text{otherwise} \end{cases}$$ for $I(n)$, but I want to be able to compute the coefficients of $\pi$ and $\sqrt 3$ separately (in exact form) using a computer program.

I appreciate any help with solving either of the two problems, I'm assuming a solution to one necessarily sheds light on the other, that's why I haven't posted these as two separate questions.

  • $\begingroup$ You can use formal computation on expressions, I guess even with the constraint $y^2=3$, e.g. in python numpy package. $\endgroup$
    – Berci
    Dec 11, 2020 at 0:01

3 Answers 3


I will answer your specific question about $I_n$.

Let $J_n=\dfrac{2^{2n}(n!)^2}{(2n)!}I_n$. We have $J_0=I_0=\dfrac{\pi}{3}$ and




Summing relations yields $J_n=\dfrac{\pi}{3}-(\displaystyle\sum_{k=1}^n\dfrac{3^{k-1}}{2k}\dfrac{(k!)^2}{(2k)!})\sqrt{3}$.

Consequently, $I_n=\dfrac{(2n)!}{2^{2n}(n!)^2}\dfrac{\pi}{3}-\dfrac{(2n)!}{2^{2n}(n!)^2}(\displaystyle\sum_{k=1}^n\dfrac{3^{k-1}}{2k}\dfrac{(k!)^2}{(2k)!})\sqrt{3}$.

  • $\begingroup$ Nice! Was $(2n)!/2^{2n}(n!)^2$ just a guess? $\endgroup$ Dec 11, 2020 at 15:05
  • $\begingroup$ No ;-). The general trick is when you have to solve $u_n=a_n u_{n-1}+b_n$, try first to solve the "homogeneous relation" $v_n=a_n v_{n-1}$... which is easy since the solution is $v_n=\prod_{k=0}^n a_k$. Now, once you have the correct expression for $v_n$, if the $a_k's$ are all nonzero, you set $J_n= \dfrac{u_n}{\prod_{k=0}^n a_k}$, and $J_n$ will satisfy by construction $J_n=J_{n-1}+c_n$, where $c_n$ is easy to compute in terms of $a_k$ and $b_k$. Don't forget to accept my answer if you find it useful ;-) $\endgroup$
    – GreginGre
    Dec 11, 2020 at 15:23
  • $\begingroup$ Thanks, I will give you an upvote for now and leave it open just in case anyone has any input on the general problem, then accept it in a day or so. :) $\endgroup$ Dec 11, 2020 at 15:52

Using Mathematica

RSolve[{i[n] == (1 - 1/(2 n)) i[n - 1] - 
    1/(4 n) (Sqrt[3]/2)^(2 n - 1), i[0] == Pi/3}, i[n], n]

$$I_n=\frac{3^{n+\frac{1}{2}} \, _2F_1\left(1,n+1;n+\frac{3}{2};\frac{3}{4}\right)}{2^{2 n+2}(2 n+1) }$$ Where $_2F_1$ is the hypergeometric function and has the series expansion

$$_2F_1(a,b;c;z)=\sum _{k=0}^{\infty } \frac{a_k b_k z^k}{k! c_k}$$

$a_k,b_k,c_k$ are the Pochhammer symbol

In the table below the first exact values of the integrals

$$ \begin{array}{c|r} n & I_n\\ \hline 0 & \frac{\pi }{3} \\ 1 & \frac{4 \sqrt{3} \pi -9}{24 \sqrt{3}} \\ 2 & \frac{8 \sqrt{3} \pi -27}{64 \sqrt{3}} \\ 3 & \frac{20 \sqrt{3} \pi -81}{192 \sqrt{3}} \\ 4 & \frac{560 \sqrt{3} \pi -2511}{6144 \sqrt{3}} \\ 5 & \frac{\sqrt{3} \left(560 \sqrt{3} \pi -2673\right)}{20480} \\ 6 & \frac{7 \left(440 \sqrt{3} \pi -2187\right)}{40960 \sqrt{3}} \\ \ldots & \ldots\\ \end{array} $$


Here's easy way to determine them: let $t \in [0..1]$, we define $$ a_0 = t * \alpha $$ $$ a_1 = (1-t) * \alpha $$ Basically we have $a_0 + a_1 = \alpha$.

Now, after we have $a_0$ and $a_1$, we can calculate co-efficients: $$c_0 = \frac{a_0}{\pi}$$ $$c_1 = \frac{a_1}{\sqrt{3}}$$.

I have a feeling that the $t$ cannot be calculated from the $\alpha$, given that they are both located in same dimension, basically you need some criteria how $\alpha \in R$ can be divided to two separate dimensions. Thus your end result is large number of possible alternative coefficients. Every choice of $t$ will have different coefficients. Limiting $c_0,c_1 \in R$ to $Q$ sounds kinda difficult.

  • 1
    $\begingroup$ It's not guaranteed that the coefficients are positive or have the same sign as $\alpha$, so your initial hypothesis is wrong, but even if it was correct, we'd not be much ahead. $\endgroup$
    – Berci
    Dec 11, 2020 at 0:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .