TITLE: For which $n$ is $ \int_0^{\pi/2} \frac{\mathrm{d}x}{2+\sin nx}= \int_0^{\pi/2} \frac{\mathrm{d}x}{2+\sin x}=\frac{\pi}{3\sqrt{3\,}\,}$?
QUESTION [17 upvotes]: I have been trying to figure out for which $n$ is $$ \int_0^{\pi/2} \frac{\mathrm{d}x}{2+\sin nx} = \int_0^{\pi/2} \frac{\mathrm{d}x}{2+\sin x}=\frac{\pi}{3\sqrt{3\,}\,}$$
Using maple I got the following values below 100 
$$
n = 1
,\,2
,\,12
,\,13
,\,14
,\,24
,\,25
,\,26
,\,36
,\,37
,\,38
,\,48
,\,49
,\,50
,\,60
,\,61
,\,62
,\,73
,\,74
,\,85
,\,86
,\,98
,\,110
$$
But I am having a hard time seeing any pattern. I tried calculating the integral directly.
The integral seems to converge for all $n$, but a closed form seems hard. Any help would be appreciated =)
EDIT: I ran a few more tests and can not find any more integer values that work. Are the list above exhaustive?

REPLY [3 votes]: Although the problem has been solved a different method is presented here.
The problem asks to find which values of $n$ that satisfy
\begin{align}
\int_{0}^{\pi/2} \frac{dx}{2 + \sin(nx)} = \int_{0}^{\pi/2} \frac{dx}{2 + \sin(x)} 
= \frac{\pi}{3 \sqrt{3}}.
\end{align}
The solution proposed is as follows.
Consider the integral
\begin{align}
I = \int_{0}^{\pi/2} \frac{dx}{a + \sin(nx)}.
\end{align}
The integral $I$ can be evaluated as 
\begin{align}
I &= \left[ \frac{2}{ \sqrt{a^{2}-1} \ n } \tan^{-1} \left( \frac{a \tan\left(\frac{nx}{2}\right) + 1}
{ \sqrt{a^{2}-1}} \right) \right]_{0}^{\pi/2} \\
&= \frac{2}{\sqrt{a^{2}-1} \ n } \left[ \tan^{-1} \left( \frac{a \tan\left(\frac{n\pi}{4}\right) + 1}
{ \sqrt{a^{2}-1}} \right) - \tan^{-1} \left( \frac{1}{ \sqrt{a^{2}-1}} \right) \right] \\
&= \frac{2}{\sqrt{a^{2}-1} \ n } \tan^{-1} \left( \frac{ \sqrt{a^{2}-1} \ \theta_{n} }{ a + \theta_{n}}
\right) \\
I &= \frac{2}{\sqrt{a^{2}-1} \ n } \tan^{-1} \left( \frac{ \sqrt{a^{2}-1} }{ a/\theta_{n} + 1}
\right),
\end{align}
where $\theta_{n} = \tan(n\pi/4)$. Now, returning to the original integral, make the substitution
$x = \pi/2 -u$ to obtain
\begin{align}
I &= \int_{0}^{\pi/2} \frac{du}{a + \sin(\frac{n \pi}{2} - nu)} \\
&= \int_{0}^{\pi/2} \frac{du}{a + \sin\left(\frac{n \pi}{2}\right) \cos(n u) - \cos\left(
\frac{n \pi}{2}\right) \sin(n u)}
\end{align}
for which if the integral is to remain of the same form then it is required that
\begin{align}
\sin\left( \frac{n \pi}{2} \right) &= 0 \\
\cos\left( \frac{n \pi}{2} \right) &= -1.
\end{align}
From the sine equation it is seen that it is satisfied if $n = 2r$ for $r \geq 0$. The cosine 
equation is satisfied if $n = 4k+2$ for $k \geq 0$. It is evident that $2,6,10,\cdots$ is a 
subset of values in the set defined by $2r$ for $r \geq 0$. Since both equations are satisfied by the subset of values, this leads to the allowed values of $n$ for which the integral remains of the same form is $n = 4k+2$ for $k \geq 0$. This can be 
seen as
\begin{align}
\int_{0}^{\pi/2} \frac{dx}{a + \sin((4k+2)x)} = \int_{0}^{\pi/2} \frac{dx}{a + \sin(x)}, 
\end{align}
for $k \geq 0$. 
Now, with this $n$ value, it is seen that $\theta_{n}$ becomes
\begin{align}
\theta_{4k+2} &= \tan\left( \frac{(4k+2) \pi}{4} \right) = \tan\left( k \pi + \frac{\pi}{2} \right) \\
&= \frac{ \sin(k \pi + \pi/2) }{ \cos(k \pi + \pi/2) } = \frac{ (-1)^{k} }{ 0 } = \infty .
\end{align}
for which $1/\theta_{4k+2} = 0$. By using this result in the evaluation of the integral defined
earlier provides
\begin{align}
I = \frac{2}{\sqrt{a^{2}-1} \ (4k+2) } \tan^{-1}( \sqrt{a^{2}-1} ).
\end{align}
Hence,
\begin{align}
\int_{0}^{\pi/2} \frac{dx}{a + \sin((4k+2)x)} &= \int_{0}^{\pi/2} \frac{dx}{a + \sin(x)} \\
&= \frac{1}{\sqrt{a^{2}-1} \ (2k+1) } \tan^{-1}( \sqrt{a^{2}-1} ),
\end{align}
for $k \geq 0$.
When $a=2$ the reduction leads to
\begin{align}
\int_{0}^{\pi/2} \frac{dx}{2 + \sin((4k+2)x)} &= \frac{ \tan^{-1}( \sqrt{3} ) }{\sqrt{3} \ (2k+1) } \\
&= \frac{ \tan^{-1}( \tan(\pi/3) ) }{\sqrt{3} \ (2k+1) } = \frac{\pi}{3 \sqrt{3} \ (2k+1) }.
\end{align}
It is now evident that the only value of $k$ that satisfies the desired result is $k=0$. 
Hence, in terms of the original notation, the only values of $n$ are 1 and 2.