Author Topic: HA5 Problem 3  (Read 3453 times)

Victor Ivrii

  • Administrator
  • Elder Member
  • *****
  • Posts: 2607
  • Karma: 0
    • View Profile
    • Personal website of Victor Ivrii
HA5 Problem 3
« on: February 26, 2015, 10:52:26 PM »
Decompose into full Fourier series on interval $[-\pi,\pi]$ and sketch the graph of the sum of such Fourier series:

a.  $|\sin(x)|$;
b.  $|\cos(x)|$.


Mark Nunez

  • Full Member
  • ***
  • Posts: 16
  • Karma: 0
    • View Profile
Re: HA5 Problem 3
« Reply #1 on: February 26, 2015, 11:07:05 PM »
 :-\

Biao Zhang

  • Full Member
  • ***
  • Posts: 17
  • Karma: 0
    • View Profile
Re: HA5 Problem 3
« Reply #2 on: February 27, 2015, 07:16:47 PM »
[a:]
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(a-b)$,  \begin{equation*} =\frac{1}{\pi} \int_{0}^{\pi} \sin ((n+1)x) + \sin ((1-n)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((n-1)x)}{n-1}  \right]_{0}^{\pi}\\ =-\frac{1}{\pi}\left[\frac{(-1)^{n+1}}{n+1} - \frac{1}{n+1} - \frac{(-1)^{n+1}}{n-1} + \frac{1}{n-1}  \right]_{0}^{\pi}\\ =\frac{1}{\pi}\big((-1)^n + 1 \big) \big(\frac{1}{n+1} + \frac{1}{n-1}  \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*} 
[b:] 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.