A counterexample of Riesz Representation Theorem? I am working on the exercise 6.B.15 from Axler's book: Linear Algebra Done Right. This problem states that the Riesz Representation Theorem may fail on an infinite-dimensional vector space:


*Suppose $C_R([-1,1])$ is the vector space of continuous real-valued functions on the interval $[-1,1]$ with inner product given by:

$$\left<f,g \right> = \int_{-1}^{1}f(x)g(x)dx$$
for $f, g \in C_R[-1,1]$. Let $\varphi$ be the linear functional on $C_R[-1,1]$ defined by $\varphi(f)=f(0)$. Show that there does not exist $g \in C_R[-1,1]$ such that
$$
\varphi(f)= \left< f, g \right>
$$
for every $f \in C_R[-1,1]$.
My argument is that I came up with two special sequences of functions in $C_R[-1,1]$, and proved a contradiction:
Consider $f_{n}, h_{n} \subset C_{\mathbb{R}}[-1,1]$, defined by
$$
    f_{n}(x)=
\begin{cases}
    1, ~ x \in [0,1] \\
    n x + 1, ~  x \in [-\frac{1}{n},0] \\
    0, ~  x \in [-1,-\frac{1}{n}]
\end{cases}
$$
and
$$
    h_{n}(x)=
\begin{cases}
    1, ~ x \in [-1,0] \\
    -n x + 1, ~  x \in [0,\frac{1}{n}] \\
    1, ~  x \in [\frac{1}{n},1]
\end{cases}
$$
Then
$$ f_n \to f $$ and $$h_n \to h$$ where $f = 0$ on $[-1,0]$, $f = 1$ on $[0,1]$, while $h = 0$ on $[0,1]$ and $h=1$ on $[-1,0]$.
Then for any $n \in \mathbb{N}$,  we have $\varphi(f_{n}) = f_{n}(0) = 1$ and $\varphi(h_{n}) = h_{n}(x) = 1$.
For any constant function $T_{m}(x) = m \neq  0$ on $[-1,1]$, $\varphi(T_{m}) = \left< T_{m}, g \right> = T_{m}(0)= m = \int_{-1}^{1}m g(x)\,\mathrm{d}x$. As a result, then $$
    \int_{-1}^{1}g(x)\,\mathrm{d}x = 1.
$$
It implies that $g \in L^{1}[-1,1]$. So $\left\vert f_{n} g \right\vert \leqslant \left\vert g \right\vert $ and $\left\vert  h_{n} g \right\vert  \leqslant \left\vert g \right\vert $. By the LDCT,
\begin{align*}
    \lim_{n    \to \infty} \int_{-1}^{1}f_{n}(x)g(x)\,\mathrm{d}x = 1 = \int_{-1}^{1}f(x)g(x)\,\mathrm{d}x = \int_{0}^{1}g(x)\,\mathrm{d}x.
\end{align*}
The same argument applies to $h_{n}$, then we have $$
    \int_{-1}^{0}g(x)\,\mathrm{d}x = 1
$$
and then $$
    \int_{-1}^{1}g(x)\,\mathrm{d}x = \int_{-1}^{0}g(x)\,\mathrm{d}x + \int_{0}^{1}g(x)\,\mathrm{d}x = 2
$$
which contradicts with $\int_{-1}^1 g(x) dx = 1.$
My question is, if this argument is legitimate, why such contradiction could arise? Is it because the inner product space is not Hilbert?

You can simplify the argument a bit by letting $f_n(x)= (1-|x|)^n.$ Then $f_n(0)=1$ for all $n.$
Let $g\in C_{\mathbb R}[-1,1].$ Set $M=\max_{[-1,1]}|g|.$ Then
$$|\int_{-1}^1 f_n(x) g(x)\,dx | \le \int_{-1}^1 |f_n(x) g(x)|\,dx$$ $$ \le M \int_{-1}^1 f_n (x)\,dx =2M\int_0^1(1-x)^n\,dx = \frac{2M}{n+1}\to 0.$$
Thus no $g\in C_{\mathbb R}[-1,1]$ can represent $\varphi$ via the inner product.
