[step:Compute the expectation and show the bias vanishes]For each $n\in\mathbb N$ and $i\in\{1,\dots,n\}$, define the [random variable](/page/Random%20Variable) $Y_{n,i}:\Omega\to\mathbb R$ by
\begin{align*}
Y_{n,i}(\omega)=\frac{1}{h_n}K\left(\frac{x-X_i(\omega)}{h_n}\right).
\end{align*}
Then
\begin{align*}
\hat f_{n,h_n}(x)=\frac{1}{n}\sum_{i=1}^n Y_{n,i}.
\end{align*}
Since $K$ is bounded and compactly supported, $K\in L^1(\mathbb R)$, and the kernel normalization hypothesis gives
\begin{align*}
\int_{\mathbb R}K(u)\,d\mathcal L^1(u)=1.
\end{align*}
For fixed $n$ and $i$, the map $y\mapsto h_n^{-1}K((x-y)/h_n)$ is bounded and supported in the compact set $x-h_n\operatorname{supp}K$. Since $f\in L^1(\mathbb R)$, the product $y\mapsto h_n^{-1}K((x-y)/h_n)f(y)$ is integrable with respect to $\mathcal L^1$.
Because $X_i$ has density $f$ with respect to $\mathcal L^1$,
\begin{align*}
\mathbb E[Y_{n,i}]=\int_{\mathbb R}\frac{1}{h_n}K\left(\frac{x-y}{h_n}\right)f(y)\,d\mathcal L^1(y).
\end{align*}
Use the change of variables formula with $u=(x-y)/h_n$, equivalently $y=x-h_nu$, under which $d\mathcal L^1(y)=h_n\,d\mathcal L^1(u)$. The domain $\mathbb R$ is mapped onto $\mathbb R$, and the integrability verified above justifies the substitution. Since the $Y_{n,i}$ have the same expectation, $\mathbb E[\hat f_{n,h_n}(x)]=\mathbb E[Y_{n,1}]$, and hence
\begin{align*}
\mathbb E[\hat f_{n,h_n}(x)]=\int_{\mathbb R}K(u)f(x-h_nu)\,d\mathcal L^1(u).
\end{align*}
Therefore, using $\int_{\mathbb R}K(u)\,d\mathcal L^1(u)=1$,
\begin{align*}
\mathbb E[\hat f_{n,h_n}(x)]-f(x)
=\int_{\mathbb R}K(u)\bigl(f(x-h_nu)-f(x)\bigr)\,d\mathcal L^1(u).
\end{align*}
Let $R>0$ be such that $\operatorname{supp}K\subset[-R,R]$. Since $f$ is continuous at $x$, for every $\varepsilon>0$ there exists $\delta>0$ such that $|f(z)-f(x)|<\varepsilon/(1+\|K\|_{L^1})$ whenever $|z-x|<\delta$. Choose $N\in\mathbb N$ such that $h_nR<\delta$ for all $n\ge N$. Then for $n\ge N$ and $u\in\operatorname{supp}K$,
\begin{align*}
|x-h_nu-x|=h_n|u|\le h_nR<\delta.
\end{align*}
Hence the triangle inequality for the [Lebesgue integral](/page/Lebesgue%20Integral) gives
\begin{align*}
\left|\mathbb E[\hat f_{n,h_n}(x)]-f(x)\right|\le \int_{\mathbb R}|K(u)|\,|f(x-h_nu)-f(x)|\,d\mathcal L^1(u).
\end{align*}
The continuity bound on $\operatorname{supp}K$ then gives
\begin{align*}
\int_{\mathbb R}|K(u)|\,|f(x-h_nu)-f(x)|\,d\mathcal L^1(u)\le \frac{\varepsilon}{1+\|K\|_{L^1}}\int_{\mathbb R}|K(u)|\,d\mathcal L^1(u).
\end{align*}
Since $\int_{\mathbb R}|K(u)|\,d\mathcal L^1(u)=\|K\|_{L^1}$, this upper bound is at most $\varepsilon$.
Thus
\begin{align*}
\mathbb E[\hat f_{n,h_n}(x)]\to f(x).
\end{align*}[/step]