Evaluate $\int\frac {\sin 4x }{\sin x}\ dx$ 
Evaluate $$\int \frac{\sin 4x}{\sin x} dx$$

Attempt:
I've tried to use the double angle formulas and get it all into one identity, which came out as:
$$
\int \left( 8\cos^3x - 4\cos x \right) dx
$$
But I'm not sure if this is the right way to go about it. Any help would be much appreciated!
 A: $$\frac{\sin(4x)}{\sin(x)}=U_3(\cos(x)) = 8\cos^3(x)-4\cos(x) = 2T_3(\cos x)+2T_1(\cos(x))$$
hence:
$$ \frac{\sin(4x)}{\sin(x)} = 2\cos(3x)+2\cos(x) $$
implies:
$$ \int\frac{\sin(4x)}{\sin(x)}\,dx = \frac{2}{3}\sin(3x)+2\sin(x)+C. $$
A: Notice, $$\int\frac{\sin 4x}{\sin x}\ dx$$
$$=\int\frac{2\sin 2x\cos 2x}{\sin x}\ dx$$
$$=\int\frac{2(2\sin x\cos x) (1-2\sin^2x)}{\sin x}\ dx$$
$$=\int4(\cos x -2\sin^2x\cos x)\ dx$$
$$=4\int\cos x -8\int \sin^2x\cos x\ dx$$
$$=4\int\cos x -8\int \sin^2x\ d(\sin x)$$
$$=\color{blue}{4\sin x-\frac{8\sin^3 x}{3}+C}$$
A: We have
$$\frac{\sin(4x)}{\sin x}=\frac{2\sin(2x)\cos(2x)}{\sin x}=\frac{4\sin x\cos x\cos(2x)}{\sin x}$$
$$=4\cos x\cos(2x)=4\cos x(1-2\sin^2x)$$
Now set $\sin x=t$.
A: Here is another solution based on Dirichlet kernel
Lemma: $\sum _{k=-n} ^{n} e^{ikx} =  1 + 2 \sum _{k=1} ^{n} cos(kx) = \frac{sin((n+1)/2)}{sin(x/2)}$
Proof:
It's direct application for series sum $\sum _{k=-n} ^{n} x^k$, and Euler celebrated identity $e^{ix} = cos(x) + i sin(x)$, see wikipedia entry for full proof see wikipedia's entry
Now:
put $ x = \frac{u}{2} \Rightarrow dx = \frac{1}{2}du$
$\frac{1}{2} \int \frac{\sin 2u}{\sin \frac{u}{2}} dx = \int (1 +2 \sum _{k=1} ^{1} cos(ku)) dx = u - 2   sin(u) $

Note: This method works for any positive integer $n$ in $\int \frac{sin(2nx)}{sin(x)}$ 
A: We can put the complex identity
$$\sin \alpha := \frac{\exp(i \alpha) - \exp(-i \alpha)}{2i}$$ to efficient use here.
Taking $\alpha = 4 x$ gives
$$\sin 4x = \frac{\exp(4 i x) - \exp(-4 i x)}{2i},$$
We can use a difference-of-squares factorization to write the numerator as
\begin{align*}
\exp(4 i x) - \exp(-4 i x)
&= [\exp(2 i x) + \exp(-2 i x)][\exp(2 i x - \exp(2 i x)] \\
&= [\exp(2 i x) + \exp(-2 i x)][\exp (i x) + \exp(- i x)][\exp (i x) - \exp(- i x)]
\end{align*}
Now, substituting using the complex identity for $\alpha = x$ gives
\begin{align*}
\sin 4x = [\exp(2 i x) + \exp(-2 i x)][\exp (i x) + \exp(- i x)] \cdot \frac{\exp (i x) - \exp(- i x)}{2 i} = [\exp(2 i x) + \exp(-2 i x)][\exp (i x) + \exp(- i x)] \sin x.
\end{align*}
So, expanding and using the corresponding cosine identity
$$\cos \alpha = \frac{\exp(i \alpha) + \exp(-i \alpha)}{2}$$ gives
\begin{align*}
\frac{\sin 4x}{\sin x}
&= [\exp(2 i x) + \exp(-2 i x)][\exp (i x) + \exp(- i x)]\\
&= \exp(3 i x) + \exp(-3 i x) + \exp(i x) + \exp(-i x) \\
&= 2 (\cos 3x - \cos x) .
\end{align*}
In this form, we can compute the antiderivative quickly.
