<s>[INST] Integrate $\int \cos^n x dx$ I know how to solve it with reduction formula, but is there concrete answer for this integral (without other integrals like in reduction formula)?
WolframAlpha gives me expression with $F_1(\frac{1}{2}, \frac{n+1}{2};\frac{n+3}{2}; cos^2(x))$, but I don't know really what it is. I want to know if there is a simpler solution for this without other integrals like in reduction formula and difficult things like $F_1(\frac{1}{2}, \frac{n+1}{2};\frac{n+3}{2}; cos^2(x))$?
 [/INST] Using $z=e^{ix}$ we have
$$i2^n\int \cos^nx\,dx=\int(z+z^{-1})^n\frac{dz}{z}=\int\sum_{k=0}^n\binom nkz^{2k-n-1}dz=\sum_{k=0}^n\binom nk\frac{z^{2k-n}}{2k-n},$$ with a special case when $2k=n$ (giving a term in $\log z$). We can regroup the terms in pairs of opposite exponents.
For odd $n$, this is
$$2i\sum_{k=(n+1)/2}^n\binom nk\frac{\sin(2k-n)x}{2k-n},$$
and for even $n$,
$$2i\sum_{k=n/2+1}^n\binom nk\frac{\sin(2k-n)x}{2k-n}+\binom n{n/2}ix.$$

For concrete examples,


*

*$n=3$,


$$\int\frac{(z+z^{-1})^3}{2^3}\frac{dz}{iz}=\int\frac{z^2+3z^0+3z^{-2}+z^{-4}}{8i}dz=\frac1{8i}\left(\frac{z^3-z^{-3}}3+3(z-z^{-1})+6\log z\right)\\
=\frac{\sin3x}{12}+\frac{3\sin x}{4}.$$


*

*$n=4$,


$$\int\frac{(z+z^{-1})^4}{2^4}\frac{dz}{iz}=\int\frac{z^3+4z+6z^{-1}+4z^{-3}+z^{-5}}{16i}dz=\frac1{16i}\left(\frac{z^4-z^{-4}}4+2(z^2-z^{-2})+6\log z\right)\\
=\frac{\sin4x}{32}+\frac{\sin2x}{4}+\frac38x.$$
</s>