# Indefinite integral:$\int \cos(2018x)\sin^{2016}(x)dx$

Evaluate $$\int \cos(2018x)\sin^{2016}(x)dx$$

I could solve this using IBP, $$I=\int \cos(2017x+x)\sin^{2016}(x)dx$$ $$=\int \cos(2017x)\sin^{2016}(x) \cos(x)dx -\int \sin^{2017}(x)\sin(2017x)$$ $$=\frac{\cos(2017x)\sin^{2017}(x)}{2017} +\int \frac{2017\sin^{2017}(x)\sin(2017x)}{2017}dx - \int \sin^{2017}(x)\sin(2017x)$$ $$=\frac{\cos(2017x)\sin^{2017}(x)}{2017}+c$$

However I while trying to solve this question using complex numbers, I didn't obtain the final result. Here's what I did:

The give integral is $$\int e^{2018ix} (\frac{e^{ix}-e^{-ix}}{2i})^{2016} dx$$(considering real of this and in subsequent steps)

$$=\frac{1}{2^{2016}} \int e^{2ix}(e^{2ix}-1)^{2016} dx$$.

$$e^{2ix}-1=t$$, $$e^{2ix}2idx=dt$$

$$=\frac{1}{2^{2016}} \int t^{2017} dt/2i$$.

$$=\frac{t^{2017}}{2^{2017}i \cdot 2017}+c$$

So answer is $$-Im(\frac{t^{2017}}{2^{2017} \cdot 2017})$$

I'm unable to evaluate $$t^{2017}=(e^{2ix}-1)^{2017}$$ and get it to the form as obtained by IBP. I did the binomial expansion however, I wasn't able to get it to a nice form.

Also is there a generalisation to this problem? Can $$\int \cos(mx) \sin^{n}(x) dx$$ also be evaluated like this?(not by using reduction formula)

• There is a typo, it should be $\int t^{2016}dt/2i$. Also at the end don't you wanna take the real part (Re) instead of -Im? Commented Jun 6, 2020 at 14:17
• You want to take real part of the integral so as answer in the end should be just Im part of the expression. Commented Jun 6, 2020 at 14:42

$$t^{2017}=(e^{2ix}-1)^{2017}=(e^{ix})^{2017}(e^{ix}-e^{-ix})^{2017}$$ So, $$t^{2017}=(e^{2017ix})(2i\sin x)^{2017}=(\cos 2017x+i\sin 2017x)(2i\sin x)^{2017}$$ If you take Im part of this expression, you get $$Im(t^{2017})=2^{2017}\cos(2017 x)(\sin x)^{2017}$$ So, the answer $$\frac{Im(t^{2017})}{2017\cdot 2^{2017}}=\frac{\cos(2017 x)(\sin x)^{2017}}{2017}$$ Coincides with your other answer.

• Oh yes thanks a lot! Commented Jun 6, 2020 at 14:49

Note that $$\frac{1}{n+1}\frac{d}{dx} \sin^{n+1}(x)\cos((n+1)x) = \sin^n(x)\cos((n+1)x)\cos(x)-\sin^{n+1}(x)\sin((n+1)x)$$ $$= \sin^n(x)\left(\cos((n+1)x)\cos(x)-\sin(x)\sin((n+1)x)\right)$$ $$= \sin^n(x)\cos((n+2)x)$$So, the antiderivative is $$\frac{1}{2017}\sin^{2017}(x)\cos(2017x)+C$$. It might be possible to generalize this as well.

• Hmm, I'm not super optimistic about a generalization. $$\frac{d}{dx}\sin^a(x) \cos(b x) = \sin^{a - 1}(x) (a \cos(x) \cos(b x) - b \sin(x) \sin(b x));$$ that $a=b$ here is essential for simplification. Commented Jun 6, 2020 at 14:23
• See the generalized answer here which I wrote today. Although cosine and sine are flipped, but it would work for both I guess.
– V.G
Commented Jan 19, 2021 at 18:36