\documentclass[a4paper,12pt]{article}
\newcommand{\ds}{\displaystyle}
\newcommand{\un}{\underline}
\parindent=0pt
\begin{document}

{\bf Question}

Find the rms value in the interval $0 \leq x \leq 2\pi$ of the
function $$e^{-\frac{x}{5}}\sin\left(\ds\frac{x}{2}\right).$$

\medskip

{\bf Answer}

$\begin{array} {rcl} \rm{rms} & = &
\sqrt{\ds\frac{1}{2\pi-0}\ds\int_0^{2\pi}\left(e^{-\frac{x}{5}}\sin\frac{x}{2}\right)^2
\,dx}\\ & & \\ & = &
\sqrt{\ds\frac{1}{2\pi}\ds\int_0^{2\pi}e^{-\frac{2x}{5}}\sin^2\ds\frac{x}{2}
\,dx} \end{array}$

Consider $K=\ds\int_0^{2\pi} e^{-\frac{2x}{5}}\sin^2\ds\frac{x}{2}
\,dx$

The first thing to do is get rid of the $\sin^2\ds\frac{x}{2}$
term by using the double angle formula.

$$\begin{array} {rcl} 1-2\sin^2\left(\ds\frac{x}{2}\right) & = &
\cos x\\ \Rightarrow \sin^2\left(\ds\frac{x}{2}\right) & = &
\ds\frac{1}{2}(1-\cos x) \end{array}$$

So

$\begin{array} {rcl} K & = & \ds\frac{1}{2}\ds\int_0^{2\pi}
e^{-\frac{2x}{5}}(1-\cos x) \,dx\\ & & \\ & = &
\ds\frac{1}{2}\ds\int_0^{2\pi} e^{-\frac{2x}{5}}
\,dx-\ds\frac{1}{2}\ds\int_0^{2\pi} e^{-\frac{2x}{5}} \cos x
\,dx\\ & = & \ \ \ \rm{Easy} \ \ \ \ \ \ \ \ \rm{Hard}\\ & & \\ &
= &
\ds\frac{1}{2}\left[\ds\frac{-5}{2}e^{-\frac{2x}{5}}\right]_0^{2\pi}-\ds\frac{1}{2}I\
\ \ \rm{say}\\ & & \\ & = &
-\ds\frac{5}{4}(e^{\frac{-4\pi}{5}}-1)-\ds\frac{1}{2}I
\end{array}$

Consider $I$ now:

$$I=\ds\int_0^{2\pi}e^{-\frac{2x}{5}}\cos x \,dx$$

This is difficult to do, so integrate by parts.

$$\begin{array} {cc} u=e^{-\frac{2x}{5}} & \ds\frac{dv}{dx}=\cos x
\\ \ds\frac{du}{dx}=-\ds\frac{2}{5}e^{-\frac{2x}{5}} & v=\sin x
\end{array}$$

Then

$$I=[e^{-\frac{2x}{5}}\sin
x]_0^{2\pi}-\ds\int_0^{2\pi}\left(-\ds\frac{2}{5}e^{-\frac{2x}{5}}\right)\sin
x \,dx$$

So $I=0+\ds\frac{2}{5}\ds\int_0^{2\pi}e^{-\frac{2x}{5}} \sin x
\,dx$

$\Rightarrow I=\ds\frac{2}{5}J$

Where

$$J=\ds\int_0^{2\pi} e^{-\frac{2x}{5}} \sin x \,dx$$

This is still hard, but we can integrate by parts again. Why? I
can turn the sin back into a cos $\Rightarrow$ I'm back with $I$
again and if I've done it correctly, I have a reduction formula:

$$\begin{array} {cc} u=e^{-\frac{2x}{5}} & \ds\frac{dv}{dx}=\sin x
\\ \ds\frac{du}{dx}=-\ds\frac{2}{5}e^{-\frac{2x}{5}} & v=-\cos x
\end{array}$$

So

$\begin{array} {rcl} J & = & [-e^{-\frac{2x}{5}}\cos x]_0^{2\pi} -
\ds\int_0^{2\pi} \ds\frac{2}{5} \cos x e^{-\frac{2x}{5}} \,dx\\ &
= & -3^-\frac{4\pi}{5}
\cos{2\pi}+e^0\cos0-\ds\frac{2}{5}\ds\int_0^{2\pi}\cos x
e^{-\frac{2x}{5}} \,dx\\ & = &
-e^{-\frac{4\pi}{5}}+1-\ds\frac{2}{5}I \end{array}$

Thus

$\begin{array} {rcl} & I & =\ds\frac{2}{5}J =
\ds\frac{2}{5}\left[1-e^{-\frac{4\pi}{5}}-\ds\frac{2}{5}I\right]\\
& & \\ & \Rightarrow & I =
\ds\frac{2}{5}(1-e^{-\frac{4\pi}{5}})-\ds\frac{4}{25}I\\ & & \\ &
\Rightarrow & \ds\frac{29}{5}I =
\ds\frac{2}{5}(1-e^{-\frac{4\pi}{5}})\\ & & \\ & \Rightarrow & I =
\ds\frac{2 \times 25}{29 \times 5}(1-e^{-\frac{4\pi}{5}})\\ & & \\
& &
 = \ds\frac{10}{29}(1-e^{-\frac{4\pi}{5}}) \end{array}$

\newpage
Now look back to the original integral $K$:

$\begin{array} {rcl} K & = &
-\ds\frac{5}{4}(e^{-\frac{4\pi}{5}}-1)-\ds\frac{1}{2}I\\ & & \\& =
&
\ds\frac{5}{4}(1-e^{-\frac{4\pi}{5}})-\ds\frac{1}{2}\ds\frac{10}{29}(1-e^{-\frac{4\pi}{5}})\\
& & \\ & = &
(1-e^{-\frac{4\pi}{5}})\left(\ds\frac{5}{4}-\ds\frac{20}{58}\right)\\
& & \\ & = &
(1-e^{-\frac{4\pi}{5}})\left(\ds\frac{58\times5-80}{4\times
58}\right)\\ & & \\ & = &
(1-e^{-\frac{4\pi}{5}})\left(\ds\frac{210}{232}\right)\\ & & \\ &
= & (1-e^{-\frac{4\pi}{5}})\left(\ds\frac{105}{116}\right)
\end{array}$

Now RMS value

$\begin{array} {cl} = & \sqrt{\ds\frac{1}{2\pi} \times K}\\ = &
\un{\sqrt{\ds\frac{105}{232\pi}(1-e^{-\frac{4\pi}{5}})}}
\end{array}$
\end{document}
