TITLE: can $\cos(x)$ be written as a linear combination of $e^x$ and $e^{-x}$ using the interval $[0,1]$?
QUESTION [7 upvotes]: Consider $C[0,1]$: the vector space of all continuous functions on the interval $[0,1]$.  Let $S$ be a subspace of $C[0,1]$ where $S =$ the span of $\{e^x, e^{-x}\}$
does the following function: $\cos(x)$ belong to $S$?  In other words, can $\cos(x)$ be rewritten as a linear combination of $e^x$ and $e^{-x}$ when working with the interval $[0,1]$?
My intuition is yes, since these functions arent discontinuous, there will always be some real numbers a and b such that satisfy the following equation:
$a\cdot e^x + b\cdot e^{-x} = \cos(x)$ for all $x$ in $[0,1]$.  I just dont know how to prove that..

REPLY [22 votes]: You cannot.
Suppose $f(x) = a e^x + be^{-x}$ for some $a,b$ and $f=\cos$ on $[0,1]$. Then the derivatives would match too, which would give $f'=-\sin$, $f'' = -\cos$. However $f'' = f$, so this cannot be true.

REPLY [10 votes]: No. In order for $\cos x$ to lie in $\mathrm{span}\{e^x,e^{-x}\}$ we would need to have some fixed $a,b\in \mathbb R$ such that $\cos x = ae^x+be^{-x}$ for all $x\in [0,1]$. Plugging in $x=0,\pi/4,\pi/6$ gives us
$$\begin{align}
1 &= a + b\\
\frac{\sqrt 2}{2} &= e^{\pi/4}a+e^{-\pi/4}b\\
\frac{\sqrt 3}{2} &= e^{\pi/6}a+e^{-\pi/6}b\\
\end{align}$$
and a simple numerical check shows that these are inconsistent.