2.2 HW 2

  2.2.1 Section 11, Problem 4
  2.2.2 Section 11, Problem 6
  2.2.3 Section 14, Problem 2
  2.2.4 Section 14, Problem 3
  2.2.5 Section 14, Problem 6
  2.2.6 Section 14, Problem 8
  2.2.7 Section 15, Problem 2
  2.2.8 Section 15, Problem 8
PDF (letter size)
PDF (legal size)

2.2.1 Section 11, Problem 4

   Part (a)
   Part (b)

pict
Figure 2.19:Problem statement
Part (a)

Writing\begin{align} \frac{a_{0}^{2}}{2}+\sum _{n=1}^{N}a_{n}^{2} & \leq \frac{2}{\pi }\int _{0}^{\pi }\left [ g\left ( x\right ) \right ] ^{2}dx\tag{1}\\ \sum _{n=1}^{N}b_{n}^{2} & \leq \frac{2}{\pi }\int _{0}^{\pi }\left [ h\left ( x\right ) \right ] ^{2}dx \tag{2} \end{align}

Adding (1)+(2) gives\begin{align} \frac{a_{0}^{2}}{2}+\sum _{n=1}^{N}\left ( a_{n}^{2}+b_{n}^{2}\right ) & \leq \frac{2}{\pi }\int _{0}^{\pi }\left [ g\left ( x\right ) \right ] ^{2}+\left [ h\left ( x\right ) \right ] ^{2}dx\nonumber \\ & =\frac{2}{\pi }\int _{0}^{\pi }\left [ \frac{f\left ( x\right ) +f\left ( -x\right ) }{2}\right ] ^{2}+\left [ \frac{f\left ( x\right ) -f\left ( -x\right ) }{2}\right ] ^{2}dx\nonumber \\ & =\frac{2}{\pi }\int _{0}^{\pi }\frac{f^{2}\left ( x\right ) +f^{2}\left ( -x\right ) +2f\left ( x\right ) f\left ( -x\right ) }{4}+\frac{f^{2}\left ( x\right ) +f^{2}\left ( -x\right ) -2f\left ( x\right ) f\left ( -x\right ) }{4}dx\nonumber \\ & =\frac{1}{2\pi }\int _{0}^{\pi }f^{2}\left ( x\right ) +f^{2}\left ( -x\right ) +f^{2}\left ( x\right ) +f^{2}\left ( -x\right ) dx\nonumber \\ & =\frac{1}{2\pi }\int _{0}^{\pi }2f^{2}\left ( x\right ) +2f^{2}\left ( -x\right ) dx\nonumber \\ & =\frac{1}{\pi }\left ( \int _{0}^{\pi }f^{2}\left ( x\right ) +f^{2}\left ( -x\right ) dx\right ) \nonumber \\ & =\frac{1}{\pi }\left ( \int _{0}^{\pi }\left [ f\left ( x\right ) \right ] ^{2}dx+\int _{0}^{\pi }\left [ f\left ( -s\right ) \right ] ^{2}ds\right ) \tag{3} \end{align}

Part (b)

Let \(x=-s\) in the last integral. Therefore \(dx=-ds\). When \(s=0\) then \(x=0\) and when \(s=\pi \) then \(x=-\pi \), then (3) becomes\begin{align*} \frac{a_{0}^{2}}{2}+\sum _{n=1}^{N}\left ( a_{n}^{2}+b_{n}^{2}\right ) & \leq \frac{1}{\pi }\left ( \int _{0}^{\pi }\left [ f\left ( x\right ) \right ] ^{2}dx+\int _{0}^{-\pi }\left [ f\left ( x\right ) \right ] ^{2}\left ( -dx\right ) \right ) \\ & =\frac{1}{\pi }\left ( \int _{0}^{\pi }\left [ f\left ( x\right ) \right ] ^{2}dx-\int _{0}^{-\pi }\left [ f\left ( x\right ) \right ] ^{2}dx\right ) \end{align*}

But \(\int _{0}^{-\pi }=-\int _{-\pi }^{0}\) and the above becomes\begin{align*} \frac{a_{0}^{2}}{2}+\sum _{n=1}^{N}\left ( a_{n}^{2}+b_{n}^{2}\right ) & \leq \frac{1}{\pi }\left ( \int _{0}^{\pi }\left [ f\left ( x\right ) \right ] ^{2}dx+\int _{-\pi }^{0}\left [ f\left ( x\right ) \right ] ^{2}dx\right ) \\ & =\frac{1}{\pi }\int _{-\pi }^{\pi }\left [ f\left ( x\right ) \right ] ^{2}dx \end{align*}

2.2.2 Section 11, Problem 6

pict
Figure 2.20:Problem statement

We want to show the following (I’ve used \(x\) instead of \(u\) as it is more natural). \begin{equation} \frac{1}{2}+\sum _{n=1}^{N}\cos nx=\frac{\sin \left ( \left ( N+\frac{1}{2}\right ) x\right ) }{2\sin \frac{x}{2}} \tag{1} \end{equation} Or, similarly, we want to show the following\begin{equation} \sin \frac{x}{2}+\sum _{n=1}^{N}2\sin \frac{x}{2}\cos nx=\sin \left ( \left ( N+\frac{1}{2}\right ) x\right ) \tag{2} \end{equation} We will now work on the left side of (2) only and see if we can simplify it to obtain the right side of (2). Writing the LHS of (2) as\begin{equation} \sin \frac{x}{2}+\sum _{n=1}^{N}2\sin \frac{x}{2}\cos nx=\sin \frac{x}{2}+\sum _{n=1}^{N}2\sin A\cos B \tag{3} \end{equation} Where \(A=\frac{x}{2},B=nx\). But \(\sin A\cos B=\frac{1}{2}\left ( \sin \left ( A+B\right ) +\sin \left ( A-B\right ) \right ) \). Hence (3) becomes\begin{align*} \sin \frac{x}{2}+\sum _{n=1}^{N}2\sin \frac{x}{2}\cos nx & =\sin \frac{x}{2}+\sum _{n=1}^{N}\sin \left ( A+B\right ) +\sin \left ( A-B\right ) \\ & =\sin \frac{x}{2}+\sum _{n=1}^{N}\sin \left ( \frac{x}{2}+nx\right ) +\sin \left ( \frac{x}{2}-nx\right ) \\ & =\sin \frac{x}{2}+\sum _{n=1}^{N}\sin \left ( \left ( n+\frac{1}{2}\right ) x\right ) +\sin \left ( \left ( \frac{1}{2}-n\right ) x\right ) \\ & =\sin \frac{x}{2}+\sum _{n=1}^{N}\sin \left ( \left ( n+\frac{1}{2}\right ) x\right ) -\sin \left ( \left ( n-\frac{1}{2}\right ) x\right ) \end{align*}

Expanding few terms to see the pattern shows\begin{align*} \sin \frac{x}{2}+\sum _{n=1}^{N}\sin \left ( \left ( n+\frac{1}{2}\right ) x\right ) -\sin \left ( \left ( n-\frac{1}{2}\right ) x\right ) & =\sin \frac{x}{2}+\left [ \sin \left ( \left ( 1+\frac{1}{2}\right ) x\right ) -\sin \left ( \left ( 1-\frac{1}{2}\right ) x\right ) \right ] \\ & +\left [ \sin \left ( \left ( 2+\frac{1}{2}\right ) x\right ) -\sin \left ( \left ( 2-\frac{1}{2}\right ) x\right ) \right ] \\ & +\left [ \sin \left ( \left ( 3+\frac{1}{2}\right ) x\right ) -\sin \left ( \left ( 3-\frac{1}{2}\right ) x\right ) \right ] +\cdots \end{align*}

Or\begin{align*} \sum _{n=1}^{N}\sin \left ( \left ( n+\frac{1}{2}\right ) x\right ) -\sin \left ( \left ( n-\frac{1}{2}\right ) x\right ) & =\sin \frac{x}{2}+\left [ \sin \left ( \frac{3}{2}x\right ) -\sin \left ( \frac{1}{2}x\right ) \right ] \\ & +\left [ \sin \left ( \frac{5}{2}x\right ) -\sin \left ( \frac{3}{2}x\right ) \right ] \\ & +\left [ \sin \left ( \frac{7}{2}x\right ) -\sin \left ( \frac{5}{2}x\right ) \right ] +\cdots \end{align*}

We see that all terms cancel except for the term before the last term, which is \(\sin \left ( \left ( N+\frac{1}{2}\right ) x\right ) \). (In the above limited expansion of terms, this will be the term \(\sin \left ( \frac{7}{2}x\right ) \) which remains.) Hence as \(n\rightarrow N\), the above simplifies to\[ \sin \frac{x}{2}+\sum _{n=1}^{N}\sin \left ( \frac{x}{2}+nx\right ) +\sin \left ( \frac{x}{2}-nx\right ) =\sin \left ( \left ( N+\frac{1}{2}\right ) x\right ) \] Which is (2) which was obtained from (1). Hence (1) was verified to be valid.

2.2.3 Section 14, Problem 2

   Part (a)
   Part (b)

pict
Figure 2.21:Problem statement
Part (a)

The Fourier series for \(f\left ( x\right ) \) is convergent since \(f\left ( x\right ) \), after periodic extension, satisfies the 3 points of the Fourier theorem in the textbook at page 35

pict
Figure 2.22:Fourier theorem

Point (i) is satisfied since \(f\left ( x\right ) \) is piecewise continuous and also point (ii) when doing periodic extension. Also point (iii) is satisfied, since the left sided and right sides limit exist at each \(x\).

pict
Figure 2.23:\(f(x)\) after periodic extension

Therefore the Fourier series will converge to the average of the function \(f\left ( x\right ) \) at \(x=\pi \). This average is \[ \frac{f\left ( \pi ^{-}\right ) +f\left ( \pi ^{+}\right ) }{2}=\frac{\frac{\pi }{2}-\frac{\pi }{2}}{2}=0 \]

Part (b)

The Fourier series for \(f\left ( x\right ) =e^{ax}\) is convergent since \(f\left ( x\right ) \), after periodic extension, satisfies the 3 points of the Fourier theorem in the textbook at page 35. Point (i) is satisfied is piecewise continuous and also point (ii) when doing periodic extension. Also point (iii) is satisfied, since the left sided and right sides limit exist at each \(x\). Here is a plot, using \(a=\frac{1}{4}\) for illustration

pict
Figure 2.24:\(f(x)=e^{a x}\) after periodic extension (Using \(a=\frac{1}{4}\)

Therefore the Fourier series will converge to the average of the function \(f\left ( x\right ) \) at \(x=\pi \). This average is \[ \frac{f\left ( \pi ^{-}\right ) +f\left ( \pi ^{+}\right ) }{2}=\frac{e^{a\pi }+e^{-a\pi }}{2}=\cosh \left ( a\pi \right ) \]

2.2.4 Section 14, Problem 3

pict
Figure 2.25:Problem statement

Substituting \(x=0\) in the given representation gives\begin{align*} 0 & =\frac{2}{\pi }-\frac{4}{\pi }\sum _{n=1}^{\infty }\frac{1}{4n^{2}-1}\\ -2 & =-4\sum _{n=1}^{\infty }\frac{1}{4n^{2}-1}\\ \frac{1}{2} & =\sum _{n=1}^{\infty }\frac{1}{4n^{2}-1} \end{align*}

And substituting \(x=\frac{\pi }{2}\) in the given representation gives\begin{align*} 1 & =\frac{2}{\pi }-\frac{4}{\pi }\sum _{n=1}^{\infty }\frac{\cos \left ( n\pi \right ) }{4n^{2}-1}\\ 1-\frac{2}{\pi } & =-\frac{4}{\pi }\sum _{n=1}^{\infty }\frac{\left ( -1\right ) ^{n}}{4n^{2}-1}\\ \pi -2 & =-4\sum _{n=1}^{\infty }\frac{\left ( -1\right ) ^{n}}{4n^{2}-1}\\ \frac{1}{2}-\frac{\pi }{4} & =\sum _{n=1}^{\infty }\frac{\left ( -1\right ) ^{n}}{4n^{2}-1} \end{align*}

2.2.5 Section 14, Problem 6

   Part (a)
   Part (b)

pict
Figure 2.26:Problem statement
Part (a)

\begin{equation} x^{2}\sim \frac{1}{3}\pi ^{2}+4\sum _{n=1}^{\infty }\frac{\left ( -1\right ) ^{n}}{n^{2}}\cos nx \tag{1} \end{equation} Letting \(x=0\) in (1) gives (After doing periodic extension, then \(x=0\) is now in the domain).\begin{align*} 0 & =\frac{1}{3}\pi ^{2}+4\sum _{n=1}^{\infty }\frac{\left ( -1\right ) ^{n}}{n^{2}}\\ -\frac{1}{3}\pi ^{2} & =4\sum _{n=1}^{\infty }\frac{\left ( -1\right ) ^{n}}{n^{2}}\\ -\frac{\pi ^{2}}{12} & =\sum _{n=1}^{\infty }\frac{\left ( -1\right ) ^{n}}{n^{2}} \end{align*}

Multiplying both sides by \(-1\) gives the result needed\[ \frac{\pi ^{2}}{12}=\sum _{n=1}^{\infty }\frac{\left ( -1\right ) ^{n+1}}{n^{2}}\] Now we need to obtain the second result \(\sum _{n=1}^{\infty }\frac{1}{n^{2}}=\frac{\pi ^{2}}{6}\). Let \(x=\pi \) in (1) (After doing periodic extension, then \(x=\pi \) is now in the domain) gives\begin{align*} \pi ^{2} & =\frac{1}{3}\pi ^{2}+4\sum _{n=1}^{\infty }\frac{\left ( -1\right ) ^{n}}{n^{2}}\left ( -1\right ) ^{n}\\ \pi ^{2}-\frac{1}{3}\pi ^{2} & =4\sum _{n=1}^{\infty }\frac{\left ( -1\right ) ^{2n}}{n^{2}}\\ \frac{1}{6}\pi ^{2} & =\sum _{n=1}^{\infty }\frac{\left ( -1\right ) ^{2n}}{n^{2}} \end{align*}

But \(\sum _{n=1}^{\infty }\frac{\left ( -1\right ) ^{2n}}{n^{2}}=\sum _{n=1}^{\infty }\frac{1}{n^{2}}\) since the power \(2n\) is always even. This gives the result needed\[ \frac{1}{6}\pi ^{2}=\sum _{n=1}^{\infty }\frac{1}{n^{2}}\]

Part (b)

\begin{equation} x^{4}\sim \frac{\pi ^{4}}{5}+8\sum _{n=1}^{\infty }\left ( -1\right ) ^{n}\frac{\left ( n\pi \right ) ^{2}-6}{n^{4}}\cos nx \tag{2} \end{equation} Letting \(x=0\) in (2) gives\begin{align*} 0 & =\frac{\pi ^{4}}{5}+8\sum _{n=1}^{\infty }\left ( -1\right ) ^{n}\frac{\left ( n\pi \right ) ^{2}-6}{n^{4}}\\ -\frac{\pi ^{4}}{5} & =8\left ( \sum _{n=1}^{\infty }\left ( -1\right ) ^{n}\frac{\left ( n\pi \right ) ^{2}}{n^{4}}-6\sum _{n=1}^{\infty }\frac{\left ( -1\right ) ^{n}}{n^{4}}\right ) \\ \frac{\pi ^{4}}{5} & =8\left ( \sum _{n=1}^{\infty }\left ( -1\right ) ^{n+1}\frac{\left ( n\pi \right ) ^{2}}{n^{4}}+6\sum _{n=1}^{\infty }\frac{\left ( -1\right ) ^{n}}{n^{4}}\right ) \\ \frac{\pi ^{4}}{5} & =8\left ( \pi ^{2}\sum _{n=1}^{\infty }\frac{\left ( -1\right ) ^{n+1}}{n^{2}}+6\sum _{n=1}^{\infty }\frac{\left ( -1\right ) ^{n}}{n^{4}}\right ) \end{align*}

But from part (a), we found that \(\sum _{n=1}^{\infty }\frac{\left ( -1\right ) ^{n+1}}{n^{2}}=\frac{\pi ^{2}}{12}\). Using this in the above results in\begin{align*} \frac{\pi ^{4}}{5} & =8\left ( \pi ^{2}\left ( \frac{\pi ^{2}}{12}\right ) +6\sum _{n=1}^{\infty }\frac{\left ( -1\right ) ^{n}}{n^{4}}\right ) \\ \frac{\pi ^{4}}{5} & =\frac{8}{12}\pi ^{4}+48\sum _{n=1}^{\infty }\frac{\left ( -1\right ) ^{n}}{n^{4}}\\ \frac{\pi ^{4}}{5}-\frac{8\pi ^{4}}{12} & =48\sum _{n=1}^{\infty }\frac{\left ( -1\right ) ^{n}}{n^{4}}\\ -\frac{7}{15}\pi ^{4} & =48\sum _{n=1}^{\infty }\frac{\left ( -1\right ) ^{n}}{n^{4}}\\ -\frac{7}{720}\pi ^{4} & =\sum _{n=1}^{\infty }\frac{\left ( -1\right ) ^{n}}{n^{4}} \end{align*}

Multiplying both sides by \(-1\) gives the result needed\[ \frac{7}{720}\pi ^{4}=\sum _{n=1}^{\infty }\frac{\left ( -1\right ) ^{n+1}}{n^{4}}\] Now we need to obtain the second result \(\sum _{n=1}^{\infty }\frac{1}{n^{4}}=\frac{\pi ^{2}}{90}\). Let \(x=\pi \) in (2) gives\begin{align*} \pi ^{4} & =\frac{\pi ^{4}}{5}+8\sum _{n=1}^{\infty }\left ( -1\right ) ^{n}\frac{\left ( n\pi \right ) ^{2}-6}{n^{4}}\left ( -1\right ) ^{n}\\ & =\frac{\pi ^{4}}{5}+8\sum _{n=1}^{\infty }\left ( -1\right ) ^{2n}\frac{\left ( n\pi \right ) ^{2}-6}{n^{4}} \end{align*}

But \(\left ( -1\right ) ^{2n}=1\) for all \(n\). The above simplifies to\begin{align*} \pi ^{4} & =\frac{\pi ^{4}}{5}+8\sum _{n=1}^{\infty }\frac{\left ( n\pi \right ) ^{2}-6}{n^{4}}\\ \pi ^{4}-\frac{\pi ^{4}}{5} & =8\left ( \sum _{n=1}^{\infty }\frac{\left ( n\pi \right ) ^{2}}{n^{4}}-6\sum _{n=1}^{\infty }\frac{1}{n^{4}}\right ) \\ \frac{4\pi ^{4}}{5} & =8\left ( \pi ^{2}\sum _{n=1}^{\infty }\frac{1}{n^{2}}-6\sum _{n=1}^{\infty }\frac{1}{n^{4}}\right ) \end{align*}

But from part(a) we found that \(\sum _{n=1}^{\infty }\frac{1}{n^{2}}=\frac{\pi ^{2}}{6}\) hence the above simplifies to\begin{align*} \frac{4\pi ^{4}}{5} & =8\left ( \pi ^{2}\left ( \frac{\pi ^{2}}{6}\right ) -6\sum _{n=1}^{\infty }\frac{1}{n^{4}}\right ) \\ \frac{4\pi ^{4}}{40} & =\frac{\pi ^{4}}{6}-6\sum _{n=1}^{\infty }\frac{1}{n^{4}}\\ -\frac{1}{15}\pi ^{4} & =-6\sum _{n=1}^{\infty }\frac{1}{n^{4}}\\ \frac{1}{90}\pi ^{4} & =\sum _{n=1}^{\infty }\frac{1}{n^{4}} \end{align*}

Which is the result we are asked to show.

2.2.6 Section 14, Problem 8

pict
Figure 2.27:Problem statement

We first notice that the function \(f\left ( x\right ) \) is not differentiable at \(x=0\)

pict
Figure 2.28:plot of \((x^2)^{1/3}\)

This is because, when \(x_{0}=0\) the left sided derivative is equal to the right sided derivative \[ \lim _{\substack{x\rightarrow x_{0}\\x<x_{0}}}f\left ( x\right ) =f_{-}^{^{\prime }}\left ( x_{0}\right ) \neq \lim _{\substack{x\rightarrow x_{0}\\x>x_{0}}}f\left ( x\right ) =f_{+}^{^{\prime }}\left ( x_{0}\right ) \] Since \(f_{-}^{^{\prime }}\left ( 0\right ) =-\infty \) while \(f_{+}^{^{\prime }}\left ( 0\right ) =+\infty \). The function is therefore piecewise continuous on each \(-\pi <x<\pi \) but it is not differentiable at \(x=0\). But Fourier theorem, looking at point (iii) in the book, only says that if \(f_{-}^{\prime }\left ( x_{0}\right ) \) exist and if \(f_{+}^{\prime }\left ( x_{0}\right ) \) exist, then the Fourier series converges to the average of \(f\left ( x\right ) \) at point \(x_{0}\). In this example \(f_{-}^{^{\prime }}\left ( 0\right ) =-\infty \) and \(f_{+}^{^{\prime }}\left ( 0\right ) =+\infty \), which means these limits do not exist.

Hence we see that point (i) and (ii) in the Fourier theorem in the book are satisfied, but it is point (iii) which not satisfied at \(x=0\). Therefore Fourier series does not converge to \(f\left ( x\right ) \) at \(x=0\) only while on other \(x\) in the domain it does.

2.2.7 Section 15, Problem 2

pict
Figure 2.29:Problem statement

A plot of the function \(f\left ( x\right ) \) and its periodic extension is given below

pict
Figure 2.30:plot of \(f(x)\) over one period

pict
Figure 2.31:plot of \(f(x)\) extended to become periodic. Showing 3 periods

The Fourier transform of \(f\left ( x\right ) \) is \[ f\left ( x\right ) \sim \frac{a_{0}}{2}+\sum _{n=1}^{\infty }a_{n}\cos \left ( \frac{2\pi }{T}nx\right ) +b_{n}\sin \left ( \frac{2\pi }{T}nx\right ) \] Where \(T\) is the period of the function (after periodic extension) which is \(4\). Hence the above becomes\[ f\left ( x\right ) \sim \frac{a_{0}}{2}+\sum _{n=1}^{\infty }a_{n}\cos \left ( \frac{\pi }{2}nx\right ) +b_{n}\sin \left ( \frac{\pi }{2}nx\right ) \] Since \(f\left ( x\right ) \) meets the requirements of the Fourier theorem on page 35 of the text (at points of discontinues, the function is \(\frac{1}{2}\) which is the average at those points), then \(\sim \) can be replaced by \(=\) above\begin{equation} f\left ( x\right ) =\frac{a_{0}}{2}+\sum _{n=1}^{\infty }a_{n}\cos \left ( \frac{\pi }{2}nx\right ) +b_{n}\sin \left ( \frac{\pi }{2}nx\right ) \tag{1} \end{equation} Where \begin{align*} a_{0} & =\frac{1}{\frac{T}{2}}\int _{-\frac{T}{2}}^{\frac{T}{2}}f\left ( x\right ) dx=\frac{1}{\frac{4}{2}}\int _{-\frac{4}{2}}^{\frac{4}{2}}f\left ( x\right ) dx=\frac{1}{2}\int _{-2}^{2}f\left ( x\right ) dx=\frac{1}{2}\left ( \int _{-2}^{1}f\left ( x\right ) dx+\int _{1}^{2}f\left ( x\right ) dx\right ) \\ & =\frac{1}{2}\left ( \int _{1}^{2}dx\right ) =\frac{1}{2}\left ( x\right ) _{1}^{2}=\frac{1}{2} \end{align*}

And \begin{align*} a_{n} & =\frac{1}{\frac{T}{2}}\int _{-\frac{T}{2}}^{\frac{T}{2}}f\left ( x\right ) \cos \left ( \frac{2\pi }{T}nx\right ) dx=\frac{1}{2}\int _{-2}^{2}f\left ( x\right ) \cos \left ( \frac{\pi }{2}nx\right ) dx\\ & =\frac{1}{2}\left ( \int _{-2}^{1}f\left ( x\right ) \cos \left ( \frac{\pi }{2}nx\right ) dx+\int _{1}^{2}f\left ( x\right ) \cos \left ( \frac{\pi }{2}nx\right ) dx\right ) \\ & =\frac{1}{2}\int _{1}^{2}f\left ( x\right ) \cos \left ( \frac{\pi }{2}nx\right ) dx\\ & =\frac{1}{2}\int _{1}^{2}\cos \left ( \frac{\pi }{2}nx\right ) dx\\ & =\frac{1}{2}\left [ \frac{\sin \left ( \frac{\pi }{2}nx\right ) }{\frac{\pi n}{2}}\right ] _{1}^{2}\\ & =\frac{1}{\pi n}\left ( \sin \left ( \pi n\right ) -\sin \left ( \frac{\pi n}{2}\right ) \right ) \\ & =\frac{-1}{\pi n}\sin \left ( \frac{\pi n}{2}\right ) \end{align*}

And \begin{align*} b_{n} & =\frac{1}{\frac{T}{2}}\int _{-\frac{T}{2}}^{\frac{T}{2}}f\left ( x\right ) \sin \left ( \frac{2\pi }{T}nx\right ) dx=\frac{1}{2}\int _{-2}^{2}f\left ( x\right ) \sin \left ( \frac{\pi }{2}nx\right ) dx\\ & =\frac{1}{2}\left ( \int _{-2}^{1}f\left ( x\right ) \sin \left ( \frac{\pi }{2}nx\right ) dx+\int _{1}^{2}f\left ( x\right ) \sin \left ( \frac{\pi }{2}nx\right ) dx\right ) \\ & =\frac{1}{2}\int _{1}^{2}f\left ( x\right ) \sin \left ( \frac{\pi }{2}nx\right ) dx\\ & =\frac{1}{2}\int _{1}^{2}\sin \left ( \frac{\pi }{2}nx\right ) dx\\ & =\frac{-1}{2}\left [ \frac{\cos \left ( \frac{\pi }{2}nx\right ) }{\frac{\pi n}{2}}\right ] _{1}^{2}\\ & =\frac{-1}{\pi n}\left [ \cos \left ( \pi n\right ) -\cos \left ( \frac{\pi }{2}n\right ) \right ] \\ & =\frac{-1}{\pi n}\left [ \cos \left ( \pi n\right ) -\cos \left ( \frac{\pi n}{2}\right ) \right ] \end{align*}

Using these results in (1) gives\begin{align*} f\left ( x\right ) & =\frac{1}{4}+\sum _{n=1}^{\infty }\left ( \frac{-1}{\pi n}\sin \left ( \frac{\pi n}{2}\right ) \right ) \cos \left ( \frac{\pi }{2}nx\right ) +\left ( \frac{-1}{\pi n}\left [ \cos \left ( \pi n\right ) -\cos \left ( \frac{\pi n}{2}\right ) \right ] \right ) \sin \left ( \frac{\pi }{2}nx\right ) \\ & =\frac{1}{4}-\frac{1}{\pi }\sum _{n=1}^{\infty }\left ( \frac{1}{n}\sin \left ( \frac{\pi n}{2}\right ) \right ) \cos \left ( \frac{\pi }{2}nx\right ) +\frac{1}{n}\left ( \cos \left ( \pi n\right ) -\cos \left ( \frac{\pi n}{2}\right ) \right ) \sin \left ( \frac{\pi }{2}nx\right ) \\ & =\frac{1}{4}-\frac{1}{\pi }\sum _{n=1}^{\infty }\frac{1}{n}\left [ \sin \left ( \frac{\pi n}{2}\right ) \cos \left ( \frac{\pi }{2}nx\right ) +\left ( \cos \left ( \pi n\right ) -\cos \left ( \frac{\pi n}{2}\right ) \right ) \sin \left ( \frac{\pi }{2}nx\right ) \right ] \end{align*}

Which is the result we are asked to show. To verify  this, the following shows the convergence to \(f\left ( x\right ) \) when using more and more terms in the series.

pict
Figure 2.32:Code used to draw the plot

pict
Figure 2.33:Fourier series approximation as more terms added

We notice that the Fourier series approximation converges to \(\frac{1}{2}\) at the points of discontinuities. But these are the actual values of \(f\left ( x\right ) \) at those points.

2.2.8 Section 15, Problem 8

pict
Figure 2.34:Problem statement

\begin{align} f\left ( x\right ) & =\frac{a_{0}}{2}+\lim _{N\rightarrow \infty }\sum _{n=1}^{N}a_{n}\cos \left ( \frac{n\pi }{c}x\right ) +b_{n}\sin \left ( \frac{n\pi }{c}x\right ) \nonumber \\ & =\frac{a_{0}}{2}+\lim _{N\rightarrow \infty }\sum _{n=1}^{N}a_{n}\left ( \frac{e^{i\frac{n\pi }{c}x}+e^{-i\frac{n\pi }{c}x}}{2}\right ) +b_{n}\left ( \frac{e^{i\frac{n\pi }{c}x}-e^{-i\frac{n\pi }{c}x}}{2i}\right ) \nonumber \\ & =\frac{a_{0}}{2}+\lim _{N\rightarrow \infty }\sum _{n=1}^{N}a_{n}\left ( \frac{e^{i\frac{n\pi }{c}x}+e^{-i\frac{n\pi }{c}x}}{2}\right ) -ib_{n}\left ( \frac{e^{i\frac{n\pi }{c}x}-e^{-i\frac{n\pi }{c}x}}{2}\right ) \nonumber \\ & =\frac{a_{0}}{2}+\lim _{N\rightarrow \infty }\sum _{n=1}^{N}e^{i\frac{n\pi }{c}x}\left ( \frac{a_{n}-ib_{n}}{2}\right ) +e^{-i\frac{n\pi }{c}x}\left ( \frac{a_{n}+ib_{n}}{2}\right ) \nonumber \\ & =\frac{a_{0}}{2}+\lim _{N\rightarrow \infty }\sum _{n=1}^{N}e^{i\frac{n\pi }{c}x}\left ( \frac{a_{n}-ib_{n}}{2}\right ) +\sum _{n=-N}^{-1}e^{i\frac{n\pi }{c}x}\left ( \frac{a_{n}+ib_{n}}{2}\right ) \tag{1} \end{align}

Let \[ A_{n}=\left \{ \begin{array} [c]{ccc}\left ( \frac{a_{n}-ib_{n}}{2}\right ) & & n>0\\ \frac{a_{0}}{2} & & n=0\\ \left ( \frac{a_{n}+ib_{n}}{2}\right ) & & n<0 \end{array} \right . \] Then (1) can be written as\[ f\left ( x\right ) =\lim _{N\rightarrow \infty }\sum _{n=-N}^{N}A_{n}e^{i\frac{n\pi }{c}x}\] Since \begin{align*} a_{n} & =\frac{1}{c}\int _{-c}^{c}f\left ( x\right ) \cos \left ( \frac{n\pi }{c}x\right ) dx\qquad n=0,1,2,\cdots \\ b_{n} & =\frac{1}{c}\int _{-c}^{c}f\left ( x\right ) \sin \left ( \frac{n\pi }{c}x\right ) dx\qquad n=1,2,\cdots \end{align*}

Then \(a_{n}+ib_{n}\) gives\begin{align*} a_{n}-ib_{n} & =\frac{1}{c}\int _{-c}^{c}f\left ( x\right ) \cos \left ( \frac{n\pi }{c}x\right ) dx-i\frac{1}{c}\int _{-c}^{c}f\left ( x\right ) \sin \left ( \frac{n\pi }{c}x\right ) dx\\ & =\frac{1}{c}\left ( \int _{-c}^{c}f\left ( x\right ) \cos \left ( \frac{n\pi }{c}x\right ) dx+\int _{-c}^{c}f\left ( x\right ) \left ( -i\sin \left ( \frac{n\pi }{c}x\right ) \right ) dx\right ) \\ & =\frac{1}{c}\int _{-c}^{c}f\left ( x\right ) \left [ \cos \left ( \frac{n\pi }{c}x\right ) -i\sin \left ( \frac{n\pi }{c}x\right ) \right ] dx\\ & =\frac{1}{c}\int _{-c}^{c}f\left ( x\right ) e^{-i\frac{n\pi }{c}x}dx \end{align*}

But \(a_{n}-ib_{n}=2A_{n}\) from first part of this problem. Hence the above becomes\[ A_{n}=\frac{1}{2c}\int _{-c}^{c}f\left ( x\right ) e^{-i\frac{n\pi }{c}x}dx\qquad n=0,\pm 1,\pm 2,\cdots \]