TITLE: Evaluate $\int_{1/10}^{1/2}\left(\frac{\sin{x}-\sin{3x}+\sin{5x}}{\cos{x}+\cos{3x}+\cos{5x}}\right)^2dx$
QUESTION [8 upvotes]: How can I evaluate the following integral?

$$\int_{1/10}^{1/2}\left(\frac{\sin{x}-\sin{3x}+\sin{5x}}{\cos{x}+\cos{3x}+\cos{5x}}\right)^2dx$$  

I notice that the numerator and the denominator are very similar. So my direction is to evaluate this integral by substitution. However, I cannot find a suitable substitution so that the integral can be nice.

REPLY [6 votes]: $\newcommand{\angles}[1]{\left\langle\, #1 \,\right\rangle}
 \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{\half}{{1 \over 2}}
 \newcommand{\ic}{\mathrm{i}}
 \newcommand{\iff}{\Leftrightarrow}
 \newcommand{\imp}{\Longrightarrow}
 \newcommand{\ol}[1]{\overline{#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}$
\begin{align}
&\color{#f00}{\sin\pars{x} - \sin\pars{3x} + \sin\pars{5x}}
\\[3mm] = &\
\Im\sum_{k = 0}^{2}\pars{-1}^{k}\expo{\ic\pars{2k + 1}x} =
\Im\bracks{\expo{\ic x}\,
{\pars{-\expo{2\ic x}}^{3} - 1 \over -\expo{2\ic x} - 1}} =
\sin\pars{3x}\,{\cos\pars{3x} \over \color{#f00}{\cos\pars{x}}}\tag{1}
\\
&\ --------------------------------
\\
&\color{#f00}{\cos\pars{x} + \cos\pars{3x} + \cos\pars{5x}}
\\[3mm] = &\
\Re\sum_{k = 0}^{2}\expo{\ic\pars{2k + 1}x} =
\Re\bracks{\expo{\ic x}\,
{\pars{\expo{2\ic x}}^{3} - 1 \over \expo{2\ic x} - 1}} =
\cos\pars{3x}\,{\sin\pars{3x} \over \color{#f00}{\sin\pars{x}}}\tag{2}
\\
&\ --------------------------------
\\ &\
\mbox{Then,}\quad {\pars{1} \over \pars{2}} = \color{#f00}{\tan\pars{x}}
\end{align}