\documentclass{article}
\usepackage{amsmath,amsthm,amssymb,times,graphics,enumitem} 

\renewcommand{\baselinestretch}{1.1}

\theoremstyle{plain}
\newtheorem{theorem}{Theorem}
\newtheorem*{theorem*}{Theorem}
\newtheorem{lemma}{Lemma}
\newtheorem*{lemma*}{Lemma}
\theoremstyle{definition}
\newtheorem{problem}{Problem}
\newtheorem*{answer}{Answer}
\newtheorem{remark}{Remark}
\newtheorem{definition}{Definition}
\newtheorem*{definition*}{Definition}
\newtheorem{construction}{Construction}
\newtheorem*{proposition*}{Proposition}

\newcommand{\<}{\langle}
\renewcommand{\>}{\rangle}

\newcommand{\Z}{\mathbb{Z}} 
\newcommand{\N}{\mathbb{N}} 
\newcommand{\R}{\mathbb{R}} 
\newcommand{\C}{\mathbb{C}} 


\newcommand{\bp}{\begin{problem}}
\newcommand{\ep}{\end{problem}}

\newcommand{\ba}{\begin{answer}}
\newcommand{\ea}{\end{answer}}

\newcommand{\ds}{\displaystyle}

\title{Problem set 1}
\author{Math 625 Spring 2024}
\date{Due Thursday, March 14}


\begin{document}
\maketitle 

\section{Hermite Interpolation} 

Choose $n$ distinct numbers $x_1<\cdots <x_{n+1}$ and let $f$ be a differentiable function $f$.  There is a unique 
polynomial $p$ of degree $2n+1$ satisfying $f(x_i)=p(x_i)$ and
$f'(x_i)=p'(x_i)$ for $i=1, \ldots, n+1$.  Let's call $p$ the \emph{$1$st order Hermite interpolate} of $f$.

\bp Explain why $p$ exists and why it is unique. 
\ep
\bp  Find the $11$th order Hermite interpolate of $\frac{1}{1+10t^2}$ using the interpolation points $-1,-0.6,-0.2,0.2,0.6,1$.
\ep
\bp   For $i=1, \ldots, n+1$, let $L_i(t)$ 
be the associated $i$-th Lagrange polynomial.  
For $i=1, \ldots, n+1$, define 
$$a_i(t)=(1-2(t-x_i)L_i'(x_i))(L_i(t))^2. \text{ and }b_i(t)=(t-x_i)(L_i(t))^2.
$$
Show that the $2n+2$ polynomials $\{a_1, \ldots, a_{n+1}, b_1, \ldots, b_{n+1}\}$
form an orthonormal basis of the space of polynomials of degree $\leq
2n+1$ with the inner product given by
$$\<f,g\>=\sum_{i=0}^n f(x_i)g(x_i)+ f'(x_i)g'(x_i).$$
\ep
\bp  Write a program that inputs a set of points $\{x_1, \ldots,
  x_{n+1}\}$ and outputs the polynomials $\{a_i, b_i\}$. 
\ep
\bp   Find a \emph{simple} formula
for the approximation $p$ of an arbitrary differentiable function $f$ as a linear combination of the $\{a_i, b_i\}$.
\ep
\bp  Prove:
\begin{theorem*}
If $f$ is differentiable at least $2n+2$ times, then for any number $x$, the difference $f(x)-p(x)$ between the value of $f$ and the Hermite interpolate is given by
$$f(x)-p(x)=\frac{f^{(2n+2)}(\theta)}{(2n+2)!}w(x)$$
where $w$ is the polynomial $w(t)=\prod_{i=1}^{n+1}(t-x_i)^2$ and
$\theta$ is some number between $x$ and $x_1$ and $x_{n+1}.$
\end{theorem*}
\ep
\bp Analyze the error terms for the $11$th degree Hermite interpolate for $\dfrac{1}{1+10t^2}$ using 
\begin{enumerate}[label=(\alph*)]
\item the interpolation points $-1,-0.5,0,0.5,1$.
\item Analyze the error terms for the $11$th degree Hermite interpolate for $\dfrac{1}{1+10t^2}$ using the $5$ Chebyshev interpolation points on the interval $[-1,1]$.
\item If you want to guarantee that the error in the degree $2n+1$ Hermite interpolate for $\dfrac{1}{1+10t^2}$ is less than $10^{-100}$, how many interpolate points do you need if you use $n$ Chebyshev points?
\end{enumerate}
\ep

\section{Fourier Series}

\bp Let $V$ be the vector space of integrable functions with the inner product defined by
$$\<f,g\>:=\frac{1}{\pi}\int_{-\pi}^\pi f(t)g(t)dt.$$ 
Let $W$ be the eleven dimensional subspace of functions spanned by 
$$\left\{1,\sin (t),\sin
  (2 t),\sin (3 t),\sin (4 t),\sin (5 t),\cos (t),\cos (2 t),\cos (3
  t),\cos (4 t),\cos (5 t)\right\}.$$

\begin{enumerate}[label=(\alph*)]
\item Project the absolute value function onto $W$.
\item Let $h$ be the periodic function (with period $2\pi$) defined by
$$h(t)=\begin{cases}
-1 &\text{ if }-\pi \leq t < 0 \\
1 & \text{ if }0 \leq t <\pi
\end{cases}$$
Project $h$ onto $W$.
\end{enumerate}
\ep

\bp In general, orthogonally projecting a function $f$ onto the space spanned by $$\{1,\sin(t), \cos(t), \sin(2t), \cos(2t), \ldots, \sin(nt), \cos(nt)\}$$ yields a function of the form
$$A_0+A_1 \cos(t)+B_1 \sin( t)+A_2 \cos (2t)+B_2\sin(2t)+ \cdots + A_n \cos (nt)+B_n\sin(nt).$$
Explain why for $n=1,2,\ldots$, the numbers $A_n$ and $B_n$ satisfy
$$A_n = \frac{1}{\pi}\int_{-\pi}^{\pi} f(t)\cos(nt)dt \text{ and }\frac{1}{\pi}B_n = \int_{-\pi}^{\pi} f(t)\sin(nt)dt.$$

\ep



\end{document}

