% begin preamble
\documentclass[11pt,titlepage]{article}
\usepackage[margin=1in,noheadfoot]{geometry}
\usepackage[parfill]{parskip}
\usepackage{graphicx}
\usepackage[colorlinks,urlcolor=blue]{hyperref}
\usepackage{amssymb}
\usepackage{amsbsy}
\usepackage{wrapfig}

\newcommand{\e}[1]{\times 10^{#1}}
\newcommand{\q}{\mathrm}
\newcommand{\where}[1][where]{\qquad\mbox{#1}\qquad}
\newcommand{\bs}[1]{\boldsymbol{#1}}
\newcommand{\bh}[1]{\hat{\boldsymbol{#1}}}
\newcommand{\bv}[1]{\vec{\boldsymbol{#1}}}
\newcommand{\bt}[1]{\tilde{\boldsymbol{#1}}}
\newcommand{\ad}{^{\dagger}}
\newcommand{\flow}[1]{\mathcal{e}_{#1}}
\newcommand{\flux}[1]{\phi_{#1}}
\newcommand{\dslash}{d \hspace{-0.5ex}\rule[1.2ex]{0.6ex}{.1ex}}
\newcommand{\ts}{\textsuperscript}
\def\rcurs{{\mbox{$\resizebox{.16in}{.08in}{\includegraphics{scriptr}}$}\!\!}}
\def\brcurs{{\mbox{$\resizebox{.16in}{.08in}{\includegraphics{boldr}}$}\!\!}}
\def\hrcurs{{\mbox{$\hat \brcurs$}\!}}
%end preamble

\begin{document}
\begin{center}
  {\bf University of Kentucky, Physics 306 \\
    Homework \#6, Rev. A, due Wednesday, 2024-02-21 }
\end{center}

\vspace{.3 in}

{\bf 1.} Finite dimensional function spaces.

{\bf \quad a)} In the space of cubic polynomials with basis vectors $f_{0}(x)=1$, $f_{1}(x)=x$, $f_{2}(x)=x^{2}$, $f_{3}(x)=x^{3}$, i) what are the components of the function $f(x)=a+bx+cx^{2}+dx^{3}$?  ii) Find the components of the same function in the basis $P_{0}=1$, $P_{1}=x$, $P_{2}=\frac12(3x^{2}-1)$, $P_{3}=\frac12(5x^{3}-3x)$.

{\bf \quad b)} Calculate the matrix $D$ of the derivative operator $d/dx$, in i) the basis $[f_{0}, f_{1}, f_{2}, f_{3}]$, and ii) in the basis $[P_{0}, P_{1}, P_{2}, P_{3}]$.  iii. [{\it bonus}: Show that $D$ is nilpotent.]

{\bf \quad c)} Find the components of the function $A\cos(x-\phi)$ i) in the basis $h_{1}=\cos(x)$, $h_{2}=\sin(x)$, and ii) in the basis $k_{1}=e^{ix}$, $k_{2}=e^{-ix}$.


{\bf 2.} The {\bf \href{https://en.wikipedia.org/wiki/Fourier_series}{Fourier Series}} is an application of using an orthogonal basis to extract components of a generalized vector (function).  Orthogonality is crucial, because otherwise it would be impossible to solve the linear system of equations (invert an infinite-dimensional matrix) \mbox{to obtain each component.}

{\bf \quad a)} Submit a screenshot of your completed Level 3 in the \href{https://phet.colorado.edu/en/simulations/fourier-making-waves/about}{Fourier: Making Waves} Wave Game.

{\bf \quad b)} Calculate the inner products $\langle n|m\rangle=\int_{-\pi}^{\pi}d\phi \, \Phi_{n}^{*}(\phi) \Phi_{m}(\phi)$ of the Fourier sine basis functions $\Phi_{n}(\phi)=\frac{1}{\sqrt{\pi}}\sin(n\phi)$.  Use this orthonormal basis to calculate the components $b_{n}$ of the Fourier sine series $f(\phi)=\sum_{n=1}^{\infty} b_{n} \Phi_{n}(\phi)$ of the function $f(\phi)=1$ for $0<\phi<\pi$ and $f(\phi)=-1$ for $-\pi<\phi<0$.  Plot the first ${1,2,3,5,10}$ terms in Mathematica. What does the periodic series look like outside the interval $-\pi<\phi<\pi$?  Compare the inner product $\langle f|f\rangle=\int_{-\pi}^{\pi}d\phi \, f^{*}(\phi) f(\phi)$ of $f(\phi)$ with that of its Fourier components  $\langle f|f\rangle=\sum_{n} b_{n}^*b_{n}$. [it's a {\bf rotation} from the $|\phi\rangle$ to $|n\rangle$ basis!]
% Manipulate[Plot[Sum[(4/Pi/(2 n-1)) Sin[(2 n - 1) x],{n,1,m}],{x,-Pi,2Pi}],{m,1,30,1}]
% Sum[(4/Sqrt[Pi]/(2 n-1))^2,{n,1,Infinity}]
%
% The Fourier series is a {\bf rotation} from the $|\phi\rangle$ to $|n\rangle$ basis in the linear space of periodic functions!
% {\bf \quad b)} Calculate the Fourier cosine series $f(x)=\sum_{n=1}^{\infty} a_{n} \cos(n\pi x/L)$ of $f(x)=kx^{2}$ over the interval $-L/2\leq x \leq L/2$.  What does the periodic series look like outside this interval?  Compare the inner product $\langle kx^{2}|kx^{2}\rangle=\int_{-L/2}^{L/2}dx\,\left(kx^{2}\right)^{2}$ with that of its Fourier components \mbox{ $\sum_{n} a_{n}^{2}$. [it's a rotation!]}


\end{document}

%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% End:
