How to solve $\int_0^\pi \sin ^2 \theta(1 + \cos \theta)^4 d\theta $?
I have tried substitution of cosine and sine, dividing and multiplying by Sine and cosine, converting everything to tan. It can probably be solved using beta/gamma function but I can't figure it out.
The integral is equal to $$\frac12\int_{-\pi}^\pi\left(\frac{e^{i\theta}-e^{-i\theta}}{2i}\right)^2\left(1+\frac{e^{i\theta}+e^{-i\theta}}{2}\right)^4d\theta=-\frac{1}{128}\int_{-\pi}^\pi e^{-6i\theta}(e^{2i\theta}-1)^2(e^{i\theta}+1)^8\,d\theta,$$ and if we imagine the integrand written as a linear combination of exponentials, then all the exponentials vanish after the integration, and only its constant term "survives". It is equal to $$[z^6](z^2-1)^2(z+1)^8=\binom{8}{2}-2\binom{8}{4}+\binom{8}{6}=28-2\cdot70+28=-84,$$ so the integral is equal to $\dfrac{84}{128}\cdot2\pi=\dfrac{21}{16}\pi$.