# can $\cos(x)$ be written as a linear combination of $e^x$ and $e^{-x}$ using the interval $[0,1]$?

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..

-
$\frac{e^x + e^{-x}}{2}$ is the hyperbolic cosine, $\cosh(x)$. –  Kaz Jan 31 '13 at 9:15
Another possible view: If this were to happen, then both can be analytically continued to the entire real line. But then one ($cos$) is periodic, while the other not, unless a=b=0. So this is not true. (I am not so sure of the extension part, though) –  awllower Jan 31 '13 at 10:04
@awllower, that's a sound argument. $ae^x+be^{-x}$ and $\cos x$ are functions defined on all of $\mathbb C$, and if they agree on $[0,1]$, then they are equal by the Identity theorem. –  Carsten Schultz Jan 9 at 22:43

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.
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.