The main strategy for integration by parts is to pick $u$ and
$dv$ so that $v\, du$ is simpler to integrate than $u \,dv$.
Sometimes this isn't possible. In those cases we look for ways to
relate $\int u\, dv$ to $\int v \,du$ algebraically, and then use
algebra to solve for $\int u \,dv$. This method is
especially good for integrals involving products of $e^x$,
$\sin(x)$ and $\cos(x)$. Sometimes you need to integrate by parts
twice to make it work.
In the video, we computed $\int \sin^2 x\, dx$.
Example 1:
DO: Compute this integral now, using integration
by parts, without looking again at the video or your notes.
The worked-out solution is below.
Example 2:
DO: Compute this integral using the trig identity
$\sin^2 x=\frac{1-\cos(2x)}{2}$ without looking ahead.
The worked-out solution is below.
Solution 1: We set $u =\sin(x)$ and $dv = \sin(x)\,
dx$, so applying integration by parts gives $$\int \sin^2(x)
\,dx \overset{\fbox{$\,\,u\,=\,\sin(x)\quad\,\,\,
v\,=\,-\cos(x)\\du\,=\,\cos(x) dx\,\,\,
dv\,=\,\sin(x)\,dx$}\\}{=} -\sin(x)\cos(x) + \int \cos^2(x)
\,dx.$$ But $\cos^2(x)=1-\sin^2(x)$, so $\int \cos^2(x)
\,dx=\int(1-\sin^2 x)\,dx=\int\,dx-\int\sin^2 x\,dx$. We
substitute this in, and then add this last term to the left-hand
side from above, getting
$$ \begin{eqnarray}\int \sin^2(x)\, dx &=& -
\sin(x)\cos(x) + \int dx - \int \sin^2(x) \,dx \cr 2 \int
\sin^2(x)\, dx &=& - \sin(x)\cos(x)+x + C \cr \int
\sin^2(x) \,dx &=& \frac{x - \sin(x)\cos(x)}{2} +
c\end{eqnarray} $$
Solution 2: $$\int \sin^2 x\, dx=\int
\frac{1-\cos(2x)}{2}\,dx=\frac{1}{2}\int(1-\cos(2x))\,dx=\frac{1}{2}\left(x-\frac{1}{2}\sin(2x)\right)+c=\frac{1}{2}\left(x-\frac{1}{2}2\sin
x\cos x\right)+c$$ $$= \frac{x - \sin(x)\cos(x)}{2} + c.$$
Here, we used another trig identity that you should know:
$\sin(2x)=2\sin x\cos x$.
Remember: always check to see that you
have the right antiderivative by differentiating it!