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

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.

• An application of the tangent half-angle identity$$\frac{\sin\alpha+\sin\beta}{\cos\alpha+\cos\beta} = \tan\frac{\alpha+\beta}2$$takes care of this. See my answer below. $\qquad$ – Michael Hardy Jun 11 '16 at 16:25

Maybe it is useful to notice that

$$\frac{\sin x-\sin(3x)+\sin(5x)}{\cos(x)+\cos(3x)+\cos(5x)}=\color{red}{\tan x}\tag{1}$$

and $\int \tan^2 x\,dx = -x+\tan(x).$ In terms of Chebyshev polynomials, $(1)$ is equivalent to: $$x\cdot\left(1-U_2(x)+U_4(x)\right) = T_1(x)+T_3(x)+T_5(x)\tag{2}$$ that is straightforward to check.

• (+1) That's just brilliant. How did you notice that, out of curiosity? The simplest way I know to discover it would be use trig formulae, or equivalently to look up a few Chebyshev polynomials of both kinds. – Semiclassical Jun 11 '16 at 15:47
• @Semiclassical: Chebyshev polynomials, exactly, you spotted me :D – Jack D'Aurizio Jun 11 '16 at 15:47
• Oh it is true! But its there a proof why they are equivalence? – YY Lam Jun 11 '16 at 15:48
• @YYLam Probably the simplest way is to write $\tan x=\frac{\sin x}{\cos x}$, then multiply both denominators out and simplify. What's left should follow from the product-to-sums identities. – Semiclassical Jun 11 '16 at 15:49
• I don't know much about Chebyshev polynomials. But I just manage to prove it using $2\sin{A}\sin{B}=\sin{(A+B)}+\sin{(A-B)}$, thus $\sin{x}-\sin{3x}+\sin{5x}=\frac{\sin{6x}}{2\cos{x}}$ – YY Lam Jun 11 '16 at 15:53


\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}

Someone's suggested Chebyshev polynomials. I hadn't thought of that, but I know the tangent half-angle formula: $$\frac{\sin\alpha+\sin\beta}{\cos\alpha+\cos\beta} = \tan\frac{\alpha+\beta}2.$$ From that we get $$\frac{\sin(-3x) + \sin(5x)}{\cos(-3x) + \cos(5x)} = \tan x.$$ Since $\cos(-3x)=\cos(3x)$, that's the same as the function that gets squared except it's missing the two functions of $1\cdot x$. But if $$\frac a b = \frac c d$$ then both are equal to $$\frac{a+b}{c+d}$$ and that can be applied in the case where we have $$\frac a b = \frac{\sin(-3x) + \sin(5x)}{\cos(-3x) + \cos(5x)} = \tan x = \frac{\sin x}{\cos x} = \frac c d.$$ with the ultimate conclusion that the fraction that gets squared under the integral sign is $\tan x$.