Toronto Math Forum
APM3462012 => APM346 Math => Home Assignment 5 => Topic started by: Zarak Mahmud on October 31, 2012, 11:14:52 PM

Part (b):
The function is even, so $b_n = 0$.
\begin{equation*}
a_0 = \frac{2}{\pi} \int_{0}^{\pi} \sin x dx\\
= \frac{4}{\pi}.
\end{equation*}
\begin{equation*}
a_n = \frac{2}{\pi} \int_{0}^{\pi} \sin x \cos nx dx
\end{equation*}
Using $2\sin a \cos b = \sin(a+b) + \sin(ab)$,
\begin{equation*}
=\frac{1}{\pi} \int_{0}^{\pi} \sin ((n+1)x) + \sin ((1n)x) dx\\
\end{equation*}
Notice that for $n = 1$, the solution is $0$.
\begin{equation*}
=\frac{1}{\pi}\left[\frac{\cos((n+1)x)}{n+1}  \frac{\cos((n1)x)}{n1} \right]_{0}^{\pi}\\
=\frac{1}{\pi}\left[\frac{(1)^{n+1}}{n+1}  \frac{1}{n+1}  \frac{(1)^{n+1}}{n1} + \frac{1}{n1} \right]_{0}^{\pi}\\
=\frac{1}{\pi}\big((1)^n + 1 \big) \big(\frac{1}{n+1} + \frac{1}{n1} \big)\\
=\frac{2}{\pi} \big((1)^n + 1 \big) \big( \frac{1}{n^2  1} \big).\\
\end{equation*}
Let $n=2k$. Thus, for $n>1$,
\begin{equation*}
\sin x = \frac{2}{\pi} \frac{4}{\pi} \sum_{k=1}^{\infty} \frac{1}{(2k)^2  1}\cos (2kx).
\end{equation*}
Part (a):
Again, the function $\cos x$ is even, so $b_n = 0$.
We proceed as above:
\begin{equation*}
a_0 = \frac{2}{\pi} \int_{0}^{\pi} \cos x dx \\
= \frac{2}{\pi} \int_{0}^{\frac{\pi}{2}} \cos x dx  \frac{2}{\pi} \int_{\frac{\pi}{2}}^{\pi} \cos x dx\\
= \frac{4}{\pi}\\
\end{equation*}
\begin{equation*}
a_n = \frac{2}{\pi} \int_{0}^{\pi} \cos x\cos{nx} dx \\
= \frac{2}{\pi} \int_{0}^{\frac{\pi}{2}} \cos x \cos{nx} dx  \frac{2}{\pi} \int_{\frac{\pi}{2}}^{\pi} \cos x \cos{nx} dx\\
= \frac{2}{\pi}\left(2\frac{\cos{\frac{\pi n}{2}}}{n^2  1}\right)\\
\end{equation*}
Therefore,
\begin{equation*}
\cos x = \frac{2}{\pi}  \frac{4}{\pi}\sum_{n=1}^{\infty} \frac{\cos{\frac{\pi n}{2}}}{n^2  1} \cos{nx}.
\end{equation*}
Both functions are continuous, so the Fourier series will converge to each function at every point.

3(a) Need to mention that function is even so $b_n=0$.
3(b) pending
Sketches?

3(a) Need to mention that function is even so $b_n=0$.
3(b) pending
Sketches?
Thanks, fixed. I was going to write some code in python to produce plots with a few values of $n$, but it might take a bit.

Here are the graphs of the $\sin x$ function. You can see both the original function and the fourier series of the function overlaid on the same graph.

Very nice. Actually partial F.s. were not required. Obviously in cosseries only even terms are not $0$; sp $n=2m$ and $\cos(n\pi/2)=(1)^m$