# How to integrate $\frac{\cos2x}{ \sin x + \sin 3x}$?

I thought of using trig identities to get rid of $$\cos2x$$ and $$\sin3x$$, then use Weierstrass substitution, but I got myself into big trouble as the expression got too complicated.

Is there a simpler way to tackle this problem?

• Just the antiderivative? If this is a definite integral over, say, $[0,2\pi]$, you can replace $\cos(nx)=\frac{e^{ix}+e^{-ix}}2$ and $\sin(nx)=\frac{e^{ix}-e^{-ix}}{2i}$ and relate the integral to a contour integral along the unit disk centered at the origin. Mar 23, 2022 at 18:06
• @user170231 Thanks, but in my course we do not study those things. The furthest we went was Weierstrass substitution. No complex numbers are allowed. Mar 23, 2022 at 18:09

First, note that

$$\sin(x) + \sin(3x) = 4 \sin(x) \cos^2(x)$$

by the uncommonly-used triple angle identity for sine and the Pythagorean identity:

\begin{align*} \sin(3x) &= 3 \sin(x) - 4 \sin^3(x) \\ &= \sin(x) \Big( 3 - 4 \sin^2(x) \Big) \\ &= \sin(x) \Big( 3 - 4 \Big( 1 - \cos^2(x) \Big) \Big) \\ &= \sin(x) \Big( 3 - 4 + 4 \cos^2(x) \Big) \\ &= \sin(x) \Big( 4 \cos^2(x) - 1 \Big) \\ &= 4 \sin(x) \cos^2(x) - \sin(x) \end{align*}

Then

$$\mathcal{I} := \int \frac{\cos(2x)}{\sin(x) + \sin(3x)} \, dx = \frac 1 4 \int \frac{\cos(2x)}{\sin(x)\cos^2(x)} \, dx$$

Then using a double-angle formula for cosine,

$$\cos(2x) = 2 \cos^2(x) - 1$$

we get

$$\mathcal{I} = \frac 1 2 \int \csc(x) \, dx - \frac 1 4 \int \frac{1}{\sin(x) \cos^2(x)} \, dx$$

The former is well-known. The second integral may be rewritten with basic trigonometry identities (turn it into $$\csc(x) \sec^2(x)$$, use Pythagoras, use linearity) and solved easily.

Hint: $$\frac{\cos 2x}{\sin x + \sin 3x}=\frac{\cos^2 x-\sin^2 x}{2\sin 2x\cos x}=\frac{\cos^2 x-\sin^2 x}{4\sin x\cos^2 x}=\frac{1}{4\sin x}-\frac{\sin x}{4\cos^2x}$$

The method using the Weierstass substitution isn't so bad.

$$t=\tan\left(\frac x2\right) \implies \begin{cases}\sin(x) = \frac{2t}{1+t^2} \\ \cos(2x) = 2\left(\frac{1-t^2}{1+t^2}\right)^2 - 1 \\ \sin(3x) = \frac{6t(1-t^2)^2-8t^3}{(1+t^2)^3}\end{cases}$$

where we use the identities

$$\begin{cases}\sin(x) = 2\sin\left(\frac x2\right)\cos\left(\frac x2\right) \\ \cos(x) = \cos^2\left(\frac x2\right) - \sin^2\left(\frac x2\right) \\ \cos(2x) = 2\cos^2(x) - 1 \\ \sin(3x) = 3\cos^2(x)\sin(x) - \sin^3(x)\end{cases}$$

Now $$dt = \frac12\sec^2\left(\frac x2\right)\,dx \iff dx = \frac{2\,dt}{1+t^2}$$, so

\begin{align} \int \frac{\cos(2x)}{\sin(x) + \sin(3x)} \, dx &= \int \frac{2\left(\frac{1-t^2}{1+t^2}\right)^2-1}{\frac{2t}{1+t^2} + \frac{6t(1-t^2)^2-8t^3}{(1+t^2)^3}} \frac2{1+t^2} \, dt \\[1ex] &= 2 \int \frac{2(1-t^2)^2-(1+t^2)^2}{2t(1+t^2)^2 + 6t(1-t^2)^2-8t^3} \, dt \\[1ex] &= \frac14 \int \frac{t^4-6t^2+1}{t^5-2t^3+t} \, dt \\[1ex] &= \frac14 \int \left(\frac1t + \frac1{(t+1)^2} - \frac1{(t-1)^2}\right) \, dt \\[1ex] \end{align}