If f\left ( x\right ) is odd, is f^{\prime }\left ( x\right ) (i) even? (ii) odd? (iii) neither? (iv) could be either?
solution
Answer is (i), even.
Proof: Since f\left ( x\right ) is odd, then by definition f\left ( x\right ) =-f\left ( -x\right ) For all x in the domain of f\left ( x\right ) . Taking derivatives w.r.t. gives \left [ f\left ( x\right ) \right ] ^{\prime }=\left [ -f\left ( -x\right ) \right ] ^{\prime } Applying the chain rule to RHS gives -f^{\prime }\left ( -x\right ) \left ( -1\right ) =f^{\prime }\left ( -x\right ) and the LHS gives f^{\prime }\left ( x\right ) . Hence the above becomes\begin{equation} f^{\prime }\left ( x\right ) =f^{\prime }\left ( -x\right ) \nonumber \end{equation} But by definition g\left ( -x\right ) =g\left ( x\right ) implies an even function. Hence the says that f^{\prime }\left ( x\right ) is an even function.
True or False. (a) If f\left ( x\right ) is odd, its 2\pi periodic extension is odd. (b) if the 2\pi periodic extension of f\left ( x\right ) is odd, then f\left ( x\right ) is odd.
solution
True.
To show this, will use an illustration. In this illustration, and to reduce confusion, let f\left ( x\right ) represents the original odd function defined over -\pi \leq x\leq \pi and let g\left ( x\right ) represents the 2\pi periodic extension of f\left ( x\right ) . For illustration, used the odd function f\left ( x\right ) =x.
To show that g\left ( x\right ) is odd, we pick any point x and now we need to show that g\left ( -x\right ) =-g\left ( x\right ) or g\left ( x\right ) =-g\left ( -x\right ) .
On the right side of the x axis, g\left ( x\right ) =f\left ( x-n\left ( 2\pi \right ) \right ) where n is positive integer due to the 2\pi extension. In the above illustration n=1 but it can be any positive n. Let the point x-n\left ( 2\pi \right ) =z. Hence now we have the following diagram
Where f\left ( z\right ) =g\left ( x\right ) . But we are given that f\left ( x\right ) is odd. Hence f\left ( z\right ) =-f\left ( -z\right ) . On the negative side of the x axis, we do the same we did on the positive side. Since the left side of f\left ( x\right ) was also 2\pi extended, then g\left ( -x\right ) =f\left ( -x+n\left ( 2\pi \right ) \right ) =f\left ( -z\right )
In conclusion, from the above we see that g\left ( -x\right ) =f\left ( -z\right ) But f\left ( -z\right ) =-f\left ( z\right ) since f is odd. Hence the above becomes g\left ( -x\right ) =-f\left ( z\right ) But f\left ( z\right ) =g\left ( x\right ) as shown in the first illustration, hence the above becomes g\left ( -x\right ) =-g\left ( x\right ) Which shows that g\left ( x\right ) is odd.
Since g\left ( x\right ) is the 2\pi periodic extension of f\left ( x\right ) . This is what we asked to show.
(b) True. Proof by contradiction. Since g\left ( x\right ) is odd, then we know that g\left ( -x\right ) =-g\left ( x\right ) We also know that by the 2\pi extension of f\left ( x\right ) that f\left ( z\right ) =g\left ( x\right ) Where we are using the same diagrams from part (a). Where z=x-2n\pi . Now, let us assume that f\left ( x\right ) is even. Then this means that f\left ( z\right ) =f\left ( -z\right ) But the 2\pi extension on the left side of the x axis, then we conclude that g\left ( -x\right ) =f\left ( -z\right ) Which means that \begin{align*} g\left ( -x\right ) & =f\left ( z\right ) \\ & =g\left ( x\right ) \end{align*}
But this means g\left ( x\right ) is even, which is a contradiction, since g\left ( x\right ) is odd. Hence f\left ( x\right ) can now now be even.
Only other choice is that f\left ( x\right ) is neither odd or even, or an odd function. Let us now assume is neither. For example, take f\left ( x\right ) = \left \{ \begin{array} [c]{ccc}x & & 0<x<\pi \\ 0 & & -\pi <x<0 \end{array} \right . . Then following the above argument, we see that g\left ( x\right ) =f\left ( z\right ) But now f\left ( -z\right ) =0, then by 2\pi extension of the left, then g\left ( -x\right ) =f\left ( -z\right ) =0. But this means that g\left ( -x\right ) \neq -g\left ( x\right ) which is not possible since g\left ( x\right ) is odd. The only other choice left is that f\left ( x\right ) is odd. Which is what we are asked to show.
Find the Fourier series and discuss convergence for (a) the box function b\left ( x\right ) =\left \{ \begin{array} [c]{ccc}1 & & \left \vert x\right \vert <\frac{1}{2}\pi \\ 0 & & \frac{1}{2}\pi <\left \vert x\right \vert <\pi \end{array} \right .
solution
b\left ( x\right ) \sim \frac{a_{0}}{2}+\sum _{n=1}^{\infty }a_{n}\cos nx+b_{n}\sin nx But \frac{a_{0}}{2} is the average of the function over its 2\pi domain. Hence \frac{a_{0}}{2}=\frac{\text{area}}{2\pi }=\frac{\pi }{2\pi }=\frac{1}{2}, and\begin{align*} a_{n} & =\frac{1}{\pi }\int _{-\pi }^{\pi }f\left ( x\right ) \cos \left ( nx\right ) dx\\ & =\frac{1}{\pi }\int _{-\frac{1}{2}\pi }^{\frac{1}{2}\pi }\cos \left ( nx\right ) dx\\ & =\frac{2}{\pi }\int _{0}^{\frac{1}{2}\pi }\cos \left ( nx\right ) dx\\ & =\frac{2}{\pi n}\left [ \sin \left ( nx\right ) \right ] _{0}^{\frac{\pi }{2}}\\ & =\frac{2}{\pi n}\sin \left ( \frac{n\pi }{2}\right ) \end{align*}
And since the function is even, then all b_{n}=0. Hence b\left ( x\right ) \sim \frac{1}{2}+\sum _{n=1}^{\infty }\frac{2}{\pi n}\sin \left ( \frac{n\pi }{2}\right ) \cos nx To verify the above solution, it is plotted against b\left ( x\right ) for increasing number of terms.
Since there are jump discontinuities in the function b\left ( x\right ) , this will cause Gibbs effect at those points. This also implies that the convergence is not uniform. Fourier series will converge to each x where the function is continuous, but it will converge to the average of b\left ( x\right ) at those points where there is a jump discontinuity.
In this case at -\frac{\pi }{2} and \frac{\pi }{2} in the fundamental domain given as shown in the plots above. At those points, Fourier series converges to \frac{1}{2}.
Prove that \coth \pi =\frac{1}{\pi }+\frac{2}{\pi }\left ( \frac{1}{1+1^{2}}+\frac{1}{1+2^{2}}+\frac{1}{1+3^{2}}+\cdots \right ) , where \coth x=\frac{\cosh x}{\sinh x}=\frac{e^{x}+e^{-x}}{e^{x}-e^{-x}}
solution
The complex Fourier series of e^{x} is\begin{equation} e^{x}=\lim _{N\rightarrow \infty }\sum _{n=-N}^{N}c_{n}e^{inx} \tag{1} \end{equation} Where\begin{align*} c_{n} & =\frac{1}{2\pi }\int _{-\pi }^{\pi }e^{x}e^{-inx}dx\\ & =\frac{1}{2\pi }\int _{-\pi }^{\pi }e^{x\left ( 1-in\right ) }dx\\ & =\frac{1}{2\pi }\left [ \frac{e^{x\left ( 1-in\right ) }}{1-in}\right ] _{-\pi }^{\pi }\\ & =\frac{1}{2\pi }\frac{1}{1-in}\left [ e^{x}e^{-inx}\right ] _{-\pi }^{\pi }\\ & =\frac{1}{2\pi }\frac{1}{1-in}\left [ e^{\pi }e^{-in\pi }-e^{-\pi }e^{in\pi }\right ] \end{align*}
But e^{in\pi }=\cos \left ( n\pi \right ) and also e^{-in\pi }=\cos \left ( n\pi \right ) since n is integer. The above simplifies to c_{n}=\frac{1}{2\pi }\frac{\cos \left ( n\pi \right ) }{1-in}\left [ e^{\pi }-e^{-\pi }\right ] But e^{\pi }-e^{-\pi }=2\sinh \left ( \pi \right ) . Therefore\begin{align*} c_{n} & =\frac{1}{2\pi }\frac{\cos \left ( n\pi \right ) }{1-in}\left [ 2\sinh \left ( \pi \right ) \right ] \\ & =\frac{1}{\pi }\frac{\cos \left ( n\pi \right ) \sinh \left ( \pi \right ) }{1-in}\\ & =\frac{1}{\pi }\frac{\cos \left ( n\pi \right ) \sinh \left ( \pi \right ) }{1-in}\frac{\left ( 1+in\right ) }{1+in}\\ & =\frac{1}{\pi }\cos \left ( n\pi \right ) \sinh \left ( \pi \right ) \frac{\left ( 1+in\right ) }{1+n^{2}}\\ & =\frac{\left ( -1\right ) ^{n}}{\pi }\sinh \left ( \pi \right ) \frac{\left ( 1+in\right ) }{1+n^{2}} \end{align*}
Substituting this back into (1) gives\begin{align*} e^{x} & =\lim _{N\rightarrow \infty }\sum _{n=-N}^{N}\frac{\left ( -1\right ) ^{n}}{\pi }\sinh \left ( \pi \right ) \frac{\left ( 1+in\right ) }{1+n^{2}}e^{inx}\\ & =\frac{\sinh \left ( \pi \right ) }{\pi }\lim _{N\rightarrow \infty }\sum _{n=-N}^{N}\left ( -1\right ) ^{n}\frac{\left ( 1+in\right ) }{1+n^{2}}e^{inx} \end{align*}
At x=\pi \begin{align*} \frac{1}{2}\left ( e^{\pi }+e^{-\pi }\right ) & =\cosh \left ( \pi \right ) \\ \frac{1}{2}\left ( \frac{\sinh \left ( \pi \right ) }{\pi }\lim _{N\rightarrow \infty }\sum _{n=-N}^{N}\left ( -1\right ) ^{n}\frac{\left ( 1+in\right ) }{1+n^{2}}e^{in\pi }+\frac{\sinh \left ( \pi \right ) }{\pi }\lim _{N\rightarrow \infty }\sum _{n=-N}^{N}\left ( -1\right ) ^{n}\frac{\left ( 1+in\right ) }{1+n^{2}}e^{-in\pi }\right ) & =\cosh \left ( \pi \right ) \\ \frac{1}{2}\frac{\sinh \left ( \pi \right ) }{\pi }\left ( \lim _{N\rightarrow \infty }\sum _{n=-N}^{N}\left ( -1\right ) ^{n}\frac{\left ( 1+in\right ) }{1+n^{2}}e^{in\pi }+\lim _{N\rightarrow \infty }\sum _{n=-N}^{N}\left ( -1\right ) ^{n}\frac{\left ( 1+in\right ) }{1+n^{2}}e^{-in\pi }\right ) & =\cosh \left ( \pi \right ) \end{align*}
But e^{in\pi }=\cos n\pi =\left ( -1\right ) ^{n} and e^{-in\pi }=\cos \pi =\left ( -1\right ) ^{n}. The above becomes\begin{align*} \frac{1}{2}\frac{\sinh \left ( \pi \right ) }{\pi }\left ( \lim _{N\rightarrow \infty }\sum _{n=-N}^{N}\left ( -1\right ) ^{2n}\frac{\left ( 1+in\right ) }{1+n^{2}}+\lim _{N\rightarrow \infty }\sum _{n=-N}^{N}\left ( -1\right ) ^{2n}\frac{\left ( 1+in\right ) }{1+n^{2}}\right ) & =\cosh \left ( \pi \right ) \\ \frac{1}{2}\frac{\sinh \left ( \pi \right ) }{\pi }\left ( \lim _{N\rightarrow \infty }\sum _{n=-N}^{N}\frac{\left ( 1+in\right ) }{1+n^{2}}+\lim _{N\rightarrow \infty }\sum _{n=-N}^{N}\frac{\left ( 1+in\right ) }{1+n^{2}}\right ) & =\cosh \left ( \pi \right ) \\ \frac{\sinh \left ( \pi \right ) }{\pi }\lim _{N\rightarrow \infty }\sum _{n=-N}^{N}\frac{\left ( 1+in\right ) }{1+n^{2}} & =\cosh \left ( \pi \right ) \\ \frac{\sinh \left ( \pi \right ) }{\pi }\left ( \lim _{N\rightarrow \infty }\sum _{n=-N}^{N}\frac{1}{1+n^{2}}+i\lim _{N\rightarrow \infty }\sum _{n=-N}^{N}\frac{n}{1+n^{2}}\right ) & =\cosh \left ( \pi \right ) \end{align*}
But \lim _{N\rightarrow \infty }\sum _{n=-N}^{N}\frac{n}{1+n^{2}}=0 by symmetry. The above simplifies to\begin{align*} \frac{\sinh \left ( \pi \right ) }{\pi }\lim _{N\rightarrow \infty }\sum _{n=-N}^{N}\frac{1}{1+n^{2}} & =\cosh \left ( \pi \right ) \\ \frac{1}{\pi }\sum _{n=-\infty }^{\infty }\frac{1}{1+n^{2}} & =\frac{\cosh \left ( \pi \right ) }{\sinh \left ( \pi \right ) }\\ & =\coth \left ( \pi \right ) \end{align*}
Therefore\begin{align*} \coth \left ( \pi \right ) & =\frac{1}{\pi }\sum _{n=-\infty }^{\infty }\frac{1}{1+n^{2}}\\ & =\frac{1}{\pi }\left ( 1+\sum _{n=-\infty }^{-1}\frac{1}{1+n^{2}}+\sum _{n=1}^{\infty }\frac{1}{1+n^{2}}\right ) \\ & =\frac{1}{\pi }\left ( 1+2\sum _{n=1}^{-\infty }\frac{1}{1+n^{2}}\right ) \\ & =\frac{1}{\pi }+\frac{2}{\pi }\sum _{n=1}^{-\infty }\frac{1}{1+n^{2}}\\ & =\frac{1}{\pi }+\frac{2}{\pi }\left ( \frac{1}{1+1^{2}}+\frac{1}{1+2^{2}}+\frac{1}{1+3^{2}}+\cdots \right ) \end{align*}
Which is what the problem asked to show.
Can you recognize whether a function is real by looking at its complex Fourier coefficients?
solution
Yes. If complex Fourier coefficients come in conjugate pairs such that c_{-n}=\overline{c_{n}} and c_{0} is real. (c_{0} should always be real, since this represents the average energy at the zero (D.C.) frequency, hence must be real quantity).\begin{align*} f\left ( x\right ) & =\sum _{n=-\infty }^{\infty }c_{n}e^{inx}\\ & =c_{0}+\sum _{n=-\infty }^{-1}c_{n}e^{inx}+\sum _{n=1}^{\infty }c_{n}e^{inx}\\ & =c_{0}+\sum _{n=1}^{\infty }c_{-n}e^{-inx}+\sum _{n=1}^{\infty }c_{n}e^{inx}\\ & =c_{0}+\sum _{n=1}^{\infty }\left ( c_{-n}e^{-inx}+c_{n}e^{inx}\right ) \end{align*}
Now, If c_{-n}=\overline{c_{n}} then the above becomes f\left ( x\right ) =c_{0}+\sum _{n=1}^{\infty }\overline{c_{n}}e^{-inx}+c_{n}e^{inx} But \left ( \overline{c_{n}}e^{-inx}+c_{n}e^{inx}\right ) is real. (This could also be written as \overline{c_{n}e^{-inx}}+c_{n}e^{inx} which now looks like standard \overline{z}+z in complex numbers). Hence f\left ( x\right ) is real.
To show this, here is an example. Let c_{n}=a+ib, then c_{-n}=a-ib. Therefore\begin{align*} \overline{c_{n}}e^{-inx}+c_{n}e^{inx} & =\overline{\left ( a+ib\right ) }e^{-inx}+\left ( a+ib\right ) e^{inx}\\ & =\left ( a-ib\right ) e^{-inx}+\left ( a+ib\right ) e^{inx}\\ & =\left ( ae^{-inx}-ibe^{-inx}\right ) +\left ( ae^{inx}+ibe^{inx}\right ) \\ & =a\left ( e^{inx}+e^{-inx}\right ) +bi\left ( e^{inx}-e^{-inx}\right ) \\ & =a\left ( \cos nx+i\sin nx+\cos nx-i\sin nx\right ) +bi\left ( \cos nx+i\sin nx-\cos nx+i\sin nx\right ) \\ & =a\left ( 2\cos nx\right ) +bi\left ( 2i\sin nx\right ) \\ & =2a\cos nx-2b\sin nx \end{align*}
Which is real value. Therefore if each c_{n} is a complex conjugate of c_{-n} (with c_{0} real) then f\left ( x\right ) will be a real function.
Find the Fourier series for the function f\left ( x\right ) =x^{3}. If you differentiate your series, do you recover the Fourier series for f^{\prime }\left ( x\right ) =3x^{2}? If not, explain why not.
solution
The function f\left ( x\right ) over -\pi \leq x\leq \pi is
We see right away that differentiating term by term the Fourier series for the above function could not be justified. Even though the function x^{3} has no jump discontinuity inside -\pi \leq x\leq \pi , which is good, it still fails the other test which requires that f\left ( -\pi \right ) =f\left ( \pi \right ) for the term by term differentiation to be justified. This is because the 2\pi extension will now have jump discontinuities in it. The conditions under which the Fourier series for a function can be term by term differentiated are
The function given fails condition (2) above. This explains why differentiating the Fourier series of x^{3} will not give the Fourier series of 3x^{2}. Now we will show this as required by the problem.
To find the Fourier series of x^{3}, since it is an odd function, then we only need to find b_{n} b_{n}=\frac{1}{\pi }\int _{-\pi }^{\pi }x^{3}\sin \left ( nx\right ) dx Since x^{3} is odd, and \sin is odd, then the product is even, and the above simplifies to b_{n}=\frac{2}{\pi }\int _{0}^{\pi }x^{3}\sin \left ( nx\right ) dx Integration by parts., Let u=x^{3},\sin \left ( nx\right ) =dv. Then du=3x^{2},v=-\frac{1}{n}\cos \left ( nx\right ) . Then \int udv=uv-\int vdu gives\begin{align*} b_{n} & =\frac{2}{\pi }\left ( -\frac{1}{n}\left [ x^{3}\cos \left ( nx\right ) \right ] _{0}^{\pi }+\frac{1}{n}\int _{0}^{\pi }3x^{2}\cos \left ( nx\right ) dx\right ) \\ & =\frac{2}{\pi }\left ( -\frac{1}{n}\left [ \pi ^{3}\cos \left ( n\pi \right ) \right ] +\frac{3}{n}\int _{0}^{\pi }x^{2}\cos \left ( nx\right ) dx\right ) \\ & =\frac{2}{\pi }\left ( -\frac{1}{n}\left [ \pi ^{3}\left ( -1\right ) ^{n}\right ] +\frac{3}{n}\int _{0}^{\pi }x^{2}\cos \left ( nx\right ) dx\right ) \\ & =-\frac{2\left ( -1\right ) ^{n}\pi ^{2}}{n}+\frac{6}{n\pi }\int _{0}^{\pi }x^{2}\cos \left ( nx\right ) dx \end{align*}
Integration by parts again. Let u=x^{2},\cos \left ( nx\right ) =dv. Then du=2x,v=\frac{1}{n}\sin \left ( nx\right ) . Then using \int udv=uv-\int vdu the above becomes\begin{align*} b_{n} & =-\frac{2\left ( -1\right ) ^{n}\pi ^{2}}{n}+\frac{6}{n\pi }\left ( \frac{1}{n}\left [ x^{2}\sin \left ( nx\right ) \right ] _{0}^{\pi }-\frac{2}{n}\int _{0}^{\pi }x\sin \left ( nx\right ) dx\right ) \\ & =-\frac{2\left ( -1\right ) ^{n}\pi ^{2}}{n}+\frac{6}{n\pi }\left ( -\frac{2}{n}\int _{0}^{\pi }x\sin \left ( nx\right ) dx\right ) \\ & =-\frac{2\left ( -1\right ) ^{n}\pi ^{2}}{n}-\frac{12}{n^{2}\pi }\int _{0}^{\pi }x\sin \left ( nx\right ) dx \end{align*}
Integration by parts again. Let u=x,\sin \left ( nx\right ) =dv. Then du=1,v=\frac{-1}{n}\cos \left ( nx\right ) . Then using \int udv=uv-\int vdu the above becomes\begin{align*} b_{n} & =-\frac{2\left ( -1\right ) ^{n}\pi ^{2}}{n}-\frac{12}{n^{2}\pi }\left ( \frac{-1}{n}\left [ x\cos \left ( nx\right ) \right ] _{0}^{\pi }+\frac{1}{n}\int _{0}^{\pi }\cos \left ( nx\right ) \right ) \\ & =-\frac{2\left ( -1\right ) ^{n}\pi ^{2}}{n}-\frac{12}{n^{2}\pi }\left ( \frac{-1}{n}\left [ \pi \cos \left ( n\pi \right ) \right ] +\frac{1}{n}\left [ \frac{\sin nx}{n}\right ] _{0}^{\pi }\right ) \\ & =-\frac{2\left ( -1\right ) ^{n}\pi ^{2}}{n}-\frac{12}{n^{2}\pi }\left ( \frac{-1}{n}\left [ \pi \left ( -1\right ) ^{n}\right ] \right ) \\ & =-\frac{2\left ( -1\right ) ^{n}\pi ^{2}}{n}+\frac{12}{n^{3}\pi }\pi \left ( -1\right ) ^{n}\\ & =\frac{-2\left ( -1\right ) ^{n}n^{2}\pi ^{2}+12\left ( -1\right ) ^{n}}{n^{3}}\\ & =\frac{-2\left ( -1\right ) ^{n}\left ( -6+n^{2}\pi ^{2}\right ) }{n^{3}} \end{align*}
Hence\begin{equation} x^{3}\sim \sum _{n=1}^{\infty }-\frac{2\left ( -1\right ) ^{n}\left ( -6+n^{2}\pi ^{2}\right ) }{n^{3}}\sin \left ( nx\right ) \tag{1} \end{equation} Now we apply Term by term differentiation to the RHS above and obtain\begin{align} \left ( \sum _{n=1}^{\infty }-\frac{2\left ( -1\right ) ^{n}\left ( -6+n^{2}\pi ^{2}\right ) }{n^{3}}\sin \left ( nx\right ) \right ) ^{\prime } & =\sum _{n=1}^{\infty }-\frac{2\left ( -1\right ) ^{n}\left ( -6+n^{2}\pi ^{2}\right ) }{n^{2}}\cos \left ( nx\right ) \nonumber \\ & =\sum _{n=1}^{\infty }\frac{12\left ( -1\right ) ^{n}-2\left ( -1\right ) ^{n}n^{2}\pi ^{2}}{n^{2}}\cos \left ( nx\right ) \nonumber \\ & =\sum _{n=1}^{\infty }\left ( \frac{12\left ( -1\right ) ^{n}}{n^{2}}-2\left ( -1\right ) ^{n}\pi ^{2}\right ) \cos \left ( nx\right ) \tag{2} \end{align}
And differentiation of LHS of (1) gives \left ( x^{3}\right ) ^{\prime }=3x^{2} Let us now find the Fourier series for 3x^{2} and see if it matches (2). Since x^{2} is even, it will only have a_{n} terms\begin{align*} a_{0} & =\frac{1}{\pi }\int _{-\pi }^{\pi }3x^{2}dx\\ & =\frac{3}{\pi }\left [ \frac{x^{3}}{3}\right ] _{-\pi }^{\pi }\\ & =\frac{1}{\pi }\left [ x^{3}\right ] _{-\pi }^{\pi }\\ & =\frac{1}{\pi }\left [ \pi ^{3}-\left ( -\pi \right ) ^{3}\right ] \\ & =\frac{1}{\pi }\left [ \pi ^{3}+\pi ^{3}\right ] \\ & =2\pi ^{2} \end{align*}
And\begin{align*} a_{n} & =\frac{3}{\pi }\int _{-\pi }^{\pi }x^{2}\cos \left ( nx\right ) dx\\ & =\frac{12\left ( -1\right ) ^{n}}{n^{2}} \end{align*}
Therefore the Fourier series for 3x^{2} is\begin{equation} 3x^{2}\sim \pi ^{2}+\sum _{n=1}^{\infty }\frac{12\left ( -1\right ) ^{n}}{n^{2}}\cos \left ( nx\right ) \tag{3} \end{equation} Comparing (2,3) shows they are not the same. (2) has an extra term -2\left ( -1\right ) ^{n}\pi ^{2} inside the sum and it also do not have the added \pi ^{2} term outside the sum. The explanation of why that is, is given earlier in the solution.
Find the Fourier series for the following functions on the indicated intervals, and graph the functions that it converges to. (b) x^{2}-4 over -2\leq x\leq 2. (d) \sin x over -1\leq x\leq 1.
solution
The function x^{2}-4 is even. Hence all b_{n} terms are zero. The period now is T=4.\begin{align*} a_{0} & =\frac{1}{2}\int _{-2}^{2}\left ( x^{2}-4\right ) dx\\ & =\int _{0}^{2}\left ( x^{2}-4\right ) dx\\ & =\left [ \frac{x^{3}}{3}-4x\right ] _{0}^{2}\\ & =\frac{8}{3}-8\\ & =-\frac{16}{3} \end{align*}
And a_{n}=\frac{1}{2}\int _{-2}^{2}\left ( x^{2}-4\right ) \cos \left ( \frac{2\pi }{T}nx\right ) dx But T=4, hence the above becomes\begin{align} a_{n} & =\frac{1}{2}\int _{-2}^{2}\left ( x^{2}-4\right ) \cos \left ( \frac{\pi }{2}nx\right ) dx\nonumber \\ & =\int _{0}^{2}\left ( x^{2}-4\right ) \cos \left ( \frac{\pi }{2}nx\right ) dx\nonumber \\ & =\int _{0}^{2}x^{2}\cos \left ( \frac{\pi }{2}nx\right ) dx-\int _{0}^{2}4\cos \left ( \frac{\pi }{2}nx\right ) \tag{1A} \end{align}
Looking at the term \int _{0}^{2}x^{2}\cos \left ( \frac{\pi }{2}nx\right ) dx, applying integration by parts. Let u=x^{2},dv=\cos \left ( \frac{\pi }{2}nx\right ) . Then du=2x,v=\frac{2}{\pi n}\sin \left ( \frac{\pi }{2}nx\right ) . Then using \int udv=uv-\int vdu gives\begin{align*} \int _{0}^{2}x^{2}\cos \left ( \frac{\pi }{2}nx\right ) dx & =\left [ x^{2}\frac{2}{\pi n}\sin \left ( \frac{\pi }{2}nx\right ) \right ] _{0}^{2}-\int _{0}^{2}2x\frac{2}{\pi n}\sin \left ( \frac{\pi }{2}nx\right ) dx\\ & =\frac{2}{n\pi }\left [ \overset{0}{\overbrace{4\sin \left ( \pi n\right ) }}-0\right ] -\frac{4}{\pi n}\int _{0}^{2}x\sin \left ( \frac{\pi }{2}nx\right ) dx\\ & =-\frac{4}{\pi n}\int _{0}^{2}x\sin \left ( \frac{\pi }{2}nx\right ) dx \end{align*}
Applying integration by parts again. Let u=x,dv=\sin \left ( \frac{\pi }{2}nx\right ) . Then du=1,v=\frac{-2}{\pi n}\cos \left ( \frac{\pi }{2}nx\right ) then the above becomes\begin{align} \int _{0}^{2}x^{2}\cos \left ( \frac{\pi }{2}nx\right ) dx & =-\frac{4}{\pi n}\left [ \frac{-2}{\pi n}\left [ x\cos \left ( \frac{\pi }{2}nx\right ) \right ] _{0}^{2}-\int _{0}^{2}\frac{-2}{\pi n}\cos \left ( \frac{\pi }{2}nx\right ) dx\right ] \nonumber \\ & =-\frac{4}{\pi n}\left [ \frac{-2}{\pi n}\left [ 2\cos \left ( \pi n\right ) -0\right ] +\frac{2}{\pi n}\int _{0}^{2}\cos \left ( \frac{\pi }{2}nx\right ) dx\right ] \nonumber \\ & =-\frac{4}{\pi n}\frac{-4}{\pi n}\left ( -1\right ) ^{n}+\frac{2}{\pi n}\left ( \frac{2}{\pi n}\right ) \left [ \overset{0}{\overbrace{\sin \left ( \frac{\pi }{2}nx\right ) }}\right ] _{0}^{2}\nonumber \\ & =-\frac{4}{\pi n}\left [ \frac{-4}{\pi n}\left ( -1\right ) ^{n}\right ] \nonumber \\ & =\frac{16}{\pi ^{2}n^{2}}\left ( -1\right ) ^{n} \tag{1B} \end{align}
The above takes care of the first term in (1A). The second term in (1A) is\begin{align} 4\int _{0}^{2}\cos \left ( \frac{\pi }{2}nx\right ) & =4\left [ \frac{2}{n\pi }\sin \left ( \frac{\pi }{2}nx\right ) \right ] _{0}^{2}\nonumber \\ & =\frac{8}{n\pi }\left [ \sin \left ( \frac{\pi }{2}nx\right ) \right ] _{0}^{2}\nonumber \\ & =0 \tag{1C} \end{align}
Using (1B,1C) results back in (1A) gives a_{n} as a_{n}=\frac{16}{\pi ^{2}n^{2}}\left ( -1\right ) ^{n} Therefore the Fourier series is\begin{align*} x^{2}-4 & \sim -\frac{8}{3}+\sum _{n=1}^{\infty }\frac{16}{n^{2}\pi ^{2}}\left ( -1\right ) ^{n}\cos \left ( \frac{\pi }{2}nx\right ) \\ & \sim -\frac{8}{3}+\frac{16}{\pi ^{2}}\sum _{n=1}^{\infty }\frac{\left ( -1\right ) ^{n}}{n^{2}}\cos \left ( \frac{\pi }{2}nx\right ) \end{align*}
The following shows how the above Fourier series converges for increasing number of terms. The convergence is uniform convergence.
The function \sin x is odd. Hence all a_{n} terms are zero. The period now is T=2.\begin{align*} b_{n} & =\frac{1}{\frac{T}{2}}\int _{-\frac{T}{2}}^{\frac{T}{2}}\sin \left ( x\right ) \sin \left ( \frac{2\pi }{T}nx\right ) dx\\ & =\int _{-1}^{1}\sin \left ( x\right ) \sin \left ( \pi nx\right ) dx \end{align*}
But the integrand is even, then the above becomes b_{n}=2\int _{0}^{1}\sin \left ( x\right ) \sin \left ( \pi nx\right ) dx Integration by parts. Let u=\sin x,dv=\sin \left ( \pi nx\right ) \,, then du=\cos x,v=-\frac{1}{\pi n}\cos \left ( \pi nx\right ) and the above becomes\begin{align*} b_{n} & =2\left ( -\frac{1}{\pi n}\left [ \sin x\cos \left ( \pi nx\right ) \right ] _{0}^{1}+\frac{1}{\pi n}\int _{0}^{1}\cos x\cos \left ( \pi nx\right ) dx\right ) \\ & =2\left ( -\frac{1}{\pi n}\left [ \sin \left ( 1\right ) \cos \left ( \pi n\right ) \right ] +\frac{1}{\pi n}\int _{0}^{1}\cos x\cos \left ( \pi nx\right ) dx\right ) \\ & =\frac{2}{\pi n}\left ( -\sin \left ( 1\right ) \left ( -1\right ) ^{n}+\int _{0}^{1}\cos x\cos \left ( \pi nx\right ) dx\right ) \\ & =\frac{2}{\pi n}\left ( \sin \left ( 1\right ) \left ( -1\right ) ^{n+1}+\int _{0}^{1}\cos x\cos \left ( \pi nx\right ) dx\right ) \end{align*}
Integration by parts again. Let u=\cos x,dv=\cos \left ( \pi nx\right ) \,, then du=-\sin x,v=\frac{1}{\pi n}\sin \left ( \pi nx\right ) and the above becomes\begin{align*} b_{n} & =\frac{2}{\pi n}\left ( \sin \left ( 1\right ) \left ( -1\right ) ^{n+1}+\left ( \frac{1}{\pi n}\left [ \overset{0}{\overbrace{\cos x\sin \left ( \pi nx\right ) }}\right ] _{0}^{1}+\frac{1}{\pi n}\int _{0}^{1}\sin x\sin \left ( \pi nx\right ) \right ) \right ) \\ & =\frac{2}{\pi n}\left ( \sin \left ( 1\right ) \left ( -1\right ) ^{n+1}+\frac{1}{\pi n}\int _{0}^{1}\sin x\sin \left ( \pi nx\right ) \right ) \\ & =\frac{2}{\pi n}\sin \left ( 1\right ) \left ( -1\right ) ^{n+1}+\frac{2}{\pi ^{2}n^{2}}\int _{0}^{1}\sin x\sin \left ( \pi nx\right ) \end{align*}
But 2\int _{0}^{1}\sin x\sin \left ( \pi nx\right ) =b_{n}. Hence the above simplifies to\begin{align*} b_{n}-\frac{b_{n}}{\pi ^{2}n^{2}} & =\frac{2}{\pi n}\sin \left ( 1\right ) \left ( -1\right ) ^{n+1}\\ b_{n}\left ( 1-\frac{1}{\pi ^{2}n^{2}}\right ) & =\frac{2}{\pi n}\sin \left ( 1\right ) \left ( -1\right ) ^{n+1}\\ b_{n} & =\frac{\frac{2}{\pi n}\sin \left ( 1\right ) \left ( -1\right ) ^{n+1}}{1-\frac{1}{\pi ^{2}n^{2}}}\\ & =\frac{\left ( \pi ^{2}n^{2}\right ) \frac{2}{\pi n}\sin \left ( 1\right ) \left ( -1\right ) ^{n+1}}{\pi ^{2}n^{2}-1}\\ & =\frac{2n\pi \sin \left ( 1\right ) \left ( -1\right ) ^{n+1}}{\pi ^{2}n^{2}-1} \end{align*}
Hence the Fourier series is \begin{align*} \sin x & \sim \sum _{n=1}^{\infty }b_{n}\sin \left ( \pi nx\right ) \\ & \sim \sum _{n=1}^{\infty }\frac{2n\pi \sin \left ( 1\right ) \left ( -1\right ) ^{n+1}}{\pi ^{2}n^{2}-1}\sin \left ( \pi nx\right ) \end{align*}
The following shows how the above Fourier series converges for increasing number of terms. The convergence is not uniform since the function is odd. Hence there will be a jump discontinuity when periodic extended leading to Gibbs effect at the edges.
For (b) x^{2}-4 over -2\leq x\leq 2. (d) \sin x over -1\leq x\leq 1 write out the differentiated Fourier series and determine whether it converges to the derivative of the original function.
solution
From Problem 3.4.3 \begin{equation} x^{2}-4\sim -\frac{8}{3}+\frac{16}{\pi ^{2}}\sum _{n=1}^{\infty }\frac{\left ( -1\right ) ^{n}}{n^{2}}\cos \left ( \frac{\pi }{2}nx\right ) \tag{1} \end{equation} Since the function x^{2}-4 is uniform convergent, then we expect that the differentiated Fourier series will converge to the derivative of the original function. The following calculations confirms this.
Taking derivative of the RHS of (1) gives\begin{align} \left ( -\frac{8}{3}+\frac{16}{\pi ^{2}}\sum _{n=1}^{\infty }\frac{\left ( -1\right ) ^{n}}{n^{2}}\cos \left ( \frac{\pi }{2}nx\right ) \right ) ^{\prime } & =\frac{16}{\pi ^{2}}\sum _{n=1}^{\infty }-\left ( \frac{\pi }{2}n\right ) \frac{\left ( -1\right ) ^{n}}{n^{2}}\sin \left ( \frac{\pi }{2}nx\right ) \nonumber \\ & =\frac{8}{\pi }\sum _{n=1}^{\infty }\frac{\left ( -1\right ) ^{n+1}}{n}\sin \left ( \frac{\pi }{2}nx\right ) \tag{2} \end{align}
And taking derivative of the LHS of (1) gives\begin{equation} \left ( x^{2}-4\right ) ^{\prime }=2x \tag{3} \end{equation} We now need to show if the Fourier series of 2x gives the RHS of (2). Let us now find the Fourier series for x, over -2\leq x\leq 2 (period T=4). Since x is odd, then all a_{n}=0.\begin{align*} b_{n} & =\frac{1}{2}\int _{-2}^{2}x\sin \left ( \frac{2\pi }{T}nx\right ) dx\\ & =\frac{1}{2}\int _{-2}^{2}x\sin \left ( \frac{\pi }{2}nx\right ) dx \end{align*}
But x\sin \left ( \frac{\pi }{2}nx\right ) is even. The above becomes b_{n}=\int _{0}^{2}x\sin \left ( \frac{\pi }{2}nx\right ) dx Integration by parts. Let u=x,dv=\sin \left ( \frac{\pi }{2}nx\right ) , then du=1,v=\frac{-2}{n\pi }\cos \left ( \frac{\pi }{2}nx\right ) and the above becomes\begin{align*} b_{n} & =\frac{-2}{n\pi }\left [ x\cos \left ( \frac{\pi }{2}nx\right ) \right ] _{0}^{2}+\frac{2}{n\pi }\int _{0}^{2}\cos \left ( \frac{\pi }{2}nx\right ) dx\\ & =\frac{-2}{n\pi }\left [ 2\cos \left ( n\pi \right ) \right ] +\frac{2}{n\pi }\int _{0}^{2}\cos \left ( \frac{\pi }{2}nx\right ) dx\\ & =\frac{2}{n\pi }\left ( -2\cos \left ( n\pi \right ) +\int _{0}^{2}\cos \left ( \frac{\pi }{2}nx\right ) dx\right ) \\ & =\frac{2}{n\pi }\left ( -2\cos \left ( n\pi \right ) +\frac{2}{n\pi }\overset{0}{\overbrace{\left [ \sin \left ( \frac{\pi }{2}nx\right ) \right ] _{0}^{2}}}\right ) \\ & =\frac{2}{n\pi }\left ( -2\cos \left ( n\pi \right ) \right ) \\ & =\frac{-4}{n\pi }\left ( -1\right ) ^{n} \end{align*}
Hence the Fourier series for x over -2\leq x\leq 2 is x\sim \frac{4}{\pi }\sum _{n=1}^{\infty }\frac{\left ( -1\right ) ^{n+1}}{n}\sin \left ( \frac{\pi }{2}nx\right ) Therefore the Fourier series for 2x is\begin{equation} 2x\sim \frac{8}{\pi }\sum _{n=1}^{\infty }\frac{\left ( -1\right ) ^{n+1}}{n}\sin \left ( \frac{\pi }{2}nx\right ) \tag{4} \end{equation} Comparing (4) and (2) shows they are the same. Hence term by term differentiation is valid in this case.
From Problem 3.4.3, the Fourier series for \sin x over -1\leq x\leq 1 is\begin{equation} \sin x\sim \sum _{n=1}^{\infty }-\frac{2n\pi \left ( -1\right ) ^{n}}{n^{2}\pi ^{2}-1}\sin \left ( 1\right ) \sin \left ( \pi nx\right ) \tag{1} \end{equation} Since the Fourier series for \sin x over -1\leq x\leq 1 is not uniform convergent, then we expect that the differentiated Fourier series will not converge to the derivative of the original function. The following calculations confirms this.
Taking derivative of the RHS of (1) gives \begin{align} \left ( \sum _{n=1}^{\infty }-\frac{2n\pi \left ( -1\right ) ^{n}}{n^{2}\pi ^{2}-1}\sin \left ( 1\right ) \sin \left ( \pi nx\right ) \right ) ^{\prime } & =\sum _{n=1}^{\infty }-\pi n\frac{2n\pi \left ( -1\right ) ^{n}}{n^{2}\pi ^{2}-1}\sin \left ( 1\right ) \cos \left ( \pi nx\right ) \nonumber \\ & =\sum _{n=1}^{\infty }\frac{2n^{2}\pi ^{2}\left ( -1\right ) ^{n+1}}{n^{2}\pi ^{2}-1}\sin \left ( 1\right ) \cos \left ( \pi nx\right ) \tag{2} \end{align}
And Taking derivative of the LHS of (1) gives \begin{equation} \left ( \sin x\right ) ^{\prime }=\cos x \tag{3} \end{equation} So now we need to show that the Fourier series for \cos x, over -1\leq x\leq 1 (period T=2) agrees with (2).
Since \cos x is even, then all b_{n}=0.\begin{align*} a_{0} & =\frac{1}{\frac{T}{2}}\int _{-\frac{T}{2}}^{\frac{T}{2}}\cos \left ( x\right ) dx\\ & =\int _{-1}^{1}\cos \left ( x\right ) dx\\ & =2\int _{0}^{1}\cos xdx\\ & =2\left [ \sin \left ( x\right ) \right ] _{0}^{1}\\ & =2\sin \left ( 1\right ) \end{align*}
And\begin{align*} a_{n} & =\frac{1}{\frac{T}{2}}\int _{-\frac{T}{2}}^{\frac{T}{2}}\cos x\cos \left ( \frac{2\pi }{T}nx\right ) dx\\ & =\int _{-1}^{1}\cos x\cos \left ( \pi nx\right ) dx\\ & =2\int _{0}^{1}\cos x\cos \left ( \pi nx\right ) dx \end{align*}
Integration by parts. Let u=\cos x,dv=\cos \left ( n\pi x\right ) , then du=-\sin x,v=\frac{1}{\pi n}\sin \left ( n\pi x\right ) and the above becomes\begin{align*} a_{n} & =2\left ( \frac{1}{\pi n}\left [ \cos x\sin \left ( n\pi x\right ) \right ] _{0}^{1}+\frac{1}{\pi n}\int _{0}^{1}\sin x\sin \left ( n\pi x\right ) dx\right ) \\ & =\frac{2}{\pi n}\left ( \left [ \cos x\sin \left ( n\pi x\right ) \right ] _{0}^{1}+\int _{0}^{1}\sin x\sin \left ( n\pi x\right ) dx\right ) \\ & =\frac{2}{\pi n}\left ( \left [ \cos \left ( 1\right ) \sin \left ( n\pi \right ) \right ] +\int _{0}^{1}\sin x\sin \left ( n\pi x\right ) dx\right ) \\ & =\frac{2}{\pi n}\int _{0}^{1}\sin x\sin \left ( n\pi x\right ) dx \end{align*}
Integration by parts again. Let u=\sin x,dv=\sin \left ( n\pi x\right ) , then du=\cos x,v=\frac{-1}{\pi n}\cos \left ( n\pi x\right ) and the above becomes\begin{align*} a_{n} & =\frac{2}{\pi n}\left ( \frac{-1}{\pi n}\left [ \sin x\cos \left ( n\pi x\right ) \right ] _{0}^{1}+\frac{1}{\pi n}\int _{0}^{1}\cos x\cos \left ( n\pi x\right ) dx\right ) \\ & =\frac{2}{\pi ^{2}n^{2}}\left ( -\left [ \sin \left ( 1\right ) \cos \left ( n\pi \right ) \right ] +\int _{0}^{1}\cos x\cos \left ( n\pi x\right ) dx\right ) \\ & =-\frac{2}{\pi ^{2}n^{2}}\left ( \sin \left ( 1\right ) \left ( -1\right ) ^{n}\right ) +\frac{2}{\pi ^{2}n^{2}}\int _{0}^{1}\cos x\cos \left ( n\pi x\right ) dx \end{align*}
But 2\int _{0}^{1}\cos x\cos \left ( n\pi x\right ) dx=a_{n}. Hence the above becomes\begin{align*} a_{n}-\frac{a_{n}}{\pi ^{2}n^{2}} & =-\frac{2}{\pi ^{2}n^{2}}\left ( \sin \left ( 1\right ) \left ( -1\right ) ^{n}\right ) \\ a_{n}\left ( 1-\frac{1}{\pi ^{2}n^{2}}\right ) & =\frac{2\sin \left ( 1\right ) \left ( -1\right ) ^{n+1}}{\pi ^{2}n^{2}}\\ a_{n}\left ( \frac{\pi ^{2}n^{2}-1}{\pi ^{2}n^{2}}\right ) & =\frac{2\sin \left ( 1\right ) \left ( -1\right ) ^{n+1}}{\pi ^{2}n^{2}}\\ a_{n} & =\frac{2\sin \left ( 1\right ) \left ( -1\right ) ^{n+1}}{\pi ^{2}n^{2}-1} \end{align*}
Hence the Fourier series for \cos \left ( x\right ) over -1\leq x\leq 1 is\begin{align} \cos x & \sim \frac{a_{0}}{2}+\sum _{n=1}^{\infty }a_{n}\cos \left ( \pi nx\right ) \nonumber \\ & \sim \sin \left ( 1\right ) +\sum _{n=1}^{\infty }\frac{2\sin \left ( 1\right ) \left ( -1\right ) ^{n+1}}{\pi ^{2}n^{2}-1}\cos \left ( \pi nx\right ) \tag{4} \end{align}
Comparing (4) and (2) shows they are not the same. Hence taking derivatives term by term of the Fourier series was not justified as expected.
For (b) x^{2}-4 over -2\leq x\leq 2. (d) \sin x over -1\leq x\leq 1 find the Fourier series for the integral of the function.
solution
From Problem 3.4.3 \begin{equation} x^{2}-4\sim -\frac{8}{3}+\frac{16}{\pi ^{2}}\sum _{n=1}^{\infty }\frac{\left ( -1\right ) ^{n}}{n^{2}}\cos \left ( \frac{\pi }{2}nx\right ) \tag{1} \end{equation} Integrating the RHS of (1) gives\begin{align} \int _{0}^{x}\left ( -\frac{8}{3}+\frac{16}{\pi ^{2}}\sum _{n=1}^{\infty }\frac{\left ( -1\right ) ^{n}}{n^{2}}\cos \left ( \frac{\pi }{2}ns\right ) \right ) ds & =-\frac{8}{3}\int _{0}^{x}ds+\frac{16}{\pi ^{2}}\sum _{n=1}^{\infty }\frac{\left ( -1\right ) ^{n}}{n^{2}}\int _{0}^{x}\cos \left ( \frac{\pi }{2}ns\right ) ds\nonumber \\ & =-\frac{8}{3}x+\frac{16}{\pi ^{2}}\sum _{n=1}^{\infty }\frac{\left ( -1\right ) ^{n}}{n^{2}}\left [ \frac{\sin \left ( \frac{\pi }{2}ns\right ) }{\frac{\pi }{2}n}\right ] _{0}^{x}\nonumber \\ & =-\frac{8}{3}x+\frac{16}{\pi ^{2}}\sum _{n=1}^{\infty }\frac{2}{n\pi }\frac{\left ( -1\right ) ^{n}}{n^{2}}\left [ \sin \left ( \frac{\pi }{2}ns\right ) \right ] _{0}^{x}\nonumber \\ & =-\frac{8}{3}x+\frac{32}{\pi ^{3}}\sum _{n=1}^{\infty }\frac{\left ( -1\right ) ^{n}}{n^{3}}\sin \left ( \frac{\pi }{2}nx\right ) \tag{2} \end{align}
Integrating the LHS of (1) gives\begin{align} \int _{0}^{x}\left ( s^{2}-4\right ) ds & =\left ( \frac{s^{3}}{2}-4s\right ) _{0}^{x}\nonumber \\ & =\frac{x^{3}}{2}-4x \tag{3} \end{align}
Now we find Fourier series for \frac{x^{3}}{2}-4x and compare it with the (2) to see they match in order to see if term by term integration was justified or not above.
Let f\left ( x\right ) =\frac{x^{3}}{2}-4x for -2\leq x\leq 2. This is an odd function. Hence only b_{n} exist.\begin{align} b_{n} & =\frac{1}{2}\int _{-2}^{2}\left ( \frac{x^{3}}{2}-4x\right ) \sin \left ( \frac{\pi }{2}nx\right ) dx\nonumber \\ & =\frac{1}{4}\int _{-2}^{2}x^{3}\sin \left ( \frac{\pi }{2}nx\right ) dx-2\int _{-2}^{2}x\sin \left ( \frac{\pi }{2}nx\right ) dx \tag{4} \end{align}
Looking at the first integral above, \frac{1}{4}\int _{-2}^{2}x^{3}\sin \left ( \frac{\pi }{2}nx\right ) dx. Since the integrand is even, then \frac{1}{4}\int _{-2}^{2}x^{3}\sin \left ( \frac{\pi }{2}nx\right ) dx=\frac{1}{2}\int _{0}^{2}x^{3}\sin \left ( \frac{\pi }{2}nx\right ) dx. Integration by parts. u=x^{3},dv=\sin \left ( \frac{\pi }{2}nx\right ) then du=3x^{2},v=-\frac{2}{n\pi }\cos \left ( \frac{\pi }{2}nx\right ) . Therefore\begin{align*} \frac{1}{2}\int _{0}^{2}x^{3}\sin \left ( \frac{\pi }{2}nx\right ) dx & =\frac{1}{2}\left ( -\frac{2}{n\pi }\left [ x^{3}\cos \left ( \frac{\pi }{2}nx\right ) \right ] _{0}^{2}+\frac{2}{n\pi }\int _{0}^{2}3x^{2}\cos \left ( \frac{\pi }{2}nx\right ) dx\right ) \\ & =\frac{1}{n\pi }\left ( -\left [ 8\cos \left ( \pi n\right ) \right ] +3\int _{0}^{2}x^{2}\cos \left ( \frac{\pi }{2}nx\right ) dx\right ) \\ & =\frac{1}{n\pi }\left ( 8\left ( -1\right ) ^{n+1}+3\int _{0}^{2}x^{2}\cos \left ( \frac{\pi }{2}nx\right ) dx\right ) \end{align*}
Integration by parts again. u=x^{2},dv=\cos \left ( \frac{\pi }{2}nx\right ) then du=2x,v=\frac{2}{n\pi }\sin \left ( \frac{\pi }{2}nx\right ) and the above becomes\begin{align*} \frac{1}{2}\int _{0}^{2}x^{3}\sin \left ( \frac{\pi }{2}nx\right ) dx & =\frac{1}{n\pi }\left ( 8\left ( -1\right ) ^{n+1}+3\left ( \frac{2}{n\pi }\left [ x^{2}\sin \left ( \frac{\pi }{2}nx\right ) \right ] _{0}^{2}-\frac{2}{n\pi }\int _{0}^{2}2x\sin \left ( \frac{\pi }{2}nx\right ) dx\right ) \right ) \\ & =\frac{1}{n\pi }\left ( 8\left ( -1\right ) ^{n+1}+\frac{6}{n\pi }\left ( \overset{0}{\overbrace{\left [ 4\sin \left ( \pi n\right ) \right ] _{0}^{2}}}-2\int _{0}^{2}x\sin \left ( \frac{\pi }{2}nx\right ) dx\right ) \right ) \\ & =\frac{1}{n\pi }\left ( 8\left ( -1\right ) ^{n+1}-\frac{12}{n\pi }\int _{0}^{2}x\sin \left ( \frac{\pi }{2}nx\right ) dx\right ) \end{align*}
Integration by parts again. u=x,dv=\sin \left ( \frac{\pi }{2}nx\right ) then du=1,v=\frac{-2}{n\pi }\cos \left ( \frac{\pi }{2}nx\right ) and the above becomes\begin{align} \frac{1}{2}\int _{0}^{2}x^{3}\sin \left ( \frac{\pi }{2}nx\right ) dx & =\frac{1}{n\pi }\left ( 8\left ( -1\right ) ^{n+1}-\frac{12}{n\pi }\left ( \frac{-2}{n\pi }\left [ x\cos \left ( \frac{\pi }{2}nx\right ) \right ] _{0}^{2}-\int _{0}^{2}\frac{-2}{n\pi }\cos \left ( \frac{\pi }{2}nx\right ) dx\right ) \right ) \nonumber \\ & =\frac{1}{n\pi }\left ( 8\left ( -1\right ) ^{n+1}-\frac{12}{n\pi }\left ( \frac{-2}{n\pi }\left [ 2\cos \left ( \pi n\right ) \right ] +\frac{2}{n\pi }\int _{0}^{2}\cos \left ( \frac{\pi }{2}nx\right ) dx\right ) \right ) \nonumber \\ & =\frac{1}{n\pi }\left ( 8\left ( -1\right ) ^{n+1}-\frac{24}{n^{2}\pi ^{2}}\left ( -2\left ( -1\right ) ^{n}+\int _{0}^{2}\cos \left ( \frac{\pi }{2}nx\right ) dx\right ) \right ) \nonumber \\ & =\frac{1}{n\pi }\left ( 8\left ( -1\right ) ^{n+1}-\frac{24}{n^{2}\pi ^{2}}\left ( -2\left ( -1\right ) ^{n}+\frac{2}{n\pi }\overset{0}{\overbrace{\left [ \sin \left ( \frac{\pi }{2}nx\right ) \right ] _{0}^{2}}}\right ) \right ) \nonumber \\ & =\frac{1}{n\pi }\left ( 8\left ( -1\right ) ^{n+1}+\frac{48}{n^{2}\pi ^{2}}\left ( -1\right ) ^{n}\right ) \nonumber \\ & =\frac{1}{n\pi }\left ( -8\left ( -1\right ) ^{n}+\frac{48}{n^{2}\pi ^{2}}\left ( -1\right ) ^{n}\right ) \nonumber \\ & =\frac{-8}{n\pi }\left ( -1\right ) ^{n}+\frac{48}{n^{3}\pi ^{3}}\left ( -1\right ) ^{n} \tag{5} \end{align}
The above takes care of the first term in (4). The second integral 2\int _{-2}^{2}x\sin \left ( \frac{\pi }{2}nx\right ) dx in (4) is now found. Since integrand is even then 2\int _{-2}^{2}x\sin \left ( \frac{\pi }{2}nx\right ) dx=4\int _{0}^{2}x\sin \left ( \frac{\pi }{2}nx\right ) dx Integration by parts. Let u=x,dv=\sin \left ( \frac{\pi }{2}nx\right ) , then du=1,v=\frac{-2}{n\pi }\cos \left ( \frac{\pi }{2}nx\right ) , therefore\begin{align} 4\int _{0}^{2}x\sin \left ( \frac{\pi }{2}nx\right ) dx & =4\left ( \frac{-2}{n\pi }\left [ x\cos \left ( \frac{\pi }{2}nx\right ) \right ] _{0}^{2}+\frac{2}{n\pi }\int _{0}^{2}\cos \left ( \frac{\pi }{2}nx\right ) dx\right ) \nonumber \\ & =4\left ( \frac{-2}{n\pi }\left [ 2\cos \left ( \pi n\right ) \right ] +\frac{4}{n^{2}\pi ^{2}}\overset{0}{\overbrace{\left [ \sin \left ( \frac{\pi }{2}nx\right ) \right ] _{0}^{2}}}\right ) \nonumber \\ & =4\left ( \frac{-2}{n\pi }\left [ 2\left ( -1\right ) ^{n}\right ] \right ) \nonumber \\ & =\frac{-16}{n\pi }\left ( -1\right ) ^{n}\nonumber \\ & =\frac{16}{n\pi }\left ( -1\right ) ^{n+1} \tag{6} \end{align}
Substituting (5,6) back into (4) gives\begin{align*} b_{n} & =\frac{1}{4}\int _{-2}^{2}x^{3}\sin \left ( \frac{\pi }{2}nx\right ) dx-2\int _{-2}^{2}x\sin \left ( \frac{\pi }{2}nx\right ) dx\\ & =\left ( \frac{-8}{n\pi }\left ( -1\right ) ^{n}+\frac{48}{n^{3}\pi ^{3}}\left ( -1\right ) ^{n}\right ) -\frac{16}{n\pi }\left ( -1\right ) ^{n+1}\\ & =\left ( \frac{-8}{n\pi }\left ( -1\right ) ^{n}+\frac{48}{n^{3}\pi ^{3}}\left ( -1\right ) ^{n}\right ) +\frac{16}{n\pi }\left ( -1\right ) ^{n}\\ & =\frac{48}{n^{3}\pi ^{3}}\left ( -1\right ) ^{n}+\frac{8}{n\pi }\left ( -1\right ) ^{n} \end{align*}
Hence the Fourier series for \frac{x^{3}}{2}-4x is\begin{align} \frac{x^{3}}{2}-4x & \sim \sum _{n=1}^{\infty }b_{n}\sin \left ( \frac{\pi }{2}nx\right ) \nonumber \\ & \sim \sum _{n=1}^{\infty }\left ( \frac{48}{n^{3}\pi ^{3}}\left ( -1\right ) ^{n}+\frac{8}{n\pi }\left ( -1\right ) ^{n}\right ) \sin \left ( \frac{\pi }{2}nx\right ) \nonumber \\ & \sim \sum _{n=1}^{\infty }\left ( \frac{48+8\left ( n^{2}\pi ^{2}\right ) }{n^{3}\pi ^{3}}\right ) \left ( -1\right ) ^{n}\sin \left ( \frac{\pi }{2}nx\right ) \nonumber \\ & \sim \sum _{n=1}^{\infty }\left ( \frac{8\left ( 6+n^{2}\pi ^{2}\right ) }{n^{3}\pi ^{3}}\right ) \left ( -1\right ) ^{n}\sin \left ( \frac{\pi }{2}nx\right ) \tag{7} \end{align}
Comparing (7,2) shows they are not the same. Hence integration term by term was not justified. This is because the function x^{2}-4 is not odd, hence its mean is not zero.
From Problem 3.4.3, the Fourier series for \sin x over -1\leq x\leq 1 is\begin{equation} \sin x\sim \sum _{n=1}^{\infty }-\frac{2n\pi \left ( -1\right ) ^{n}}{n^{2}\pi ^{2}-1}\sin \left ( 1\right ) \sin \left ( \pi nx\right ) \tag{1} \end{equation} Integrating the LHS of (1) gives\begin{align} \int _{0}^{x}\sin \left ( s\right ) ds & =-\left [ \cos \left ( s\right ) \right ] _{0}^{x}\nonumber \\ & =-\left [ \cos \left ( x\right ) -1\right ] \nonumber \\ & =1-\cos x \tag{2} \end{align}
Integrating the RHS of (1) gives\begin{align} \int _{0}^{x}\sum _{n=1}^{\infty }-\frac{2n\pi \left ( -1\right ) ^{n}}{n^{2}\pi ^{2}-1}\sin \left ( 1\right ) \sin \left ( \pi ns\right ) ds & =\sum _{n=1}^{\infty }\frac{2n\pi \left ( -1\right ) ^{n}}{n^{2}\pi ^{2}-1}\sin \left ( 1\right ) \left [ \frac{\cos \left ( n\pi s\right ) }{n\pi }\right ] _{0}^{x}\nonumber \\ & =\sum _{n=1}^{\infty }\frac{2\left ( -1\right ) ^{n}}{n^{2}\pi ^{2}-1}\sin \left ( 1\right ) \left [ \cos \left ( n\pi s\right ) \right ] _{0}^{x}\nonumber \\ & =\sum _{n=1}^{\infty }\frac{2\left ( -1\right ) ^{n}\sin \left ( 1\right ) }{n^{2}\pi ^{2}-1}\left ( \cos \left ( n\pi x\right ) -1\right ) \nonumber \\ & =\sum _{n=1}^{\infty }\frac{2\left ( -1\right ) ^{n}\sin \left ( 1\right ) }{n^{2}\pi ^{2}-1}\cos \left ( n\pi x\right ) -\sin \left ( 1\right ) \sum _{n=1}^{\infty }\frac{2\left ( -1\right ) ^{n}}{n^{2}\pi ^{2}-1} \tag{3} \end{align}
Let -\sin \left ( 1\right ) \sum _{n=1}^{\infty }\frac{2\left ( -1\right ) ^{n}}{n^{2}\pi ^{2}-1}=m, which is a constant. The above becomes\begin{equation} \int _{0}^{x}\sum _{n=1}^{\infty }-\frac{2n\pi \left ( -1\right ) ^{n}}{n^{2}\pi ^{2}-1}\sin \left ( 1\right ) \sin \left ( \pi ns\right ) ds=\sum _{n=1}^{\infty }\frac{2\left ( -1\right ) ^{n}\sin \left ( 1\right ) }{n^{2}\pi ^{2}-1}\cos \left ( n\pi x\right ) +m \tag{4} \end{equation} But m is the average of the integral of (2) which is, where T the period is 2, gives\begin{align*} m & =\frac{1}{T}\int _{-\frac{T}{2}}^{\frac{T}{2}}\left ( 1-\cos x\right ) dx\\ & =\frac{1}{2}\int _{-1}^{1}\left ( 1-\cos x\right ) dx\\ & =\frac{1}{2}\left ( x-\sin x\right ) _{-1}^{1}\\ & =\frac{1}{2}\left ( 1-\sin \left ( 1\right ) -\left ( -1-\sin \left ( -1\right ) \right ) \right ) \\ & =\frac{1}{2}\left ( 1-\sin \left ( 1\right ) -\left ( -1+\sin \left ( 1\right ) \right ) \right ) \\ & =\frac{1}{2}\left ( 2-2\sin \left ( 1\right ) \right ) \\ & =1-\sin \left ( 1\right ) \end{align*}
Substituting this value for m back into (4) gives\begin{equation} \int _{0}^{x}\sum _{n=1}^{\infty }-\frac{2n\pi \left ( -1\right ) ^{n}}{n^{2}\pi ^{2}-1}\sin \left ( 1\right ) \sin \left ( \pi ns\right ) ds=\left ( 1-\sin \left ( 1\right ) \right ) +\sum _{n=1}^{\infty }\frac{2\left ( -1\right ) ^{n}\sin \left ( 1\right ) }{n^{2}\pi ^{2}-1}\cos \left ( n\pi x\right ) \tag{5} \end{equation} Now the Fourier series for (2) which is 1-\cos \left ( x\right ) is found to compare it to (5) above to see they match in order to see if term by term integration was justified or not above. Since 1-\cos \left ( x\right ) is even, then only a_{n} are not zero.\begin{align*} a_{0} & =\frac{1}{\frac{T}{2}}\int _{-\frac{T}{2}}^{\frac{T}{2}}1-\cos \left ( x\right ) dx\\ & =\int _{-1}^{1}1-\cos \left ( x\right ) dx\\ & =2-2\sin \left ( 1\right ) \end{align*}
And\begin{align} a_{n} & =\int _{-1}^{1}\left ( 1-\cos \left ( x\right ) \right ) \cos \left ( n\pi x\right ) dx\nonumber \\ & =\int _{-1}^{1}\cos \left ( n\pi x\right ) dx-\int _{-1}^{1}\cos \left ( x\right ) \cos \left ( n\pi x\right ) dx\nonumber \\ & =2\int _{0}^{1}\cos \left ( n\pi x\right ) dx-2\int _{0}^{1}\cos \left ( x\right ) \cos \left ( n\pi x\right ) dx \tag{6} \end{align}
The first integral in (6)\begin{align} 2\int _{0}^{1}\cos \left ( n\pi x\right ) dx & =\left [ \frac{\sin \left ( n\pi x\right ) }{n\pi }\right ] _{0}^{1}\nonumber \\ & =\frac{1}{n\pi }\sin \left ( n\pi \right ) \nonumber \\ & =0 \tag{7} \end{align}
The second integral in (6) is 2\int _{0}^{1}\cos \left ( x\right ) \cos \left ( n\pi x\right ) dx.\ Integration by parts. u=\cos x,dv=\cos \left ( n\pi x\right ) ,du=-\sin x,v=\frac{\sin \left ( n\pi x\right ) }{n\pi }. Therefore\begin{align*} 2\int _{0}^{1}\cos \left ( x\right ) \cos \left ( n\pi x\right ) dx & =2\left ( \left [ \cos x\frac{\sin \left ( n\pi x\right ) }{n\pi }\right ] _{0}^{1}+\int _{0}^{1}\sin x\frac{\sin \left ( n\pi x\right ) }{n\pi }dx\right ) \\ & =2\left ( \frac{1}{n\pi }\overset{0}{\overbrace{\left [ \cos x\sin \left ( n\pi x\right ) \right ] _{0}^{1}}}+\frac{1}{n\pi }\int _{0}^{1}\sin x\sin \left ( n\pi x\right ) dx\right ) \\ & =\frac{2}{n\pi }\int _{0}^{1}\sin x\sin \left ( n\pi x\right ) dx \end{align*}
Integration by parts. u=\sin x,dv=\sin \left ( n\pi x\right ) ,du=\cos x,v=\frac{-\cos \left ( n\pi x\right ) }{n\pi }. The above becomes\begin{align} 2\int _{0}^{1}\cos \left ( x\right ) \cos \left ( n\pi x\right ) dx & =\frac{2}{n\pi }\left ( \frac{-1}{n\pi }\left [ \sin x\cos \left ( n\pi x\right ) \right ] _{0}^{1}+\frac{1}{n\pi }\int _{0}^{1}\cos x\cos \left ( n\pi x\right ) dx\right ) \nonumber \\ & =\frac{2}{n\pi }\left ( \frac{-1}{n\pi }\left [ \sin \left ( 1\right ) \cos \left ( n\pi \right ) \right ] +\frac{1}{n\pi }\int _{0}^{1}\cos x\cos \left ( n\pi x\right ) dx\right ) \nonumber \\ & =\frac{-2}{n^{2}\pi ^{2}}\left [ \sin \left ( 1\right ) \left ( -1\right ) ^{n}\right ] +\frac{2}{n^{2}\pi ^{2}}\int _{0}^{1}\cos x\cos \left ( n\pi x\right ) dx\nonumber \end{align}
Moving the integral in the RHS to the left side gives\begin{align} 2\int _{0}^{1}\cos \left ( x\right ) \cos \left ( n\pi x\right ) dx-\frac{2}{n^{2}\pi ^{2}}\int _{0}^{1}\cos x\cos \left ( n\pi x\right ) & =\frac{-2}{n^{2}\pi ^{2}}\left [ \sin \left ( 1\right ) \left ( -1\right ) ^{n}\right ] \nonumber \\ \left ( 2-\frac{2}{n^{2}\pi ^{2}}\right ) \int _{0}^{1}\cos \left ( x\right ) \cos \left ( n\pi x\right ) dx & =\frac{-2}{n^{2}\pi ^{2}}\left [ \sin \left ( 1\right ) \left ( -1\right ) ^{n}\right ] \nonumber \\ \int _{0}^{1}\cos \left ( x\right ) \cos \left ( n\pi x\right ) dx & =\frac{\frac{-1}{n^{2}\pi ^{2}}\left [ \sin \left ( 1\right ) \left ( -1\right ) ^{n}\right ] }{\left ( 1-\frac{1}{n^{2}\pi ^{2}}\right ) }\nonumber \\ & =\frac{-\left ( \sin \left ( 1\right ) \left ( -1\right ) ^{n}\right ) }{n^{2}\pi ^{2}-1} \tag{8} \end{align}
Substituting (7,8) back into (6) gives a_{n}=\frac{2\sin \left ( 1\right ) \left ( -1\right ) ^{n}}{n^{2}\pi ^{2}-1} Hence the Fourier series for 1-\cos \left ( x\right ) over -1\leq x\leq 1 is\begin{align} 1-\cos \left ( x\right ) & \sim \frac{a_{0}}{2}+\sum _{n=1}^{\infty }a_{n}\cos \left ( n\pi x\right ) \nonumber \\ & \sim \frac{\left ( 2-2\sin \left ( 1\right ) \right ) }{2}+\sum _{n=1}^{\infty }\frac{2\left ( -1\right ) ^{n}\sin \left ( 1\right ) }{n^{2}\pi ^{2}-1}\cos \left ( n\pi x\right ) \nonumber \\ & \sim \left ( 1-\sin \left ( 1\right ) \right ) +\sum _{n=1}^{\infty }\frac{2\left ( -1\right ) ^{n}\sin \left ( 1\right ) }{n^{2}\pi ^{2}-1}\cos \left ( n\pi x\right ) \tag{9} \end{align}
Comparing (9) and (5), shows they are the same. This shows that integration term by term was justified. This is because \sin x is continuous and odd, hence its mean is zero. Then by Theorem 3.20 it can be integrated term by term.
Which of the following sequence of functions converge pointwise to the zero function for all x\in \Re \ ? Which converges uniformly ?
(a) -\frac{x^{2}}{n^{2}} (f) \left \vert x-n\right \vert (i) \left \{ \begin{array} [c]{ccc}\frac{x}{n} & & \left \vert x\right \vert <1\\ \frac{1}{nx} & & \left \vert x\right \vert \geq 1 \end{array} \right .
solution
Let f_{n}\left ( x\right ) =-\frac{x^{2}}{n^{2}}. At x=0 then f_{n}\left ( 0\right ) =0. And for x\neq 0 then, if we fix x at say x^{\ast } and increase n, then \lim _{n\rightarrow \infty }f_{n}\left ( x^{\ast }\right ) =0. Hence it converges pointwise for the zero function for all x because for any x\,, we fix it and do the same as above, which goes to zero for that x.
For uniform convergence, it means that for any x we can find large enough n such that all f_{n}\left ( x\right ) are inside a tube, of some diameter <\varepsilon around the zero function. But since x is not bounded, then f_{n}\left ( x\right ) can be as large as we want. So not possible to find n larger enough to bound all f_{n}\left ( x\right ) for all x x\in \Re to be <\varepsilon from the zero function.
Hence not uniform convergent. The difference between this and the pointwise case earlier, is that here n we find, should work for all x at the same time.
Let f_{n}\left ( x\right ) =\left \vert x-n\right \vert . At any x, \lim _{n\rightarrow \infty }\left \vert x-n\right \vert is positive. By fixing x=x^{\ast }, then f_{n}\left ( x^{\ast }\right ) this will keep increasing as n increases. Hence not pointwise convergent to the zero function. Therefore also not uniform convergent since uniform convergence implies pointwise convergence.
At x=0,f_{n}\left ( x\right ) =0. And for \left \vert x\right \vert <1,\lim _{n\rightarrow \infty }\frac{x}{n}\rightarrow 0 since \left \vert x\right \vert <1. Hence for \left \vert x\right \vert <1 it converges pointwise to zero. For \left \vert x\right \vert \geq 1, by fixing x=x^{\ast }, then \lim _{n\rightarrow \infty }\frac{1}{nx^{\ast }}\rightarrow 0 also. Hence converges pointwise to zero for all x\in \Re .
For uniform convergence, \max \left \vert f_{n}\left ( x\right ) \right \vert =\frac{1}{n}\ which is at x=1. And \max \left \vert f_{n}\left ( x\right ) \right \vert \rightarrow 0 as n\rightarrow \infty . Hence we could always find n which will make all f_{n}\left ( x\right ) within \varepsilon from each others at any x by increasing n. Hence uniform convergent
Does the convergence of v_{n}\left ( x\right ) converges pointwise to the zero function for all x\in \Re \ ? Does it converge uniformly?
(b) v_{n}\left ( x\right ) =\left \{ \begin{array} [c]{ccc}1 & & n<x<n+1\\ 0 & & \text{otherwise}\end{array} \right . (d) v_{n}\left ( x\right ) =\left \{ \begin{array} [c]{ccc}\frac{1}{n} & & n<x<2n\\ 0 & & \text{otherwise}\end{array} \right .
(f) v_{n}\left ( x\right ) =\left \{ \begin{array} [c]{ccc}n^{2}x^{2}-1 & & -\frac{1}{n}<x<\frac{1}{n}\\ 0 & & \text{otherwise}\end{array} \right .
solution
This is a pulse width 1 that keeps moving to the right as n increases. All other values are zero. Hence as n\rightarrow \infty , the pulse will move to \infty and all values will be zero. Therefore converges pointwise. Since Max of v_{n}\left ( x\right ) is 1, then it is not not uniform convergent since for \varepsilon <1, we can not bound v_{n}\left ( x\right ) for all values for all x to be inside the tube around zero function with width \varepsilon <1.
n<x<2n is a pulse that moves to the right, but its width also increases as it moves. It height also decreases as it moves, keeping the area of the pulse 1 all the time. Fixing x at x^{\ast } the pulse will eventually become zero height at that x. Therefore converges pointwise to the zero function.
For uniform convergence, \max \left \vert v_{n}\left ( x\right ) \right \vert =\frac{1}{n} and \max \left \vert v_{n}\left ( x\right ) \right \vert \rightarrow 0 as n\rightarrow \infty . Hence we could always find n which will make all f_{n}\left ( x\right ) within \varepsilon from each others at any x by increasing n. Hence uniform convergent
As n increases, the range where x is not zero becomes smaller around x=0. The value of v_{n}\left ( x\right ) can be written as v_{n}\left ( x\right ) =n^{2}e^{2\ln x}-1 As x\rightarrow 0 from either side, which what happens when n\rightarrow \infty , then v_{n}\left ( x\right ) \rightarrow -1. Hence it does not go to zero at x=0. Therefore not pointwise convergent. It follows that not uniform convergent since uniform convergent implies pointwise convergent.