Closed forms of $\int_0^\frac{\pi}{2}\frac{\sin(\alpha\phi)}{\sin(\phi)}d\phi$ and $\int_0^\frac{\pi}{2}\frac{\cos(\theta)}{\cos(\beta\theta)}d\theta$ I have recently looked into the two integrals:$$S(\alpha)=\int_0^\frac{\pi}{2}\frac{\sin(\alpha\phi)}{\sin(\phi)}d\phi$$
$$C(\beta)=\int_0^\frac{\pi}{2}\frac{\cos(\theta)}{\cos(\beta\theta)}d\theta, -1\le\beta\le1$$
I noticed that $S(2n+1)=\frac{\pi}{2}$ and that $S(2n)\in\Bbb Q$. However, I could not figure much out about $C(\beta)$. Could these integrals' closed forms be derived with the Weierstrass Half Angle Tangent Substitution? Or is there another method to evaluating these integrals?
EDIT: It looks like $C(\frac{1}{2n+1})$ is expressible in terms of $\pi$ and quadratic irrationals, and $C(\frac{1}{2n})$ is expressible in terms of hyperbolic tangents and quadratic irrationals.
 A: Hint: we may consider following formulas:
$$I=\int^{\pi/2}_0 \sin ^n x dx=\int^{\pi/2}_0 \cos ^n x dx=\frac{1.3.5. . .(n-1)}{2.4.6............n}\frac{\pi}{2}$$; if $n>=2$ is even.
$$I=\int^{\pi/2}_0 \sin ^n x dx=\int^{\pi/2}_0 \cos ^n x dx=\frac{2.4.6. . .(n-1)}{3.5.7............n}$$; if $n>=3$ is odd.
We can see that $\sin nx$ is a multiple of $\sin x$ for example:
$$\sin 8x=\sin x(128 \cos^7 x-192 \cos^5 x +80 \cos^3 x-8 \cos x)$$
$$\sin 9x=\sin x(256 \cos^8x-448\cos^6 x+240 \cos^4 x-40\cos^2 x +1)$$
Also $\cos nx$ is a multiple of $\cos x$ for example:
$$\cos 9x=\cos x(266\sin^8x-448\sin^6 x+240 \sin^4 x -40 \sin^2 x +1)$$
Now due to your results and considering term with highest power and neglecting its coefficient in theses formulas we may conclude:
$$I=\int^{\pi/2}_0 \frac{\sin (2k+1) x}{\sin x}dx ≈\int^{\pi/2}_0 \cos ^{2k} x dx≈\frac{1.3.5. . .(2k-1)}{2.4.6...2k}\frac{\pi}{2}$$
$$I=\int^{\pi/2}_0 \frac{\sin 2k x}{\sin x}dx ≈\int^{\pi/2}_0 \cos ^{2k+1} x dx≈\frac{2.4.6. . .2k}{3.5.7........(2k+1)}$$
For second integral $-1=< \beta=<1$, suppose $\beta=\frac{1}{a}$; a is an integer and $\beta x=\frac{1}{a} x=t$ then $x=at$ and we have:
$$I=\int^{\pi/2}_0 \frac{\cos x}{\cos \beta x}dx =a\int^{\pi\beta/2}_0 \frac{\cos at}{\cos t}dt≈a\int^{\pi\beta/2}_0 \sin ^{2k} t dt≈a\frac{1.3.5. . .(2k-1)}{2.4.6........2k}\frac{\pi\beta}{2}≈\frac{1.3.5. . .(2k-1)}{2.4.6........2k}\frac{\pi}{2}$$, if a is odd $2k+1$.
$$I=\int^{\pi/2}_0 \frac{\cos x}{\cos \beta x}dx =a\int^{\pi\beta/2}_0 \frac{\cos at}{\cos t}dt≈a\int^{\pi\beta/2}_0 \sin ^{2k} t dt≈a\frac{2.4.6. . .2k}{3.5.7........(2k+1)}$$, if a is even $2k$.
A: $\newcommand{\bbx}[1]{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\,}
 \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack}
 \newcommand{\dd}{\mathrm{d}}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,}
 \newcommand{\ic}{\mathrm{i}}
 \newcommand{\mc}[1]{\mathcal{#1}}
 \newcommand{\mrm}[1]{\mathrm{#1}}
 \newcommand{\on}[1]{\operatorname{#1}}
 \newcommand{\pars}[1]{\left(\,{#1}\,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,}
 \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}}
 \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$
$\ds{\bbox[5px,#ffd]{}}$

\begin{align}
&\bbox[5px,#ffd]{\left.\int_{0}^{\pi/2}{\sin\pars{\alpha\phi} \over \sin\pars{\phi}}\,\dd\phi
\,\right\vert_{\ \alpha\ \in\ \mathbb{R}}} =
\on{sgn}\pars{\alpha}\,\Im\int_{0}^{\pi/2}{\expo{\ic\verts{\alpha}\phi} - 1 \over \sin\pars{\phi}}\,\dd\phi
\\[5mm] = &\
\left.\on{sgn}\pars{\alpha}\,\Im\int_{\phi\ =\ 0}^{\phi\ =\ \pi/2}{z^{\verts{\alpha}} - 1 \over \pars{z - 1/z}/\pars{2\ic}}\,{\dd z \over \ic z}
\,\right\vert_{\ z\ =\ \exp\pars{\ic\phi}}
\\[5mm] = &\
\left.2\on{sgn}\pars{\alpha}\,\Im\int_{\phi\ =\ 0}^{\phi\ =\ \pi/2}{1 - z^{\verts{\alpha}} \over 1 - z^{2}}\,\dd z
\,\right\vert_{\ z\ =\ \exp\pars{\ic\phi}}
\\[5mm] = &\
-2\on{sgn}\pars{\alpha}\,\,\Im\int_{1}^{0}{1 - y^{\verts{\alpha}}\expo{\ic\verts{\alpha}\pi/2} \over 1 + y^{2}}\,\ic\,\dd y
\\[5mm] = &\
2\on{sgn}\pars{\alpha}\int_{0}^{1}{1 - y^{\verts{\alpha}}\cos\pars{\alpha\pi/2} \over 1 + y^{2}}
\,\dd y
\\[5mm] = &\
2\on{sgn}\pars{\alpha}\int_{0}^{1}{1 - y^{\verts{\alpha}}\cos\pars{\alpha\pi/2} - y^{2} +
y^{\verts{\alpha} + 2}\cos\pars{\alpha\pi/2} \over 1 - y^{4}}
\,\dd y
\\[5mm] = &\
{1 \over 2}\on{sgn}\pars{\alpha}\ \times
\\[2mm] &\
\!\!\!\!\!\!\!\!\!\!\int_{0}^{1}{y^{-3/4} - y^{\verts{\alpha}/4 - 3/4}\cos\pars{\alpha\pi/2} - y^{-1/4} +
y^{\verts{\alpha}/4 - 1/4}\cos\pars{\alpha\pi/2} \over 1 - y}
\,\dd y
\\[5mm] = &\
{1 \over 2}\on{sgn}\pars{\alpha}\ \times
\\ &\
\left\{\cos\pars{\pi\alpha \over 2}\bracks{%
\int_{0}^{1}{1 - y^{\verts{\alpha}/4 - 3/4} \over 1 - y}\,\dd y
-
\int_{0}^{1}{1 - y^{\verts{\alpha}/4 - 1/4} \over 1 - y}
\,\dd y}\right.
\\[2mm] &
\left. \phantom{\cos\pars{\pi\alpha \over 2}\left[\,\,\,\,\right.}
+ \int_{0}^{1}{1 - y^{-1/4} \over 1 - y}\,\dd y
- \int_{0}^{1}{1 - y^{-3/4} \over 1 - y}\,\dd y\right\}
\\[5mm] = &
{1 \over 2}\on{sgn}\pars{\alpha}\cos\pars{\pi\alpha \over 2}
\bracks{\Psi\pars{\verts{\alpha} + 1 \over 4} -
\Psi\pars{\verts{\alpha} + 3 \over 4}}
\\[2mm] + &\
{1 \over 2}\on{sgn}\pars{\alpha}\
\underbrace{%
\bracks{\Psi\pars{3 \over 4} - \Psi\pars{1 \over 4}}}
_{\ds{= \pi\cot\pars{\pi \over 4} = \pi}}
\end{align}

Finally,
\begin{align}
&\bbox[5px,#ffd]{\left.\int_{0}^{\pi/2}{\sin\pars{\alpha\phi} \over \sin\pars{\phi}}\,\dd\phi
\,\right\vert_{\ \alpha\ \in\ \mathbb{R}}} =
{1 \over 2}\,\pi\on{sgn}\pars{\alpha}
\\[2mm] + &\
{1 \over 2}\on{sgn}\pars{\alpha}\cos\pars{\pi\alpha \over 2}
\bracks{\Psi\pars{\verts{\alpha} + 1 \over 4} -
\Psi\pars{\verts{\alpha} + 3 \over 4}}
\end{align}
