
% extra credit ch9 2280, S2018
\documentclass[leqno]{article}
\input{linalg.sty}
\def\rf#1{(\ref{#1})}
\def\Prob#1#2{\par\bigskip\par\noindent
{\large\sf Problem #1}. {\bf #2}\par}
\parskip=3pt
\def\MAPLE{{\tt maple}}
% \begin{topics}{template} ... \end{topics}
% used like enumerate, itemize, description environments
% The item[] is never optional!
%
\newcommand{\topicslabel}[1]{\mbox{#1}\hfil}
\newenvironment{topics}[1]{
    \begin{list}{}{%
      \let\makelabel\topicslabel
      \settowidth{\labelwidth}{\topicslabel{#1}}
      \setlength{\leftmargin}{\labelwidth}
      \advance\leftmargin by 1.5em}
}{\end{list}}
\pagestyle{plain}
\setlength{\textheight}{9.8in}
\begin{document}
\thispagestyle{empty}
 {\bf Name~}\underline{~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}\hfill
 {Class Time~}\underline{~~~~~~~~}\newline


\begin{center}
\bf Math 2280 Extra Credit Problems \\
\bf Chapter 9 \\
{\small\bf S2018}
\end{center}

{\bf Submitted work}. Please submit one stapled package per chapter.
Kindly label problems \fbox{\bf Extra Credit}. Label each problem with
its corresponding problem number, e.g., \fbox{Xc1.2-4}. Please attach
this printed sheet to simplify your work.


\section*{Chapter 9: 9.1, 9.2, 9.3 -- Periodic Functions and Fourier Series}

\Prob{Xc9.0-1}{(Trigonometric Identities and Integrals)}

 (a) Use the trigonometric identity $\cos(a+b)=\cos a\cos b-\sin a\sin b$ to
 derive the trigonometric identity
 $$\cos mx \cos nx = \frac12\left(\cos
 ((m+n)x)+\cos((m-n)x)\right).$$

 (b) Show the details for integrating $\cos mx \cos nx$ for nonnegative integers $m\ne n$ over $-\pi
 \le x \le \pi$.

 (c) Derive the trigonometric identity $\cos^2\theta = \frac12 +
 \frac12\cos 2\theta$ from the trigonometric identities $\cos(a+b)=\cos a\cos
 b-\sin a\sin b$ and $\cos^2\theta+\sin^2\theta=1$.

 (d) Integrate $\cos^2 nx$ for integers $n=0,1,2,3,\ldots$ over $-\pi
 \le x \le \pi$. Explain geometrically why there are two different
 answers.

\Prob{Xc9.0-2}{(Orthogonality)}

 Two vectors $\vec{A}$, $\vec{B}$ are said to be {\bf orthogonal} if
 their dot product is zero. For vectors of dimension $n$, this
 means $a_1b_1+a_2b_2+\cdots+a_nb_n=0$.

 (a) The equation $\int_0^1 f(x)g(x)dx=0$ can be viewed as
 {\em the Riemann sum is approximately zero}. Argue that this means
 $\vec{A}\cdot\vec{B} = 0 $ to so many decimal places, where
 $\vec{A}$ and $\vec{B}$ are {\bf vector samples} of $f$ and $g$
 represented in the Riemann sum $h\sum_{j=1}^n f(jh)g(jh)$, $h=\frac{1}{n}$.

 (b) Prove the orthogonality relation below from the standard one
 for the trigonometric system on $-\pi \le x \le \pi$, by a change
 of variables. The method leads to six orthogonality relations for the
 trigonometric system $\{ \cos (m\pi x/T)\}_{m=0}^\infty$, $\{ \sin (n\pi x/T)\}_{n=1}^\infty$ on $-T \le u \le T$.

    $$
     \int_{-T}^T \cos(m\pi u/T)\cos(n\pi u/T)du=\left\{ \begin{array}{lcl} 0 & m\ne n, \\ T & m=n. \end{array}\right.
    $$

\Prob{Xc9.1-1}{(Periodic Functions)}

 (a) Find the period, amplitude and frequency of $\sin^2(4x)$.

 (b) Let $f$ be periodic of period $1$ and on $0\le x \le 1$
 $f(x)=f_0(x)$, where $f_0(x)=1$ on $0\le x < 1/2$, $f_0(x)=0$ on
 $1/2\le x <1$, $f_0(1)=0$. Graph $f$ on $-2 \le x \le 3$.

\Prob{Xc9.1-8}{(Sums of Periodic Functions)}

 (a) Find the period of $\cos x + \cos 3x$.

 (b) Find the period of $e^{2\cos 2x}$.

\clearpage
\Prob{Xc9.1-8}{(Periodic Functions)} Explain why $\cos x +
\cos 3\pi x$ is not periodic. 

{\small\sf {\bf Problem Notes}. One explanation uses independence of functions.
Another explanation analyzes the number of solutions of the equation $\cos x + \cos
 2\pi x=2$. Expected in this case is a graphic and
 a mathematical argument [use $-2\le f(x)\le 2$].}

\Prob{Xc9.1-18}{(Change of Variables)}

 (a) Prove that $f(x)$ continuous and $T$-periodic implies $\dd\int_0^T f(x)dx = \int_{nT}^{nT+T} f(u)du$.

 (b) Assume $f(x)$ is $2\pi$-periodic and continuous. Prove that
 $F(x)=\int_0^x f(u)du$ is $2\pi$-periodic if and only if
 $\int_0^{2\pi} f(x)dx=0$.

\Prob{Xc9.1-20}{(Floor Function)} The greatest integer function or
{\bf staircase function} is represented using a library function
$\floor(x)$, available in most computer mathematical workbenches,
including \MATLAB{} and \MAPLE{}. Don't confuse $\floor$ with
$\trunc$ -- they are different functions!

 (a) Plot $\floor(x)$ and $x-\floor(x)$ in \MATLAB{} or \MAPLE{} on $-3 \le x \le
 5$. Programs \Excel{} and \OpenOffice{} can also be used to make the
 plot. The $\floor$ function in \Excel{} is $x \to \mbox{FLOOR}(x,1)$.

 (b) Argue from the graphic that $x-\floor(x)$ is periodic of period
 $1$.

 (c) Define $g(x,T) = x - T\floor((x+T/2)/T)$.
 Show mathematically that $g(x)=x$ on
 $|x|<T/2$. That the {\bf triangular wave} $g$ is $T$-periodic can be seen from its
 graphic.

 (d) Plot the $2$-periodic {\bf triangular wave} defined by $f(x)=|x - 2\floor((x+1)/2)|$.

%% > plot(abs(x-2*floor((x+1)/2)),x=-5..5);

 {\small\sf {\bf Problem Notes}: The function $f$ in (d) equals $|g(x,T)|$, where $T=2$ and $g$ is
 defined in (c) above. The function $a|g(x,T)|$ is called a {\bf
 triangular  wave} of height $a$ and period $T$. It is the composition of $u\to
 a|u|$ and $x\to g(x,T)$.}


\Prob{Xc9.2-5}{(Fourier Series Partial Sum Plots)}

 (a) Plot on $-2\pi \le x \le 3\pi$ the partial sums $s_2(x),s_6(x),s_{12}(x),s_{20}(x)$ of the Fourier
series for the sawtooth wave $f$ constructed from $f_1(x)=|x|$
 on $|x|\le \pi$:
$$\dd s_N(x)=\frac{\pi}{2}  -
 \frac{4}{\pi}\sum_{m=0}^N \frac{1}{(2m+1)^2}\cos (2mx+x).$$
 The four graphics show the convergence of the partial
 sums to the limiting Fourier series. This is an example of a {\em filmstrip} of 4 graphics.

%% s:=(x,N)->Pi/2-(4/Pi)*sum(cos(2*k*x+x)/((2*k+1)^2),k=1..N);plot(s(x,20),x=-2*Pi..3*Pi);
%% f1:=x->abs(x-2*Pi*floor((x+Pi)/(2*Pi))); plot(abs(f1(x)-s(x,20)),x=-2*Pi..3*Pi);

 (b) Explain what happens in the graphic of (a) at points of discontinuity of $f'$.

\Prob{Xc9.2-5a}{(Fourier Series Partial Sum Plots)}

 (a) Plot on $-2\pi \le x \le 3\pi$ the partial sums $s_2(x),s_6(x),s_{12}(x),s_{20}(x)$ of the Fourier
series for the sawtooth wave $f$ constructed from $f_1(x)=(\pi-x)/2$
 on $0 < x \le 2\pi$:
$$\dd s_N(x)=\sum_{n=1}^N \frac{1}{n}\sin (nx).$$
 The four snapshots show the convergence of the partial
 sums to the limiting Fourier series.

%% s:=(x,N)->Pi/2-(4/Pi)*sum(cos(2*k*x+x)/((2*k+1)^2),k=1..N);plot(s(x,20),x=-2*Pi..3*Pi);
%% f1:=x->abs(x-2*Pi*floor((x+Pi)/(2*Pi))); plot(abs(f1(x)-s(x,20)),x=-2*Pi..3*Pi);

 (b) Explain what happens in the graphic of (a) at points of discontinuity of $f$.

 (c) Illustrate Gibb's phenomenon. In particular, graph
  $|f(x)-s_N(x)|$ on $-2\pi \le x \le 3\pi$, for $N=6,12,20$. Then
  estimate the jump at points of discontinuity of $f'$.

{\small\sf  \BF{Answer}:  About $1.25$.}


\Prob{Xc9.2-8}{(Fourier Series Computation and Graphics)}

 Let $f$ be the $2\pi$-periodic extension of the rectified cosine wave $f_0(x)=|\cos x|$
 on $|x|\le \pi$.

 (a) Draw a graphic of $f(x)$ on $-4\pi \le x \le 5\pi$.

 (b) Show the derivation details for the Fourier series $\dd \frac{2}{\pi}  -
 \frac{4}{\pi}\sum_{m=1}^\infty \frac{(-1)^m}{4m^2-1}\cos 2mx$.

 (c) Plot the Fourier series on $-2\pi \le x \le 2\pi$. Explain why
 it differs from the plot of $f(x)$ on the same interval.

\clearpage

\Prob{Xc9.2-15}{(Fourier Series Computation)} Show the derivation
details for the Fourier coefficients of $f(x)$ constructed from
$f_2(x)=e^{-|x|}$ on $|x|\le \pi$. The Fourier series is
$$\frac{e^\pi-1}{\pi e^\pi}+\frac{2}{\pi e^\pi}\sum_{m=1}^\infty
\frac{e^\pi+(-1)^{m+1}}{m^2+1}\cos mx.$$


\Prob{Xc9.0-3}{(Even and Odd Functions)}

 (a) Define {\em even function} and {\em odd function}. Such
 functions don't have to be continuous, but they must be defined for
 all $x$.

 (b) Show the mathematical details in the derivation of the result
 {\em (Even)(Odd)=Odd}.

 (c) Prove by a $u$-substitution that
 $\int_{-p}^p f(x)dx=2\int_0^p f(x)dx$ for an even continuous
 function $f$ and $\int_{-p}^p g(x)dx=0$ for an odd continuous
 function $g(x)$.

 \Prob{Xc9.3-7}{(Fourier Series Arbitrary Period)}

  (a) Define $f$ to be the periodic extension of period $4$ of the
  base function $f_0(x) = 1-x$ on $0\le x \le 2$, $f_0(x)=-1-x$ on
  $-2 \le x \le 0$. Plot $f(x)$ on $-8\le x \le 6$.

  (b) Show the derivation details for the Fourier series of $f(x)$:

  $$ \frac{4}{\pi}\sum_{n=1}^\infty \frac{\sin (n\pi x)}{2n}.$$

  \Prob{Xc9.3-32}{(Failure of Term-by-Term Differentiation)}

  Show that the Fourier series $\dd\sum_{n=1}^\infty \frac{\sin
  nx}{n}$ of the sawtooth wave $f$ cannot be differentiated term-by-term
  to obtain the Fourier series of $f'$.

  \Prob{Xc9.3-34}{(Term-by-Term Integration)}

  Integrate the Fourier series of the triangular wave $f$ constructed from
  $f_0(x)=x$ on $|x|\le 1$, in order to find the Fourier series of
  the parabolic wave $g$ constructed from $g_0(x)=x^2$ on $|x|\le
  1$.

\bigskip

\section*{Chapter 9: 9.3, 9.4 -- Fourier Series Methods}

\bigskip

\Prob{Xc9.0-4}{(Periodic Extensions)}

 {\bf Lemma 1}. {\sf The function $\triangwave(x) = x - \floor(x+1/2)$ is a
 {\bf triangular wave} of period $1$ with shape $x$ on $|x|< 1/2$}.


 {\bf Lemma 2}. {\sf Given $f_0(x)$ defined on $|x| \le T/2$, then $f(x)=f_0(T\triangwave(x/T))$ is
 the $T$-periodic extension of $f_0(x)$ from $|x| \le T/2$ to $-\infty < x < \infty$}.



 {\em Assume Lemmas 1 and 2 for this problem}.

 (a) Plot $f_1(x)=3\triangwave(x/3)$ on $-6\le x \le 6$. Document its period on the
 graphic.

 (b) Define $f_2(x)=|\cos(0.5\pi \triangwave(2x/\pi))|$.
 Make a plot on $-2\pi \le x \le 3\pi$. Document its period on the
 graphic.

\Prob{Xc9.0-5}{(Even and Odd Periodic Extensions)}

{\small\sf
{\bf Definition}. Define $\signum(x)=\dd\left\{
\begin{array}{cl} \frac{x}{|x|} & x\ne 0, \\ 0 &
x=0.\end{array}\right.$. \newline
 There is no
agreement in literature how to
 define $\signum(0)$. Here, $\signum(x)$ takes on only the values
 $1$, $-1$ and $0$.
 }

 (a) Let $p=2$ and define $g_1(x)=x^2$ on $0\le x \le p$. Let
 $g_2(x)=\signum(x)g_1(|x|)$ be the odd extension of $g_1$ to
 $|x|\le p$. Let $T=2p$. Define $f_3(x) =g_2(T\triangwave(x/T))$ to be the odd extension
 of $g_2(x)$ from $|x| \le p$ to $-\infty < x < \infty$.
 Plot $f_3$ on $|x|\le 5$. This sequence of formulas works in general,
 for any $p$ and any $g_1$ (no justification requested).

 (b) Let $p=2$ and define $h_1(x)=x^2$ on $0\le x \le p$. Let
 $h_2(x)=h_1(|x|)$ be the even extension of $h_1$ to
 $|x|\le p$. Let $T=2p$. Define $h_3(x) =h_2(T\triangwave(x/T))$ to be the even extension of $h_2(x)$ from $|x| \le p$ to $-\infty < x < \infty$.
 Plot $h_3$ on $|x|\le 5$. This sequence of formulas works in general,
 for any $p$ and any $h_1$ (no justification requested).

% g:=(x,T)->x-T*floor((x+T/2)/T);f0:=u->abs(cos(u));F:=x->f0(g(x,Pi));
% plot(f0(x),x=-Pi/2..Pi/2);plot(F(x),x=-Pi..Pi);

%g1:=u->u-floor(u+1/2);plot(2*g1(u/2),u=-1..3);
% plot(3*g1(u/3),u=-3..6,discont=true);

\Prob{Xc9.0-6}{(Dirichlet Kernel Identity)}

Establish by trigonometric identity methods the formula [the right
side is called {\bf Dirichlet's Kernel}]
$$\frac12 + \cos x + \cos 2x + \cdots + \cos nx =
\frac{\sin\left(nx+\frac{x}{2}\right)}{2\sin\left(\frac{x}{2}\right)}.$$

{\bf Hint}: {\small\sf Cross multiply by $2\sin (x/2)$. Expand terms using a trigonometric identity, which produces a telescoping sum.}

\Prob{Xc2.4-7}{(Half-Range Expansions)}

 (a) Find a simple algebraic formula for the even $\pi$-periodic
extension of $f_0(x)=\cos x$ on $0\le x \le \pi/2$.

 (b) Find the Fourier coefficients for the half-range expansion of $f_0(x)=\cos x$ on $0\le x \le \pi/2$.


\Prob{Xc9.4-15}{(Half-Range Sine Expansion)} Find the Fourier
coefficients for the half-range sine series expansion of $e^x$ on $0
\le x \le 1$.

\Prob{Xc9.4-6}{(Complex Fourier Series)} Find the complex form of
the Fourier series for $\sin 3x$ without evaluating any trigonometric integrals.

{\small\sf \BF{Hint}: Use $\sin u =
\frac{1}{2i}\left(e^{iu}-e^{-iu}\right)$.}

\Prob{Xc9.4-11}{(Series Identities)} Let $x=0$ in the complex
Fourier series expansion of $e^x$ in order to prove the formula
$$\frac{2\pi}{e^\pi-e^{-\pi}} = \sum_{n=-\infty}^\infty
\frac{(-1)^n}{n^2+1}.$$

\section*{Chapter 9: 9.5 -- One Dimensional Heat Equation}

\section*{Chapter 9: 9.5 -- One Dimensional Heat Equation}

\Prob{Xc9.6-13}{(Nonhomogeneous Heat Equation)} Consider the
one-dimensional heat conduction problem
$$
 \begin{array}{rcl}
\dd u_{t} &=&\dd u_{xx},\,\, 0\le x \le \pi, \, t> 0, \\
 u(0,t) &=& 100,\\
 u(\pi,t)&=& 50,\\
 u(x,0) &=& f(x).
 \end{array}
$$
Assume $f(x)=33x$ on $0< x \le \pi/2$, $f(x)=33\pi-33x$ on $\pi/2 <
x < \pi$. Find a solution formula for the temperature $u(x,t)$.


 \Prob{Xc9.6-3}{(Heat Conduction in an Insulated Bar)} Consider the
one-dimensional heat conduction problem
$$
 \begin{array}{rcl}
\dd u_{t} &=&\dd u_{xx},\,\, 0\le x \le 1, \, t> 0, \\
\dd u_x(0,t) &=& 0,\\
\dd u_x(1,t)&=& 0,\\
 u(x,0) &=& \cos \pi x
 \end{array}
$$
Find a solution formula for the temperature $u(x,t)$ at location $x$
along the bar at time $t$. Hint: Don't integrate!

Remark. {\small\sf Asmar's matching problem 3.6-3 has a piecewise example,
using $u(x,0)=f(x)$. See the maple advice for problem 9.5-13, to handle
that case.}

\section*{Chapter 9: 9.6 -- One Dimensional Wave Equation}

\Prob{Xc9.6-1}{(Wave Equation)} Derive the equation
$u_{tt}=10^5u_{xx}$ for the vibrations of a stretched homogeneous
string with linear density $\rho=0.001$ kg/m and tension $\tau=100$
N, with no forces other than the tension. State all assumptions used
to obtain the model. Make the presentation brief, by referencing a
textbook for derivation details and results.

\Prob{Xc9.6-9a}{(Separation of Variables)} Solve $u_{tt}=u_{xx}$,
$u(0,t)=u(1,t)=0$, $u(x,0)=x(1-x)$, $u_t(x,0)=\sin \pi x$, $t\ge 0$,
$0 \le x \le 1$. The model is for a guitar string of unit length.

\Prob{Xc9.6-9b}{(Filmstrip Plots)} Plot partial sums of the answer
to the previous problem,
$$u(x,t) = \frac{1}{\pi}\sin (\pi x) \sin (\pi t) + \sum_{m=0}^\infty \frac{8}{\pi^3(2m+1)^3}\sin (2m\pi x+\pi
x)\cos(2m\pi t+\pi t),$$ at
$t=0,1,2,3$. Choose the number of series terms for the four graphics
by making the first graphic match $x(1-x)$ on $0\le x \le 1$. This filmstrip
has 4 frames, each frame corresponding to a time $t$. A frame has
graph window $0 \le x \le 1$, $a \le u \le b$ (you must choose $a,b$).

\Prob{Xc9.6-9c}{(Surface Plot)} Plot a specific partial sum of the
answer
$$u(x,t)=\frac{1}{\pi}\sin (\pi x) \sin (\pi t)+\sum_{m=0}^\infty \frac{8}{\pi^3(2m+1)^3}\sin (2m\pi x+\pi
x)\cos(2m\pi t+\pi t)$$ on
the domain $0\le x \le 1$, $0\le t \le 4$. Use all features possible
of the 3D graphics program in order to produce the best plot with
fine accuracy, view and colors.

\Prob{Xc9.6-13}{(Damped Vibrations of a String)} Solve the problem
$$ \begin{array}{rcl}
\dd u_{tt}(x,t) + u_t(x,t) &=&\dd u_{xx}(x,t), \\
 u(0,t) &=& 0,\\
 u(\pi,t)&=& 0,\\
 u(x,0) &=& \sin x,\\
\dd u_t(x,0) &=& 0.
 \end{array}
$$

\Prob{Xc9.6-1}{(Vibrating Finite String)}
Solve the wave
equation $\dd\frac{\partial^2 u}{\partial t^2}=c^2\frac{\partial^2
u}{\partial x^2}$ with boundary and initial conditions
$u(0,t)=u(L,t)=0$, $u(x,0)=\frac12\sin\frac{\pi
x}{L}+\frac14\sin\frac{3\pi x}{L} + \frac25\sin\frac{7\pi x}{L}$,
$u_t(x,0)=0$, $0 < x < L$, $t \ge 0$. Use the series formula
$u(x,t)=\sum_{n=1}^\infty b_n\sin\frac{n\pi x}{L}\cos\frac{n\pi
ct}{L}$.

{\small\sf {\bf References}: Edwards-Penney section 9.6 (2280
textbook) and Asmar's text, {\em PDE and BVP},
section 1.2.}


 \Prob{Xc9.6-2}{(Loudness)} The fraction of the loudness
associated with the fundamental tone ($b_1$-term in the series) is
the quotient
$$F_1=\frac{\left.\left(n^2b_n^2\right)\right|_{n=1}}{\sum_{k=1}^\infty k^2b_k^2}$$
Find an approximation to the percentage $100F_1$.

{\small\sf {\bf References}: ProbXc9.6-1. The discussion of music in
E\&P includes a derivation of the formula for the percentage
loudness $100F_n$.}


\section*{Chapter 9: 9.6 --     d'Alembert's Method}

\Prob{Xc9.6-15}{(d'Alembert's Solution)} Consider the problem
$$
 \begin{array}{rcl}
\dd u_{tt} &=& \dd u_{xx},\,\, 0\le x \le 1, \, t\ge 0, \\
 u(0,t) &=& 0,\\
 u(1,t)&=& 0,\\
 u(x,0) &=& f(x),\\
 u_t(x,0) &=& 0.
 \end{array}
$$
Assume $f(x)=4x$ on $0\le x \le 0.25$, $f(x)=2-4x$ on $0.25 < x \le
0.5$, $f(x)=0$ on $0.5<x \le 1$.

 (a) Find a solution formula for $u(x,t)$ using d'Alembert's method.

 (b) Plot a 3-frame filmstrip of the string shape at times $t=0,0.25,0.5$.

\begin{verbatim}
# EXAMPLE. Let f(x)=4x on [0,.25], f(x)=2-4x on [.25,.5], f(x)=0 otherwise
# Asmar 3.4-15, D'Alembert's solution of the wave equation, f=pulses,g=0
pulse:=(x,a,b)->piecewise(x<a,0,x<b,1,0);
f:=x->4*x*pulse(x,0,1/4)+(2-4*x)*pulse(x,1/4,1/2);
#plot(f(x),x=0..1);
F:=x->piecewise(x<0,-f(-x),f(x)); # Odd extension of f(x)
plot(F(x),x=-1..1);
u:=(x,t)->(1/2)*(F(x+t)+F(x-t));
#plot(u(x,0.7),x=-2..2);
plots[animate]( plot, [u(x,t),x=-3..3], t=0..1.5, trace=0, frames=50 );
\end{verbatim}
% See the web site links for updates to this sample maple code.

\Prob{Xc9.6-18}{(Energy Conservation and d'Alembert's Solution)}
Define
$$ E(t) = \frac12 \int_0^L \left(u_t^2(x,t)+c^2u_x^2(x,t)\right)dx.$$
Prove the energy conservation law, which says that the energy during
free vibrations of a string is constant for all time.

{\small\sf \BF{Problem Notes}. Show $dE/dt=0$.}

{\bf End of extra credit problems chapter 9.}

\end{document}
