%%%%		-*- Mode: LaTeX -*-
%%%% Author:    J. Robert Buchanan
%%%% Address:   Department of Mathematics
%%%%		Millersville University
%%%%            P.O. Box 1002
%%%%            Millersville, PA 17551-0302
%%%% Phone:     717-871-7305
%%%% FAX:	717-871-7948
%%%% Email:     Robert.Buchanan@millersville.edu
%%%%
%%%% Date:      06/30/2022
%%%%
%%%% Purpose:   Introduction to Fourier Series
%%%%

\documentclass[handout,10pt]{beamer}

\mode<presentation>
{
  %\usetheme{Warsaw}
  \usetheme{default}
  %\usetheme{CambridgeUS}
  % or ...

  %\setbeamercovered{transparent}
  % or whatever (possibly just delete it)
}


\usepackage[english]{babel}
% or whatever

\usepackage[latin1]{inputenc}
% or whatever

\usepackage{times}
\usepackage[T1]{fontenc}
% Or whatever. Note that the encoding and the font should match. If T1
% does not look nice, try deleting the line with the fontenc.


\title{Introduction to Fourier Series}
\subtitle{MATH 467 \textit{Partial Differential Equations}} % (optional)


\author % (optional, use only with lots of authors)
{J~Robert~Buchanan}
% - Use the \inst{?} command only if the authors have different
%   affiliation.

\institute[Millersville University of Pennsylvania]
% (optional, but mostly needed)
{
  Department of Mathematics
}
% - Use the \inst command only if there are several affiliations.
% - Keep it simple, no one is interested in your street address.

\date{ % (optional)
Fall
%Spring
%Summer
\the\year}

\subject{Talks}
% This is only inserted into the PDF information catalog. Can be left
% out. 



% If you have a file called "university-logo-filename.xxx", where xxx
% is a graphic format that can be processed by latex or pdflatex,
% resp., then you can add a logo as follows:

% \pgfdeclareimage[height=0.5cm]{university-logo}{university-logo-filename}
% \logo{\pgfuseimage{university-logo}}



% Delete this, if you do not want the table of contents to pop up at
% the beginning of each subsection:
\AtBeginSubsection[]
{
  \begin{frame}<beamer>
    \frametitle{Outline}
    \tableofcontents[currentsection,currentsubsection]
  \end{frame}
}


% If you wish to uncover everything in a step-wise fashion, uncomment
% the following command: 

%\beamerdefaultoverlayspecification{<+->}


\begin{document}

\begin{frame}
  \titlepage
\end{frame}

%\begin{frame}
%  \frametitle{Outline}
%  \tableofcontents
  % You might wish to add the option [pausesections]
%\end{frame}


% Since this a solution template for a generic talk, very little can
% be said about how it should be structured. However, the talk length
% of between 15min and 45min and the theme suggest that you stick to
% the following rules:  

% - Exactly two or three sections (other than the summary).
% - At *most* three subsections per section.
% - Talk about 30s to 2min per frame. So there should be between about
%   15 and 30 frames, all told.

%\section{Introduction}

\begin{frame}\frametitle{Objectives}

In this lesson we will learn:
\begin{itemize}
\item the formal process for finding a Fourier series representation
  of a function,
\item the orthogonality of the trigonometric functions,
\item the Euler-Fourier formulas for finding Fourier series
  coefficients,
\item properties of periodic functions,
\item how to periodically extend a function,
\item the properties of even and odd periodic extensions of functions, and
\item practice finding the Fourier series representations of functions.
\end{itemize}

\end{frame}
%%

\begin{frame}\frametitle{Informal Definition of a Fourier Series}

The \textbf{Fourier series} expansion of a function $f(x)$ is a representation
of $f(x)$ on an interval $[-L,L]$ as the sum of
sine and cosine functions of the form
\[
\frac{a_{0}}{2} +
\sum_{n=1}^{\infty}
\left(  a_{n} \cos\frac{n \pi x}{L} + b_{n} \sin\frac{n \pi x}{L} \right)
\]
where $a_{n}$ and $b_{n}$ are constants.

\end{frame}
%%

\begin{frame}\frametitle{Issues Raised by Fourier Series}

\begin{itemize}
\item What functions $f(x)$ can be written as a
Fourier series?
\item If $f(x)$ can be represented as a Fourier Series,
what are the constants $a_{n}$ and $b_{n}$?
\item Will the Fourier series converge?
\item Provided the Fourier series converges, does it converge to $f(x)$ at all
points in the interval $[-L,L]$?
\item Can Fourier series be differentiated and integrated?
\end{itemize}

\end{frame}
%%

\begin{frame}\frametitle{Inner Product}

\begin{definition}
If $u(x)$ and $v(x)$ are integrable
on $[a,b]$, the \textbf{inner product}
of $u$ and $v$ on $[a,b]$, denoted as $\langle u,v \rangle$, is
defined as 
\[
\langle u,v \rangle = \int_{a}^{b} u(x) v(x) \, dx	.
\]
\end{definition}

\vspace*{0.10in}

\uncover<2->{%
\begin{definition}
The functions $u$ and $v$ are said to be
\textbf{orthogonal} on $[a,b]$ if
\[
\langle u,v \rangle = \int_{a}^{b} u(x) v(x) \, dx = 0	.
\]
A set $S$ of integrable functions on $[a,b]$ is said to be a
\textbf{mutually orthogonal set} if each pair of distinct functions in the set
is orthogonal.
\end{definition}
}

\end{frame}
%%

\begin{frame}\frametitle{Trigonometric System}

Let $S$ be the infinite set of functions
\[
\left\{ 1, \cos\frac{\pi x}{L}, \sin\frac{\pi x}{L},
\cos\frac{2\pi x}{L}, \sin\frac{2\pi x}{L},\cdots,
\cos\frac{n\pi x}{L},\sin\frac{n\pi x}{L},\cdots \right\}	.
\]
$S$ is a mutually orthogonal set on $[-L,L]$.

\end{frame}
%%

\begin{frame}\frametitle{Product-to-Sum Formulas}

\begin{align*}
\cos\alpha \cos\beta
	&=
\frac{1}{2} \left(  \cos(\alpha+\beta) + \cos(\alpha-\beta)  \right)	\\
\cos\alpha \sin\beta
	&=
\frac{1}{2} \left(  \sin(\alpha+\beta) - \sin(\alpha-\beta)  \right) \\
\sin\alpha \sin\beta
	&=
\frac{1}{2} \left(  \cos(\alpha-\beta) - \cos(\alpha+\beta)  \right)
\end{align*}

\end{frame}
%%

\begin{frame}\frametitle{Justification of Orthogonality}
\fontsize{9pt}{10.8}\selectfont

\begin{align*}
\lefteqn{\int_{-L}^{L} \cos\frac{m\pi x}{L} \cos\frac{n\pi x}{L} \, dx}	\\
	&=
\frac{1}{2} \int_{-L}^{L} \left[
\cos \frac{(m+n) \pi x}{L} + \cos \frac{(m-n) \pi x}{L}
\right] \, dx	\\
	&=
\left\{
\begin{array}{rl}
\displaystyle
\frac{L}{2 \pi} \left[ \frac{1}{m+n} \sin \frac{(m+n) \pi x}{L} +
\frac{1}{m-n} \sin \frac{(m-n) \pi x}{L}
\right]_{-L}^{L} & \mbox{if $m \ne n$,}	\\
\displaystyle
\frac{1}{2} \left[ \frac{L}{2m \pi} \sin \frac{2m \pi x}{L} + x
\right]_{-L}^{L} & \mbox{if $m = n$}
\end{array}
\right.	\\
	&=
\left\{
\begin{array}{rl}
0	& \mbox{if $m \ne n$,}	\\
L	& \mbox{if $m = n$.}
\end{array}
\right.
\end{align*}
The orthogonality of $\sin (m \pi x/L)$, $\sin (n \pi x/L)$, and $\cos
(k \pi x/L)$ is handled similarly.

\end{frame}
%%

\begin{frame}\frametitle{Euler-Fourier Formulas}

Assuming $f(x)$ defined on
$[-L,L]$ can be represented as a Fourier series we write
\[
f(x) \sim \frac{a_{0}}{2} +
\sum_{n=1}^{\infty}\left(  a_{n} \cos\frac{n\pi x}{L} +
  b_{n}\sin\frac{n\pi x}{L} \right)	,
\]
where
\begin{align*}
a_{0} &= \frac{1}{L} \int_{-L}^{L} f(x) \, dx	\\
a_{n} &= \frac{1}{L} \int_{-L}^{L} f(x) \cos\frac{n\pi x}{L} \, dx	\\
b_{n} &= \frac{1}{L} \int_{-L}^{L} f(x) \sin\frac{n\pi x}{L} \, dx
\end{align*}
for $n=1,2,\ldots$.

\end{frame}
%%

\begin{frame}\frametitle{Justification (1 of 2)}
\fontsize{9pt}{10.8}\selectfont

Assuming $f(x)$ equals its Fourier representation on $[-L,L]$ and that
the infinite series can be integrated term-by-term, multiply both
sides of the equation
\[
f(x) = \frac{a_{0}}{2} +
\sum_{n=1}^{\infty} \left(  a_{n} \cos \frac{n \pi x}{L} +
  b_{n} \sin\frac{n \pi x}{L} \right)	,
\]
by $\sin (m \pi x/L)$ and integrate over $[-L,L]$.
\begin{align*}
\int_{-L}^{L} f(x) \sin \frac{m \pi x}{L} \, dx
	= {} & \int_{-L}^{L} \left[ \frac{a_{0}}{2} +
\sum_{n=1}^{\infty} \left(  a_{n} \cos \frac{n \pi x}{L} +
  b_{n} \sin \frac{n \pi x}{L} \right) \right] \sin \frac{m \pi x}{L} \, dx	\\
	= {} & \frac{a_{0}}{2} \int_{-L}^{L} \sin \frac{m \pi x}{L} \, dx +
\sum_{n=1}^{\infty} a_{n} \int_{-L}^{L} \cos \frac{n \pi x}{L}
              \sin \frac{m \pi x}{L} \, dx	\\
	& + \sum_{n=1}^{\infty}  b_{n} \int_{-L}^{L} \sin \frac{n \pi x}{L} \sin
            \frac{m \pi x}{L} \, dx = b_{m} L
\end{align*}

\end{frame}
%%

\begin{frame}\frametitle{Justification (2 of 2)}

Multiplying both sides of the earlier equation by $\cos (m \pi x/L)$
and integrating over $[-L,L]$ yields $a_{m}$ for $m \in \mathbb{N}$.

\vspace*{0.10in}

Integrating both sides of
\[
f(x) = \frac{a_{0}}{2} +
\sum_{n=1}^{\infty} \left(  a_{n} \cos \frac{n \pi x}{L} +
  b_{n} \sin\frac{n \pi x}{L} \right)	,
\]
over $[-L,L]$ produces
\begin{align*}
\int_{-L}^{L} f(x) \, dx
	&= \int_{-L}^{L} \frac{a_{0}}{2} \, dx + \sum_{n=1}^{\infty}
   \left(  a_{n} \int_{-L}^{L} \cos \frac{n \pi x}{L} \, dx +
  b_{n} \int_{-L}^{L} \sin\frac{n \pi x}{L} \, dx \right)	\\
	&= a_{0} L	.
\end{align*}

\end{frame}
%%

\begin{frame}\frametitle{Remarks}

\begin{itemize}
\item In general the symbol $\sim$ is used in place of $=$ since we do
  not yet know whether the infinite series converges, or if it does
  converge, that it converges to $f(x)$.
\item The only assumption placed on $f(x)$ is that it be integrable on
  $[-L,L]$.
It does not even need to be defined at all points in $[-L,L]$.
\item If the infinite series converges, it does so to a $2L$-periodic
  function, which can be thought of as the $2L$-periodic extension of $f(x)$.
\end{itemize}

\end{frame}
%%

\begin{frame}\frametitle{Periodic Functions}

\begin{definition}
A function $f(x)$ is said to be
\textbf{periodic} if there
exists a constant $T>0$ such that, for any $x$ in the domain of $f$,
$x+T$ is in its domain and
$f(x+T) = f(x)$ holds for all such $x$.
In this case, $T$ is called a \textbf{period} of
$f(x)$ and, often $f(x)$ is said to be $T$--\textbf{ periodic}
or \textbf{periodic with period $T$}.
\end{definition}

\end{frame}
%%

\begin{frame}\frametitle{Properties of Periodic Functions}

\begin{itemize}
\item Any constant function is periodic and any $T>0$
is a period.
%
\item If $T$ is a period of function $f(x)$, so is
$k \, T$ for any $k \in \mathbb{N}$.
%
\item If $f(x)$ and $g(x)$ are periodic
with common period $T$, then for any constant $c$,
$c f(x)$ , $f(x) \pm g(x)$, $f(x) \cdot g(x)$, and $f(x)/g(x)$ are all
periodic with period $T$ on their respective domains.
%
\item If $f(x)$ is periodic with period $T$, then so
is $f'(x)$ on its domain.
%
\item If $f(x)$ is $T$--periodic, integrable and
$\displaystyle \int_{0}^{T} f(x)  \, dx = 0$,
then $\displaystyle \int_{0}^{x} f(t) \, dt$ is $T$--periodic.
%
\item If $f(x)$ is an integrable, periodic function with period
$T$ defined on $(-\infty,\infty)$, then for any $a \in \mathbb{R}$,
\[
\int_{a}^{a+T} f(x) \, dx = \int_{0}^{T} f(x) \, dx	.
\]
\end{itemize}

\end{frame}
%%

\begin{frame}\frametitle{Periodic Extensions}

Suppose $f(x)$ is defined on $[-L,L]$ where $L > 0$.
A periodic function $F(x)$ can be defined on $(-\infty,\infty)$ in the
following way:
\begin{itemize}
\item If $x \in (-L,L]$, then $F(x) = f(x)$.
%
\item If $x \notin (-L,L]$ and $k$ is an integer such that
$x+k (2L) \in (-L,L]$, then $F(x) = f(x + k (2L))$.
\end{itemize}

\uncover<2->{%
\textbf{Remarks}:
\begin{itemize}
\item $F(x)$ is periodic with period $2L$.
\item If no confusion results, $f(x)$ is used to denote
its own periodic extension.
\item $F(x)$ as defined not a ``true'' extension
of $f(x)$ unless $f(-L) = f(L)$.
\end{itemize}
}

\end{frame}
%%

\begin{frame}\frametitle{Example (1 of 2)}

Function $f(x) = x^{2}$ is continuous on $[-1,1]$.
Sketch its $2$--periodic extension.
\begin{center}
\only<1>{\resizebox{0.70\textwidth}{!}{\includegraphics{example01}}}
\only<2>{\resizebox{0.70\textwidth}{!}{\includegraphics{example01ext}}}
\end{center}

\end{frame}
%%

\begin{frame}\frametitle{Example (2 of 2)}

Function $f(x) = e^{x}$ is continuous on $[-1,1]$.
Sketch its $2$--periodic extension.
\begin{center}
\only<1>{\resizebox{0.70\textwidth}{!}{\includegraphics{example02}}}
\only<2>{\resizebox{0.70\textwidth}{!}{\includegraphics{example02ext}}}
\end{center}

\end{frame}
%%

\begin{frame}\frametitle{Find the Fourier Coefficients}

Consider the piecewise-defined function
\[
f(x) = \left\{ \begin{array}{ll}
x & \mbox{if $-1 \le x < 0$,}	\\
0 & \mbox{if $0 \le x < 1$.}
\end{array} \right.
\]
\begin{enumerate}
\item Write down the Fourier series of $f(x)$.
\item Sketch the $2$-periodic extension of $f(x)$.
\end{enumerate}

\end{frame}
%%

\begin{frame}\frametitle{Coefficients}

\begin{align*}
a_{0} &= \frac{1}{1} \int_{-1}^{1} f(x) \, dx = \int_{-1}^{0} x \,
            dx = -\frac{1}{2}	\\
a_{n} &= \frac{1}{1} \int_{-1}^{1} f(x) \cos \frac{n \pi x}{1} \,
            dx = \int_{-1}^{0} x \cos (n \pi x) \, dx	\\
	&=
            \frac{1-(-1)^{n}}{n^{2} \pi^{2}} = \left\{
\begin{array}{ll}
2/(n \pi)^{2} & \mbox{if $n$ is odd,}	\\
0	& \mbox{if $n$ is even.}
\end{array}
\right.	\\
b_{n} &= \frac{1}{1} \int_{-1}^{1} f(x) \sin \frac{n \pi x}{1} \,
            dx = \int_{-1}^{0} x \sin (n \pi x) \, dx	\\
	&= \frac{(-1)^{n+1}}{n \pi}
\end{align*}

\end{frame}
%%

\begin{frame}\frametitle{Fourier Representation}

\[
f(x) \sim
-\frac{1}{4} + \sum_{n=1}^{\infty} \frac{(-1)^{n+1}}{n \pi} \sin (n
              \pi x) + \sum_{n=1}^{\infty} \frac{2}{(2n-1)^{2}
                \pi^{2}} \cos ((2n-1) \pi x)
\]

\end{frame}
%%

\begin{frame}\frametitle{$2$-Periodic Extension}

\begin{center}
\resizebox{0.80\textwidth}{!}{\includegraphics{example03ext}}
\end{center}

\end{frame}
%%

\begin{frame}\frametitle{Fourier Series (truncated to 10 terms)}

\begin{center}
\resizebox{0.80\textwidth}{!}{\includegraphics{example03fs}}
\end{center}

\end{frame}
%%

\begin{frame}\frametitle{Find the Fourier Coefficients}

Consider the function $f(x) = x^{2}$.
\begin{enumerate}
\item Write down the Fourier series of $f(x)$ valid for $[-\pi, \pi]$.
\item Sketch the $2 \pi$-periodic extension of $f(x)$.
\end{enumerate}

\end{frame}
%%

\begin{frame}\frametitle{Coefficients}

\begin{align*}
a_{0} &= \frac{1}{\pi} \int_{-\pi}^{\pi} x^{2} \, dx = \frac{2}{3} \pi^{2}
	\\
a_{n} &= \frac{1}{\pi} \int_{-\pi}^{\pi} x^{2} \cos (n x) \, dx =
\frac{4 (-1)^{n}}{n^{2}}
	\\
b_{n} &= \frac{1}{\pi} \int_{-\pi}^{\pi} x^{2} \sin (n x) \, dx = 0
\end{align*}

\vspace*{0.10in}

\uncover<2->{%
\[
f(x)
	\sim
\frac{\pi^{2}}{3} + \sum_{n=1}^{\infty} \frac{4 (-1)^{n}}{n^{2}} \cos
              (n x)
\]
}

\end{frame}
%%

\begin{frame}\frametitle{$2 \pi$-Periodic Extension}

\begin{center}
\resizebox{0.80\textwidth}{!}{\includegraphics{example04ext}}
\end{center}

\end{frame}
%%

\begin{frame}\frametitle{Fourier Series (truncated to 10 terms)}

\begin{center}
\resizebox{0.80\textwidth}{!}{\includegraphics{example04fs}}
\end{center}

\end{frame}
%%

\begin{frame}\frametitle{Find the Fourier Coefficients}

Consider the function
\[
f(x) = \left\{ \begin{array}{ll}
0 & \mbox{if $-\pi \le x \le 0$,}	\\
\sin x & \mbox{if $0 < x < \pi$.}
\end{array} \right.
\]
\begin{enumerate}
\item Write down the Fourier series of $f(x)$ valid for $[-\pi, \pi]$.
\item Sketch the $2 \pi$-periodic extension of $f(x)$.
\end{enumerate}

\end{frame}
%%

\begin{frame}\frametitle{Coefficients}

\begin{align*}
a_{0} &= \frac{1}{\pi} \int_{-\pi}^{\pi} f(x) \, dx =
\frac{1}{\pi} \int_{0}^{\pi} \sin x \, dx = \frac{2}{\pi}
	\\
a_{n} &= \frac{1}{\pi} \int_{-\pi}^{\pi} f(x) \cos (n x) \, dx =
\frac{1}{\pi} \int_{0}^{\pi} \sin x \cos (n x) \, dx	\\
	&=
\left\{ \begin{array}{ll}
-2/(\pi (n^{2} - 1)) & \mbox{if $n$ is even,}	\\
0	& \mbox{if $n$ is odd.}
\end{array} \right.	\\
b_{1} &= \frac{1}{\pi} \int_{-\pi}^{\pi} f(x) \sin x \, dx =
\frac{1}{\pi} \int_{0}^{\pi} \sin^{2} x \, dx = \frac{1}{2}	\\
b_{n} &= \frac{1}{\pi} \int_{-\pi}^{\pi} f(x) \sin (n x) \, dx =
\frac{1}{\pi} \int_{0}^{\pi} \sin x \sin (n x) \, dx =
0
\end{align*}

\vspace*{0.10in}

\uncover<2->{%
\[
f(x)
	\sim
\frac{1}{\pi} + \frac{1}{2} \sin x - \sum_{n=1}^{\infty} \frac{2}{\pi (4 n^{2} - 1)} \cos
              (2 n x)
\]
}

\end{frame}
%%

\begin{frame}\frametitle{$2 \pi$-Periodic Extension}

\begin{center}
\resizebox{0.80\textwidth}{!}{\includegraphics{example05ext}}
\end{center}

\end{frame}
%%

\begin{frame}\frametitle{Fourier Series (truncated to 10 terms)}

\begin{center}
\resizebox{0.80\textwidth}{!}{\includegraphics{example05fs}}
\end{center}

\end{frame}
%%

\begin{frame}\frametitle{Find the Fourier Coefficients}

Find the Fourier series representation of
$g(x) = | \sin x |$ on $[-\pi,\pi]$.

\end{frame}
%%

\begin{frame}\frametitle{Solution}

\begin{itemize}
\item Note that
\[
| \sin x | = -\sin x + \left\{
\begin{array}{ll}
0	& \mbox{if $-\pi \le x \le 0$,}	\\
2 \sin x & \mbox{if $0 \le x \le \pi$.}
\end{array}
\right.
\]
\item The Fourier series for $\sin x$ is merely $\sin x$.
\item The Fourier series for the piecewise-defined function was found
  in the previous example.
\end{itemize}

\vspace*{0.10in}

\uncover<2->{%
\[
f(x)
	\sim
\frac{2}{\pi} - \sum_{n=1}^{\infty} \frac{4}{\pi (4 n^{2} - 1)} \cos
              (2 n x)
\]
}

\end{frame}
%%

\begin{frame}\frametitle{Fourier Series (truncated to 10 terms)}

\begin{center}
\resizebox{0.80\textwidth}{!}{\includegraphics{example06fs}}
\end{center}

\end{frame}
%%

\begin{frame}\frametitle{Even, Odd, Periodic Extensions}

\textbf{Comment}: the spatial domain of many of the PDEs we study
(\textit{e.g.}, the heat equation and wave equation) is the interval
$[0,L]$, not $[-L,L]$.
If an initial condition is specified on $[0,L]$ we may extend it to
$[-L,L]$ (and thence to $(-\infty,\infty)$) in any way that it remains
integrable.
Options include:

\vspace*{0.10in}

\begin{columns}
\begin{column}{0.50\textwidth}
\textbf{Even Extension}
\[
f_{e}(x) = \left\{ \begin{array}{ll}
f(-x) & \mbox{if $-L \le x < 0$,}	\\
f(x) & \mbox{if $0 \le x \le L$.}
\end{array} \right.
\]
\end{column}
%
\begin{column}{0.50\textwidth}
\textbf{Odd Extension}
\[
f_{o}(x) = \left\{ \begin{array}{ll}
-f(-x) & \mbox{if $-L \le x < 0$,}	\\
f(x) & \mbox{if $0 \le x \le L$.}
\end{array} \right.
\]
\end{column}
%
\end{columns}

\end{frame}
%%

\begin{frame}\frametitle{Example}

Consider the function $f(x) = \cos x$ on $[0,\pi/2]$.
\begin{enumerate}
\item Sketch the odd $\pi$-periodic extension of $f(x)$.
\item Find the Fourier series representation for the odd
  $\pi$-periodic extension of $f(x)$.
\end{enumerate}

\end{frame}
%%

\begin{frame}\frametitle{Graph of $f_{o}(x)$}

\begin{center}
\resizebox{0.80\textwidth}{!}{\includegraphics{example07odd}}
\end{center}

\end{frame}
%%

\begin{frame}\frametitle{Fourier Series Coefficients}

\begin{align*}
a_{0}	&= \frac{2}{\pi} \int_{-\pi/2}^{\pi/2} f_{o}(x) \, dx = 0
  \\
a_{n}	&= \frac{2}{\pi} \int_{-\pi/2}^{\pi/2} f_{o}(x) \cos
              \frac{n \pi x}{\pi/2} \, dx = 0	\\
b_{n} &= \frac{2}{\pi} \int_{-\pi/2}^{\pi/2} f_{o}(x) \sin
              \frac{n \pi x}{\pi/2} \, dx	\\
	&=
-\frac{2}{\pi} \int_{-\pi/2}^{0} \cos (-x) \sin
              \frac{n \pi x}{\pi/2} \, dx +
\frac{2}{\pi} \int_{0}^{\pi/2} \cos (x) \sin
              \frac{n \pi x}{\pi/2} \, dx	\\
	&=
\frac{4}{\pi} \int_{0}^{\pi/2} \cos (x) \sin (2 n x) \, dx
	= \frac{8 n}{(4 n^{2} - 1) \pi}
\end{align*}
Since only the $b_{n}$ coefficients are nonzero, this is called a
\textbf{Fourier sine series}.

\end{frame}
%%

\begin{frame}\frametitle{Fourier Series Representation}

\[
f_{o}(x) \sim \sum_{n=1}^{\infty} \frac{8 n}{(4 n^{2} - 1) \pi} \sin (2 n x)
\]
\begin{center}
\resizebox{0.80\textwidth}{!}{\includegraphics{example07fs}}
\end{center}

\end{frame}
%%

\begin{frame}\frametitle{Example}

Consider the function $f(x) = e^{x}$ on $[0,1]$.
\begin{enumerate}
\item Sketch the even $2$-periodic extension of $f(x)$.
\item Find the Fourier series representation for the even
  $2$-periodic extension of $f(x)$.
\end{enumerate}

\end{frame}
%%

\begin{frame}\frametitle{Graph of $f_{e}(x)$}

\begin{center}
\resizebox{0.80\textwidth}{!}{\includegraphics{example08even}}
\end{center}

\end{frame}
%%

\begin{frame}\frametitle{Fourier Series Coefficients}

\begin{align*}
a_{0}	&= \int_{-1}^{1} f_{e}(x) \, dx	\\
	&= 2 \int_{0}^{1} e^{x} \, dx
	= 2 (e - 1)  \\
a_{n}	&= \int_{-1}^{1} f_{e}(x) \cos (n \pi x) \, dx	\\
	&= 2 \int_{0}^{1} e^{x} \cos (n \pi x) \, dx
	= \frac{2 ((-1)^{n} e - 1)}{n^{2} \pi^{2} + 1}	\\
b_{n} &= \int_{-1}^{1} f_{e}(x) \sin (n \pi x) \, dx = 0
\end{align*}
Since only the $a_{n}$ coefficients are nonzero, this is called a
\textbf{Fourier cosine series}.

\end{frame}
%%

\begin{frame}\frametitle{Fourier Series Representation}

\[
f_{e}(x) \sim e - 1 + \sum_{n=1}^{\infty} \frac{2 ((-1)^{n} e -
  1)}{n^{2} \pi^{2} + 1} \cos (n \pi x)
\]
\begin{center}
\resizebox{0.80\textwidth}{!}{\includegraphics{example08fs}}
\end{center}

\end{frame}
%%

\begin{frame}\frametitle{Remark}

Any function $f(x)$ defined on
$(-\infty,\infty)$ can be written
as the sum of an even function and an odd function.
In fact,
\[
f(x) = \frac{f(x) + f(-x)}{2} +
\frac{f(x) - f(-x)}{2}
\]
where $(f(x) + f(-x))/2$ is even (sometimes called the \textbf{even part} of
$f$) and $(f(x) - f(-x))/2$ is odd (likewise called the \textbf{odd part} of $f$).

\end{frame}
%%

\begin{frame}\frametitle{Homework}

\begin{itemize}
\item Read Sections $3.1$--$3.5$
\item Exercises: 1--9
\end{itemize}

\end{frame}
%%

%%%
\end{document}

%%%%
%%%% EOF
%%%%
