Author Topic: Problem 3  (Read 11911 times)

Zarak Mahmud

  • Sr. Member
  • ****
  • Posts: 51
  • Karma: 9
    • View Profile
Problem 3
« 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(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*}

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.
« Last Edit: November 02, 2012, 12:59:58 AM by Zarak Mahmud »

Victor Ivrii

  • Administrator
  • Elder Member
  • *****
  • Posts: 2607
  • Karma: 0
    • View Profile
    • Personal website of Victor Ivrii
Re: Problem 3
« Reply #1 on: November 01, 2012, 02:00:16 AM »
3(a) Need to mention that function is even so $b_n=0$.

3(b) pending

Sketches?

Zarak Mahmud

  • Sr. Member
  • ****
  • Posts: 51
  • Karma: 9
    • View Profile
Re: Problem 3
« Reply #2 on: November 01, 2012, 10:18:31 PM »
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.
« Last Edit: November 02, 2012, 12:09:32 AM by Zarak Mahmud »

Zarak Mahmud

  • Sr. Member
  • ****
  • Posts: 51
  • Karma: 9
    • View Profile
Re: Problem 3
« Reply #3 on: November 02, 2012, 12:15:11 AM »
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.

Victor Ivrii

  • Administrator
  • Elder Member
  • *****
  • Posts: 2607
  • Karma: 0
    • View Profile
    • Personal website of Victor Ivrii
Re: Problem 3
« Reply #4 on: November 02, 2012, 05:16:02 AM »
Very nice. Actually partial F.s. were not required. Obviously in cos-series only even terms are not $0$; sp $n=2m$ and $\cos(n\pi/2)=(-1)^m$