Home » Blog » Derive a formula for the integral of cosn x

Derive a formula for the integral of cosn x

Using integration by parts, prove the following:

    \[ \int \cos^n x \, dx = \frac{\cos^{n-1} x \sin x}{n} + \frac{n-1}{n} \int \cos^{n-2} x \, dx. \]


Proof. To use integration by parts we define

    \begin{align*} u &= \cos^{n-1}x & \implies && du &= -(n-1) \cos^{n-2} x \sin x \, dx\\ dv &= \cos x \, dx & \implies && v &= \sin x. \end{align*}

Then, using the pythagorean identity \sin^2 x = 1 - \cos^2 x, we have

    \begin{align*} && \int \cos^n x \, dx &= \int u \, dv \\ &&&= uv - \int v \, du \\ &&&= \cos^{n-1} x \sin x + (n-1) \int \cos^{n-2} x \sin^2 x \, dx\\[9pt] &&&= \cos^{n-1} x \sin x + (n-1) \int \cos^{n-2} x (1-\cos^2x ) \, dx \\[9pt] &&&= \cos^{n-1} x \sin x + (n-1) \left( \int \cos^{n-2} x \, dx - \int \cos^n x \, dx \right) \\[9pt] \implies && n \int \cos^n x \, dx &= \cos^{n-1} x \sin x + (n-1) \int \cos^{n-2} x \, dx \\[9pt] \implies && \int \cos^n x \, dx &= \frac{\cos^{n-1} x \sin x }{n} + \frac{n-1}{n} \int \cos^{n-2} x \, dx. \qquad \blacksquare \end{align*}

Point out an error, ask a question, offer an alternative solution (to use Latex type [latexpage] at the top of your comment):