\documentclass{article}
\usepackage{amsmath,amsthm,amssymb,amsfonts,fancyhdr,graphicx,multicol}
\usepackage[margin=1.5in]{geometry}


\renewcommand{\baselinestretch}{1.1}

\theoremstyle{plain}
\newtheorem{theorem}{Theorem}
\theoremstyle{definition}
\newtheorem{problem}{Problem}
\newtheorem{remark}{Remark}
\newtheorem{definition}{Definition}
\newcommand{\bp}{\begin{problem}}
\newcommand{\ep}{\end{problem}}

\newtheorem*{answer}{Answer}
\newtheorem*{lemma*}{Lemma}
\newtheorem*{theorem*}{Theorem}
\newcommand{\ba}{\begin{answer}}
\newcommand{\ea}{\end{answer}}

\newcommand{\ds}{\displaystyle}
\newcommand{\ben}{\renewcommand{\theenumi}{\alph{enumi}}\renewcommand{\labelenumi}{(\theenumi)}\begin{enumerate}}
\newcommand{\een}{\end{enumerate}}

\newcommand{\Z}{\mathbb{Z}} 
\newcommand{\N}{\mathbb{N}} 
\newcommand{\R}{\mathbb{R}} 
\newcommand{\C}{\mathbb{C}} 
\newcommand{\Rep}{\operatorname{Rep}}
\newcommand{\id}{\operatorname{Id}}
\newcommand{\proj}{\operatorname{Proj}}

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


\fancyhead[L]{\Large \textbf{Math 207 Fall 2014}}
\fancyhead[R]{\large \textbf{Problem Set 1 - Answers}}


\begin{document}
\pagestyle{fancy}
\fancyfoot[R,L,C]{}

\section*{Correspondences obtained by using ordered bases} 
\subsection*{Using an ordered basis to represent a vector as columns of scalars}
Using an ordered basis $B=\{b_1, \ldots, b_n\}$ for a vector space
$V$, there is a bijective correspondence between the vectors in $V$
and vectors in $\R^n$.  I will remind you of this correspondence and
also define some convenient terminology.

Any vector $v\in V$ can be expressed uniquely
as $v=\sum_{i=1}^n \alpha_i b_i$ where $\alpha_i \in \R$.  Then
$v$ corresponds to the column vector $\Rep_B(v)\in \R^n$ defined
by $$\Rep_B(p(x))=\begin{pmatrix}\alpha_1\\\alpha_2\\\vdots \\\alpha_n\end{pmatrix}.$$
The correspondence 
\begin{align*}
V &\longleftrightarrow \R^n\\
v&\longleftrightarrow \Rep_B(v)
\end{align*}
is one-to-one since every vector in the space can be expressed as a linear
combination of the basis vectors uniquely and the corrspondence is
onto since every linear combination of the basis
vectors is a vector in the space.

Note that the correspondence depends on the choice of ordered basis
$B$, and that dependence is reflected in the notation $\Rep_B(v).$

\bp Let $V$ be the space of polynomials of degree less than or equal
to four.  The set $$B=\{1+x,1-x,1-2x^2,1+x-x^3,x^2-x^4\}$$ is a basis
for $V$.  Use the ordered basis $B$ to obtain a correspondence between
$V\leftrightarrow \R^5.$

\ben 
\item Give the polynomials in $V$ that correspond to the vectors
  $$\begin{pmatrix}1\\0\\0\\0\\0\end{pmatrix},
  \quad \begin{pmatrix}1\\0\\0\\-1\\0\end{pmatrix}, \text{ and
  }\begin{pmatrix}1\\0\\-2\\-1\\1\end{pmatrix}$$
\ba $$\begin{pmatrix}1\\0\\0\\0\\0\end{pmatrix}\text{ means
}1e_1=1+x.$$
 $$\begin{pmatrix}1\\0\\0\\-1\\0\end{pmatrix}\text{ means
}1e_1-1e_4=1+x-(1+x-x^3)=x^3.$$
 $$\begin{pmatrix}1\\0\\-2\\-1\\1\end{pmatrix}\text{ means
}1e_1-2e_3-e_4+e_5=1+x-2(1-2x^2)-(1+x-x^3)+x^2-x^4=-2+5x^2+x^3-x^4.$$
 \ea
\item Give the vectors in $\R^5$ that correspond to the
  polynomials $$x^3, \quad 3x^2, \quad 2x^4-7, \text{ and }4x^4-14$$
\ba From above, we
know $$x^3\leftrightarrow \begin{pmatrix}1\\0\\0\\-1\\0\end{pmatrix}$$
To find the vector that corresponds to $3x^2$, write 
\begin{align*}
3x^2&=\alpha_1
e_1+\alpha_2 e_2+ \alpha_3 e_3+\alpha_4 e_4 +\alpha_5 e_5\\
&=\alpha_1+\alpha_2+\alpha_3+\alpha_4+(\alpha1-\alpha2+\alpha_4)x+(\alpha_5-2\alpha_3)
x^2-\alpha_4 x^3-\alpha_5 x^4 .
\end{align*}
Since $3x^2$ has no $x^3$ or $x^4$ terms, $\alpha_5=\alpha_4=0$.  So
$$3x^2=\alpha_1+\alpha_2+\alpha_3+(\alpha1-\alpha2)x-2\alpha_3 x^2$$
So, $3=-2 \alpha_3 \Rightarrow \alpha_3=-\frac{3}{2}.$
Then, setting the constant and linear terms equal to zero yields
$$\alpha_1+\alpha_2=-\frac{3}{2}=0 \text{ and }\alpha_1-\alpha_2=0
\Rightarrow \alpha_1=\frac{3}{4} \text{ and }\alpha_2=\frac{3}{4}.$$
So, $$3x^2 \leftrightarrow \begin{pmatrix}\frac{3}{4}\\\frac{3}{4}\\-\frac{3}{2}\\0\\0\end{pmatrix}$$
To express $2x^4-7=\alpha_1
e_1+\alpha_2 e_2+ \alpha_3 e_3+\alpha_4 e_4 +\alpha_5 e_5$, note that
$-2 e_5-e_3=2x^4-1.$  Also note that $(e_1+e_2)=2\Rightarrow
-3e_1-3e_2)=-6$.  So, $-2 e_5-e_3-3e_1-3e_2=2x^4-7$.  So, 
$$2x^4-7 \leftrightarrow \begin{pmatrix}-3\\-3\\-1\\0\\-2\end{pmatrix}$$
Finally, since $4x^4-14=2(2x^4-7)$, we have 
$$4x^4-14 \leftrightarrow \begin{pmatrix}-6\\-6\\-2\\0\\-4\end{pmatrix}$$

\ea
\een
\ep

\subsection*{Using ordered bases to represent linear transformations as
a matrix of scalars}
Given an ordered basis $B_V=\{v_1,
\ldots, v_k\}$ of a vector space $V$ and an ordered basis $B_W=\{w_1,
\ldots, w_n\}$ of $W$, there's a bijective correspondence between
linear transformations $T:V\to W$ and $n\times k$ matrices of
scalars, defined as follows:

Given a linear transformation $T:V\to W$, define a matrix
$\Rep_{B_V,B_W}(T)$ by setting the $i$-th column to be $\Rep_{B_W}(T(v_i)).$

To put it another way, for each basis vector $v_i\in B_V$,
the vector $T(v_i)$ is an element of $W$ and so it 
can be expressed uniquely in terms of the
basis $B_W$:
$$T(v_i)=\sum_{j=1}^n a_{ij}w_j.$$
The numbers $a_{ij}$ for $i=1, \ldots, k$ and $j=1, \ldots, n$ define
the $n\times k$ matrix $$\Rep_{B_V,B_W}(T)=\begin{pmatrix}a_{11} &
  a_{12} & \cdots & a_{1k} \\ 
a_{21} &  a_{22} & \cdots & a_{2k} \\
\vdots & \vdots &  & \vdots \\ 
a_{n1} &  a_{n2} & \cdots & a_{nk} 
\end{pmatrix}.$$
Notice, the $i$-th column of the
matrix $\Rep_{B_V,B_W}(T)$ is the column of scalars $$\begin{pmatrix}
a_{i1} \\ a_{i2} \\ \vdots \\ a_{in}\end{pmatrix}=\Rep_{B_W}(T(v_i)).$$

\bp As before, let $V$ be the space of polynomials of degree less than or equal
to four and let $$B=\{1+x,1-x,1-2x^2,1+x-x^3,x^2-x^4\}$$ be a basis
for $V$.  The function $T:V \to V$ defined by $T(p)=p'(t)+p(0)$ defines a
  linear transformation.   
\ben
\item Using the correspondence $V
  \longleftrightarrow \R^5$, express $T$ as a matrix $\Rep_{B,B}(T).$
\ba Compute $T$ of each basis vector:
\begin{align*}
Te_1&=2=e_1+e_2 \\
Te_2&=0 \\
Te_3&=-4x+1=\frac{3}{2}e_1-\frac{5}{2}e_2\\
Te_4&=2-3x^2=\frac{1}{4}e_1+\frac{1}{4}e_2+\frac{3}{2}e_3\\
Te_5&=2x-4x^3=-3e_1-e_2+4e_4
\end{align*}
Thus, $$\Rep_{B,B}(T)=\begin{pmatrix}
1&0&\frac{3}{2}&\frac{1}{4}&-3\\
1&0&-\frac{5}{2} & \frac{1}{4} & -1 \\
0&0&0&\frac{3}{2} & 0\\
0&0&0&0&-\\
0&0&0&0&0
\end{pmatrix}
$$
\ea
\item Compute the polynomial $T(x^3)$ and compute the following product of a
  matrix with a
  vector: $$\Rep_{B,B}(T)\begin{pmatrix}1\\0\\0\\-1\\0\end{pmatrix}.$$
\ba First, note that $T(x^3)=3x^2$.  Also that
$\Rep_{B}(x^3)=\begin{pmatrix}1\\0\\0\\-1\\0\end{pmatrix}$.  Computing
the product $$\Rep_{B,B}(T)\begin{pmatrix}1\\0\\0\\-1\\0\end{pmatrix}
=\begin{pmatrix}
1&0&\frac{3}{2}&\frac{1}{4}&-3\\
1&0&-\frac{5}{2} & \frac{1}{4} & -1 \\
0&0&0&\frac{3}{2} & 0\\
0&0&0&0&4\\
0&0&0&0&0
\end{pmatrix}\begin{pmatrix}1\\0\\0\\-1\\0\end{pmatrix}
=
\begin{pmatrix}\frac{3}{4}\\ \frac{3}{4}\\-\frac{3}{2}\\0\\0\end{pmatrix}.
$$
Note that the result $\begin{pmatrix}\frac{3}{4}\\
  \frac{3}{4}\\-\frac{3}{2}\\0\\0\end{pmatrix}$ is the vector that
corresponds to $3x^2.$  That is, 
$$\Rep_{B,B}(T)\Rep_B(x^3)=\Rep_{B}(T(x^3)).$$
\ea
\item Let $B'=\{1, t, t^2, t^3, t^4\}$ and compute the matrix
  $\Rep_{B,B'}(T).$  
Here, let $\{1, t, t^2, t^3, t^4\}=\{b_1, b_2, b_3, b_4, b_5\}$ and
express
\begin{align*}
Te_1&=2=2b_1 \\
Te_2&=0 \\
Te_3&=1-4x=b_1-4b_2\\
Te_4&=2-3x^2=2 b_1-3b_3\\
Te_5&=2x-4x^3=2b_2-4b_4
\end{align*}
$$\Rep_{B,B'}(T)=
\begin{pmatrix}
2&0&1&2&0\\
0&0&-4 & 0 & 2 \\
0&0&0&-3 & 0\\
0&0&0&0&-4\\
0&0&0&0&0
\end{pmatrix}
$$
As a consistency check, we compute 
$$\Rep_{B,B'}(T)\begin{pmatrix}1\\0\\0\\-1\\0\end{pmatrix}
=
\begin{pmatrix}
2&0&1&2&0\\
0&0&-4 & 0 & 2 \\
0&0&0&-3 & 0\\
0&0&0&0&-4\\
0&0&0&0&0
\end{pmatrix}
\begin{pmatrix}1\\0\\0\\-1\\0\end{pmatrix}
=
\begin{pmatrix}0\\0\\3\\0\\0\end{pmatrix}
$$
which is the representatative of $3x^2$ in the basis $B'$.  Thus,
$$\Rep_{B,B'}(T)\Rep_B(x^3)=\Rep_{B'}(T(x^3))$$
as expected.
\item Find a basis $B''$ of $V$ so that the matrix $\Rep_{B,B''}(T)$
  is \emph{diagonal} with either $1$ or $0$ on the diagonal.
\ba
Here's one solution.  Let $B''=\{2, x^4, 1-4x, 2-3x^2, 4x^3\}$ then 
$$\Rep_{B,B''}(T)
=
\begin{pmatrix}
1&0&0&0&0\\
0&0&0 & 0 & 0 \\
0&0&1&0 & 0\\
0&0&0&1&0\\
0&0&0&0&1
\end{pmatrix}$$
\ea
\een
\ep

\section*{Composition of linear transformations}

\bp This is a variation of problems 28 and 29 in section 2.8 of the Apostol's book.  Let $V$
be the space of all real polynomials.  Define linear transformations by
\begin{align*}
D:V&\to V    & S:V &\to V & T:V &\to V  \\
p(t)& \mapsto p'(t) & p(t) & \mapsto tp (t)&  p(t) & \mapsto tp' (t)
\end{align*}
\ben
\item Let $p(t)=2+3t-t^2+4t^3$  Determine the image of $p$ under $$D,
  S, T, DT, TD, DS, SD, ST, TS, DT-TD, T^2D^2-D^2T^2.$$
\ba For $SD$ and $DS$, see the part (d) of this problem.  For the
others, here are some computations:
$$Dp=3-2t+12t^2, \quad Sp=2t+3t^2-t^3+4t^4, \quad Tp=3t-2t^2+12t^3.$$
$$DTp=D(3t-2t^2+12t^3)=3-4t+36 t^2, \quad
TDp=T(3-2t+12t^2)=t(-2+24t)=-2t+24t^2$$
$$DSp=D(2t+3t^2-t^3+4t^4)=2+6t-3t^2+16 t^3, \quad
SDp=S(3-2t+12t^2)=3t-2t^2+12t^3.$$
et cetera.
Note that $DT-TD=(3-4t+36 t^2)-(-2t+24t^2)=3-2t+12t^2=Dp.$
For the last one:
\begin{align*}
(T^2D^2-D^2T^2) p&=T^2 D^2 p-D^2 T^2 p \\
&=T^2 p''-D^2 T (t p')\\
&=T (tp''') - D^2 (t (p'+t p''))\\
&=T (tp''') - D^2 (t p'+t^2 p'')\\
&=t (p'''+t^2p'''') - D (p'+tp''+2t p''+t^2 p''')\\
&=t p'''+t^3p'''' -  (p''+p''+tp'''+2 p''+2tp'''+2t p'''+t^3p'''' )\\
&= -4 p'' -4 t p''' 
\end{align*}
So $$(T^2D^2-D^2T^2)(2+3t-t^2+4t^3)= -4(-2+24t)-4t(24)=8-192t.$$
\ea
\item Find the kernel of $T$, $T-\id$, and $DT-2D$.
\ba If $p\in \ker(T)$ then $tp'=0\Rightarrow p'=0\Rightarrow p=c$ for
some constant $c$.  Thus $\ker(T)$ is the space of constant
polynomials.  

If $p\in \ker(T-\id)$ then $tp'-p=0\Rightarrow tp'=p\Rightarrow
p(t)=ct$ for some constant $t$.  Thus, $\ker(T-\id)$ is the one
dimensional subspace of polynomials of the form $ct$ for some constant
$c$; i.e., the span of $\{t\}$.

A quick check reveals that $(DT-2D)(p)=tp''-p'$, so to determine for
which polynomials $p$, we have $(DT-2D)(p)=0$, write
$p(t)=c_0+c_1t+c2_t^2+\cdots +c_n t^n$.  Then 
\begin{align*}tp''(t)-p'(t)&= 2 c_2 t +
6c_3 t^2 + \cdots (n)(n-1) c_n t^{n-1} - \left(c_1+2c_2 t+ 3c_3 t^2 + \cdots +
  n c_n t^{n-1}\right)\\
&=-c_1+3c_2 t^2 + \cdots + (n)(n-2) c_n t^{n-1}
\end{align*}
Setting $tp''(t)-p'(t)=0 \Leftrightarrow c_1=c_3=\cdots = 
c_n=0$.   Thus, the kernel of $DT-2D$ consists of all polynomials of
the form $p(t)=c_0+c_2 t^2$; i.e. the span of $\{1, t^2\}$.

\ea
\item Does $D$ have a left inverse or a right inverse?
\ba Since $D$ has a nontrivial kernel, it does not have a left
inverse.  To see this, let $p$ be the constant polynomial $p(t)=1$.  
For any linear map $F:V \to V$, we have
$$FD(p)=F(0)=0 \neq p$$
and so $FD\neq \id$ for any linear $F:V \to V$.

The map $D$ does have a right inverse.  Here's one:  Let $I:V
\to V$ be defined by $I(p)=\int_0^t p(s) ds.$  Then $$DI(p(t))=D
\int_0^t p(s) ds =p(t).$$
The last equality follows from the fundamental theorem of calculus.
So $DI=\id$ and we see that $I$ is a right inverse of $D$.

The fact that $D$ has a set-theoretic right inverse says that $D$ is
onto; i.e. every polynomial is
the derivative of another polynomial (certainly true --- every
polynomial has many antiderivatives).  However, to say
that $D$ has a right inverse that is a linear transformation says that
an antiderivative for each polynomial can be chosen so the totality of
choices defines a linear map (this is only true 
if we choose the ``constant of integration'' to be zero).
\ea
\item Let $S:V \to V$ be defined by $p(t)\mapsto t p(t)$.  Compute
  $DS-SD$ and, more generally, $DS^n-S^nD$.
\ba $DS(p)=D(t p)=p+tp'$,  $SD(p)=S(p')=tp'$, and 
$(DS-SD)(p)=p+tp'-tp'=p.$  So $DS-SD=\id.$

More generally, $DS^n(p)=t^n p=nt^{n-1}p+t^np'$, $S^nD(p)=S^n(p')=t^np'$,  and
$(DS^n-S^nD)(p)= nt^{n-1}p$. 


\ea
\een
\ep

\section*{Inner products and best approximation}

\bp Let $V$ be the space of polynomials of degree
less than or equal to three and let 
$$\langle p,q \rangle = p(0)q(0)+p'(0)q'(0)+p(1)q(1)+p'(1)q'(1).$$
\ben
\item Prove that $\langle p,q \rangle$ defines an inner product on
  $V$.  In particular, prove that if $\langle p,p\rangle =0$ then
  $p=0$.  \emph{Hint:} first prove the lemma that if $p$ is a
  polynomial and $a$ is a number for which $p(a)=0$ and $p'(a)=0$,
  then there exists a polynomial $q$ so that $p(x)=(x-a)^2 q(x)$.

\ba It's straightforward to check that $\<\, ,\,\>$ as defined is
symmetric and bilinear, and it's clear that as a sum of squares, $\<p,p\>\geq 0 $ for all
$p\in V$.  The one property that's not straightforward to check is
that $\<p,p\>=0$ only for the zero polynomial.  To check this, we
first prove the lemma in the hint.
\begin{lemma*}If $p$ is a
  polynomial and $a$ is a number for which $p(a)=0$ and $p'(a)=0$,
  then there exists a polynomial $q$ so that $p(t)=(t-a)^2 q(t)$.
\end{lemma*}
\begin{proof}First, recall that if
$p$ is any polynomial and $a$ is a number for
which $p(a)=0$, then there exists a polynomial $q$ so that
that $$p(t)=(t-a)q(t).$$  

Now assume that for a particular polynomial $p$ 
we have $p(a)=0$ and
$p'(a)=0$.   Since $p(a)=0$ then there exists a polynomial $q$ 
with $p(t)=(t-a)q(t)$.  Note that $p'(t)=(t-a)q'(t)+q(t)$.
Since $p'(a)=0$ we have 
$0=p'(a)=(a-a)q'(a)+q(a)=q(a).$  Since $q$ is a polynomial 
for which $q(a)=0$, there exists a polynomial $r$ of degree
so that $q(t)=(t-a)r(t)$.  Therefore, $$p(t)=(t-a)^2 r(t).$$
\end{proof}

Now suppose that $\<p,p\>=0$.  Then
$p(0)^2+p'(0)^2+p(1)^2+p'(1)^2=0\Rightarrow p(0)=p'(0)=p(1)=p'(1)=0$.
Since $p(0)=0$ and $p'(0)=0$, we know $p(t)$ is divisible by $t^2$.
  Since $p(1)=p'(1)=0$ we know  $p(t)$ is divisible by $(t-1)^2$.    
The only polynomial of degree less than or
equal to three that's divisible by both $t^2$ and $(t-1)^2$ is zero.

\ea
\item Compute the angle between the polynomials $2t^3-3t^2 $ and $1$.
\ba
A quick computation gives $$\frac{\langle 2x^3-3x^2,1
  \rangle}{\sqrt{\langle 2x^3-3x^2,2x^3-3x^2 \rangle }\sqrt{\langle
    1,1 \rangle}}=-\frac{1}{\sqrt{2}}.$$
So the angle between these two polynomials
is $$\arccos\left(-\frac{1}{\sqrt{2}}\right)=\frac{3\pi}{4}.$$
\ea
\item Use Gram-Schmidt to replace the basis $\{1,t,t^2, t^3\}$ by an
  orthogonormal set.
\ba
There's a lot of computation to do this, the result is
$$\left\{\frac{1}{\sqrt{2}},\frac{2 t-1}{\sqrt{10}},\frac{(t-1) t}{\sqrt{2}},\frac{10 t^3-15 t^2+t+2}{\sqrt{10}}\right\}$$
\ea
\item The following polynomials form a very nice basis for $V$.
\begin{gather*}
e_1=t(t-1)^2 \\
e_2=t^2(t-1) \\
e_3=(2 t+1) (t-1)^2 \\
e_4=t^2(1-2 (t-1)) 
\end{gather*}
Projecting an arbitrary differentiable function $f$ onto $V$ yields 
a linear combination of the basis vectors 
$$a_1e_1+a_2e_2+a_3e_3+a_4e_4.$$
Describe (simply!) the coefficients $a_i$ in terms of the function
$f$.  The simplicity of this description explains why $\{e_1, e_2,
e_3, e_4\}$ is such a nice basis for $V$.
\ba 
In general, for any orthonormal basis $\{e_1, \ldots, e_n\}$ of $V$, 
the projection of an any $f$ onto $V$ is obtained by
$$\proj_V(f)=\sum_{i=1}^n \<f,e_i\> e_i.$$
Now, each term in the sum above $\<f,e_i\>$ is a sum of four products 
$$e_i(0)f(0)+e_i'(0)f'(0)+e_i(1)f'(1)+e_i'(1)f'(1).$$
Now, here's what's so special about the given basis:
\begin{gather*}
e_1'(0)=1 \text{ and }e_1(0)=e_1(1)=e_1'(1)=0\\
e_2'(1)=1 \text{ and }e_2(0)=e_2(1)=e_2'(0)=0\\
e_3(0)=1 \text{ and }e_3(1)=e_3'(0)=e_3'(1)=0\\
e_4(1)=1 \text{ and }e_4(0)=e_4'(0)=e_4'(1)=0\\
\end{gather*}
So, instead of a complicated express for $\<f,e_i\>$, we have simply 
$$\<f,e_1\>=f'(0), \quad \<f,e_2\>=f'(1), \quad \<f,e_3\>=f(0),
\quad \<f,e_4\>=f(1).$$
So, $$\proj_V(f)=f'(0)e_1+f'(1)e_2+f(0)e_3+f(1)e_4.$$
\ea
\een
\ep


\bp 
Each of the pictures below shows a 
polynomial approximation for $\cos(2t).$
Five of them are degree four polynomials obtained by projection onto the subspace
of quartic polynomials, using one of the following
inner products.  
\begin{align*}
\<f,g\>_1&=f(2)g(2)+f'(2)g'(2)+f''(2)g''(2)+f'''(2)g'''(2)\\
 \<f,g\>_2&=\int_0^4 f(t)g(t)dt \\
 \<f,g\>_3&=f(0)g(0)+f(1)g(1)+f(2)g(2)+f(3)g(3)+f(4)g(4)\\
\<f,g\>_4&=f(0)g(0)+f(2)g(2)+f'(2)g'(2)+f''(2)g''(2)+f(4)g(4)\\
\<f,g\>_5&=f(0)g(0)+f'(0)g'(0)+f(2)g(2)+f(4)g(4)+f'(4)g'(4)\\
\end{align*}
The sixth approximation is obtained by ``gluing
together'' two degree two polynomials defined on $[0,2]$ and $[2,4]$,
each determined by projection using, respectively, the inner products
 \begin{align*}
 \<f,g\>_6&=f(0)g(0)+f(2)g(2)+f'(2)g'(2)\\
\<f,g\>_7&=f(2)g(2)+f'(2)g'(2)+f(4)g(4)\\
\end{align*}

\ba The answers are \begin{tabular}{c|c}
5 & 1\\
\hline
2 & 3\\
\hline
6/7 & 4
\end{tabular}


\begin{center}
\includegraphics[scale=0.5]{picture5a.pdf}\qquad
\includegraphics[scale=0.5]{picture3a.pdf}
\end{center}
\begin{center}
\includegraphics[scale=0.5]{picture1a.pdf}\qquad
\includegraphics[scale=0.5]{picture2a.pdf}
\end{center}
\begin{center}
\includegraphics[scale=0.5]{picture6a.pdf}\qquad
\includegraphics[scale=0.5]{picture4a.pdf}
\end{center}

\ea
\ep

\end{document}

