the problem no. 11 of exercise 11 in bachman and narici's book on functional analysis let us consider the space $C[a,b]$ with supnorm. let $g$ be a fixed element in $C[a,b]$. let us now define a mapping
$$
\lambda_g(f)=\int_{a}^{b}f(x)g(x)dx.
$$
Show that $\lambda_g$ is a bounded linear functional on $C[a,b]$. Further find $||\lambda_g||$.
Now i can show the boundedness of $\lambda_g$.
Infact,
$$
\begin{align*} 
|\lambda_g(f)| &=|\int_{a}^{b}f(x)g(x)dx|\\
& \leq \int_{a}^{b}|f(x)g(x)|dx\\
& \leq \int_{a}^{b}|f(x)||g(x)|dx\\
& \leq \int_{a}^{b} (max_{x\in [a,b]}|f(x)|)|g(x)|dx\\
&=||f||\int_{a}^{b}|g(x)|dx
\end{align*}$$
Taking $\int_{a}^{b}|g(x)|dx=k$ we see that,
$$
|\lambda_g(f)|\leq k||f||
$$
So the functional is bounded.
To find the norm of $\lambda_g$
we notice that,$|\lambda_g(f)|\leq ||f||\int_{a}^{b}|g(x)|dx$.
So taking supremum on all $f$ with $||f||=1$ we have
$$
||\lambda_g||\leq \int_{a}^{b}|g(x)|dx
$$
For the otherside inclusion i am clueless.
please anyone help me out. thanks.
 A: If you are allowed to use Lebesgue's theory, then the matter is not that difficult:
Let us write
\begin{align*}
\int_{a}^{b}f(x)g(x)dx=\int_{-\infty}^{\infty}\chi_{[a,b]}(x)f(x)g(x)dx.
\end{align*}
and extend $f,g$ to the whole $\mathbb{R}$ by setting $f(x)=g(x)=0$ for $x\notin[a,b]$.
Consider the $\rm sgn$ function defined by ${\rm sgn}(g)(x)=1$ if $g(x)\geq 0$ and ${\rm sgn}(g)(x)=-1$ if $g(x)<0$. Note that ${\rm sgn}(g)(x)\cdot g(x)=|g(x)|$ for all $x$.
Consider the standard mollification $\{\varphi_{\varepsilon}\ast{\rm sgn}(g)\}_{\varepsilon>0}$ of ${\rm sgn}(g)$. Note that $\varphi_{\varepsilon}\ast{\rm sgn}(g)\in C(\mathbb{R})$ and that
\begin{align*}
\sup_{x\in[a,b]}|\varphi_{\varepsilon}\ast{\rm sgn}(g)(x)-g(x)|\rightarrow 0,\quad\varepsilon\rightarrow 0.
\end{align*}
Also note that
\begin{align*}
\sup_{x\in\mathbb{R}}|\varphi_{\varepsilon}\ast{\rm sgn}(g)(x)|\leq\|\varphi_{\varepsilon}\|_{L^{1}(\mathbb{R})}=1.
\end{align*}
Now we have
\begin{align*}
&\|\lambda_{g}\|\\
&\geq\left|\lambda_{g}(\varphi_{\varepsilon}\ast{\rm sgn}(g))\right|=\left|\int_{\mathbb{R}}\varphi_{\varepsilon}\ast{\rm sgn}(g)(x)g(x)dx\right|\rightarrow\left|\int_{\mathbb{R}}{\rm sgn}(g)(x)g(x)dx\right|=\int_{\mathbb{R}}|g(x)|dx
\end{align*}
which yields
\begin{align*}
\|\lambda_{g}\|=\int_{\mathbb{R}}|g(x)|dx=\int_{a}^{b}|g(x)|dx.
\end{align*}
A: Here's another solution, which is by no means easier than the other one:
Fix an $n\in\mathbb{N}$. Consider the compact set
\begin{align*}
K_{n}=\left\{x\in[a,b]:g(x)\geq\frac{1}{n}\right\},
\end{align*}
then one may construct a $\varphi_{n}\in C[a,b]$ such that $0\leq\varphi_{n}\leq 1$, $\varphi_{n}=1$ on $K_{n}$ and $\varphi_{n}=0$ on $[a,b]\setminus K_{n+1}$, see here.
Similarly, one can construct $\psi_{n}\in C[a,b]$, $-1\leq\psi_{n}\leq 0$, $\psi_{n}=-1$ on $\{x\in[a,b]:g(x)\leq-1/n\}$ and $\psi_{n}=0$ on $[a,b]\setminus\{x\in[a,b]:g(x)\leq-1/(n+1)\}$.
Note that $\varphi_{n},\psi_{n}$ have disjoint support and
\begin{align*}
\sup_{x\in[a,b]}|\varphi_{n}(x)+\psi_{n}(x)|=1.
\end{align*}
Now we have
\begin{align*}
\|\lambda_{g}\|&\geq|\lambda_{g}(\varphi_{n}+\psi_{n})|\\
&=\left|\int_{\{g\geq 0\}}(\varphi_{n}+\psi_{n})(x)g(x)dx+\int_{\{g<0\}}(\varphi_{n}+\psi_{n})(x)g(x)dx\right|\\
&=\left|\int_{\{g\geq 0\}}\varphi_{n}(x)g(x)dx+\int_{\{g<0\}}\psi_{n}(x)g(x)dx\right|.
\end{align*}
Taking $n\rightarrow\infty$ yields
\begin{align*}
\|\lambda_{g}\|\geq\left|\int_{\{g\geq 0\}}g(x)dx+\int_{\{g<0\}}-g(x)dx\right|=\int_{a}^{b}|g(x)|dx.
\end{align*}
