Home » Blog » Use integration by parts to find a formula for the integral of sin2 x

Use integration by parts to find a formula for the integral of sin2 x

Use integration by parts to prove the validity of the formula:

    \[ \int \sin^2 x \, dx = -\sin x \cos x + \int \cos^2 x \, dx. \]

Then, use the pythagorean identity for trig functions (i.e., \sin^2 x + \cos^2 x = 1 which implies \cos^2x = 1 - \sin^2 x) to prove the formula:

    \[ \int \sin^2 x \, dx = \frac{1}{2}x - \frac{1}{4} \sin (2x). \]


Proof. First, to use integration by parts we define the following functions

    \begin{align*}  u &= \sin x & \implies && du &= \cos x \, dx \\  dv &= \sin x \, dx& \implies && v &= -\cos x. \end{align*}

Since \sin^2 x = (\sin x)(\sin x) we then apply integration by parts,

    \begin{align*}  \int \sin^2 x \, dx &= \int u \, dv \\  &= uv - \int v \, du \\  &= -\sin x \cos x + \int \cos^2 x \, dx.  \end{align*}

This was the first requested formula. Now, we use the identity \cos^2 x = 1 - \sin^2 x to write

    \begin{align*}  && \int \sin^2 x \, dx &= -\sin x \cos x + \int \cos^2 x \, dx \\  \implies && \int \sin^2 x \, dx &= - \sin x \cos x + \int (1 - \sin^2 x) \, dx \\  \implies && \int \sin^2 x \, dx &= - \sin x \cos x + \int dx - \int \sin^2 x \, dx \\  \implies && 2 \int \sin^2 x \, dx &= - \sin x \cos x + x + C \\  \implies && \int \sin^2 x \, dx &= \frac{1}{2}x - \frac{1}{4} \sin (2x) + C. \end{align*}

In the last line we used the trig identity \sin (2x) = 2 \sin x \cos x. This establishes the formula requested. \qquad \blacksquare

One comment

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