Q:

Show that $\lim_{t\to \infty}u(x,t)=\frac{A+B}{2}$, for each $x\in\Bbb R$.

Let $u(x,t)$ be a $C^2$ bounded solution of $$u_t(x,t)-u_{xx}(x,t)=0,x\in \Bbb R, u(x,0)=f(x)$$ where $f\in C(\Bbb R)$ satisfies: $\lim_{x\to+\infty}f(x)=A,\lim_{x\to-\infty}f(x)=B$. Show that $\lim_{t\to \infty}u(x,t)=\frac{A+B}{2}$, for each $x\in\Bbb R$.

My attempt:
I try to use the integral representation for the solution of heat equation (here is one dimensional $n=1$) $$u(x,t)=\int_{\Bbb R}\frac{1}{\sqrt {4\pi t}}e^{-\frac{|x-y|^2}{4t}}f(y)dy$$ Then $\lim_{t\to\infty}u(x,t)=\lim_{t\to\infty}\int_{\Bbb R}\frac{1}{\sqrt {4\pi t}}e^{-\frac{|x-y|^2}{4t}}f(y)dy$.
Then I got stuck. Could anyone kindly help? Thanks!

A:

First we prove that for $z > x$,
$$\lim_{t \to \infty} \int_z^\infty \frac{1}{\sqrt {4\pi t}}e^{-\frac{|x-y|^2}{4t}}dy = \frac{1}{2}$$
To see this, let $u = y - x$, then by change of variables
$$\int_z^\infty \frac{1}{\sqrt {4\pi t}}e^{-\frac{|x-y|^2}{4t}}dy = \int_{z - x}^\infty \frac{1}{\sqrt {4\pi t}}e^{-\frac{u^2}{4t}}du$$
Taking limits:
$$\lim_{t \to \infty}\int_z^\infty \frac{1}{\sqrt {4\pi t}}e^{-\frac{|x-y|^2}{4t}}dy = \lim_{t \to \infty}\int_{z - x}^\infty \frac{1}{\sqrt {4\pi t}}e^{-\frac{u^2}{4t}}du = \frac{1}{2}$$
The final $1/2$ comes from observing that the above expression is $\lim_{t \to \infty} P(X_t \geq z - x)$ where $P$ is probability and $X_t$ is a normal distribution with variance $2t$.  By a similar calculation, for $z < x$:
$$\lim_{t \to \infty} \int_{-\infty}^z \frac{1}{\sqrt {4\pi t}}e^{-\frac{|x-y|^2}{4t}}dy = \frac{1}{2}$$
Now fix $\epsilon > 0$ and choose $x_R$ such that for all $y \geq x_R$,
$$A - \epsilon \leq f(y) \leq A + \epsilon$$
Then,
\begin{eqnarray*}
\lim_{t \to \infty} \int_x^\infty \frac{1}{\sqrt {4\pi t}}e^{-\frac{|x-y|^2}{4t}}f(y)dy &=& 
\lim_{t \to \infty} \int_x^{x_R} \frac{1}{\sqrt {4\pi t}}e^{-\frac{|x-y|^2}{4t}}f(y)dy + \lim_{t \to \infty} \int_{x_R}^\infty \frac{1}{\sqrt {4\pi t}}e^{-\frac{|x-y|^2}{4t}}f(y)dy \\
&\leq& 
0 + \frac{A + \epsilon}{2} \\
\end{eqnarray*}
The limit of the first integral is zero because $f$ is continuous so it attains a maximum/minimum on the compact interval $[x, x_R]$, and the integrand goes to zero as $t \to \infty$.
We can perform the same calculation for the lower bound $f(y) \geq A - \epsilon$ to obtain:
$$\frac{A - \epsilon}{2} \leq \lim_{t \to \infty} \int_x^\infty \frac{1}{\sqrt {4\pi t}}e^{-\frac{|x-y|^2}{4t}}f(y)dy \leq \frac{A + \epsilon}{2}$$
Since this holds for all $\epsilon > 0$ we have obtained the $A/2$ limit.  Similar considerations will produce the $B/2$ limit for the left hand side.  Combining everything together we see:
$$\lim_{t \to \infty} u(x, t) = \lim_{t \to \infty} \int_{-\infty}^\infty
\frac{1}{\sqrt {4\pi t}}e^{-\frac{|x-y|^2}{4t}}f(y)dy = \lim_{t \to \infty} \int_{-\infty}^x
 \frac{1}{\sqrt {4\pi t}}e^{-\frac{|x-y|^2}{4t}}f(y)dy 
+ $$
$$\lim_{t \to \infty} \int_x^\infty
 \frac{1}{\sqrt {4\pi t}}e^{-\frac{|x-y|^2}{4t}}f(y)dy 
= \frac{A}{2} + \frac{B}{2}$$

