Question: > 
> Show that the sequence of functions $\{f\_n(z)=e^{-(z-n)^2}\}$ converges uniformly on the set $E=D(0,1)$.
> 
> 
> 

$|e^{-(z-n)^2}-0|=|e^{-z^2}.e^{-n^2}.e^{2nz}|\leqslant |e^{-n^2}.e^{2nz}| $

However I do not know how to proceed.

**Questions:**

Is the proof right till the last step? How should I finish the proof?

Thanks in advance!

Answer: 
The $d\left(x,y\right)=0$ proof is correct. For the triangle inequality, I would start out with the right hand side. Notice that

\begin{align\*}
\log\left(1+\left|x-z\right|\right)+\log\left(1+\left|z-y\right|\right)&=\log\left(\left(1+\left|x-z\right|\right)\left(1+\left|z-y\right|\right)\right)\\
&=\log\left(1+\left|x-z\right|+\left|z-y\right|+\left|x-z\right|\left|z-y\right|\right).
\end{align\*}

Recall that for all $a,b>0$, $\log\left(a\right)\ge\log\left(b\right)\iff a\ge b$. By the triangle inequality, $\left|x-y\right|\le\left|x-z\right|+\left|z-y\right|$, and so
\begin{align\*}
1+\left|x-y\right|&\le1+\left|x-z\right|+\left|z-y\right|\\
&\le1+\left|x-z\right|+\left|z-y\right|+\left|x-z\right|\left|z-y\right|.
\end{align\*}

Thus,
\begin{align\*}
d\left(x,y\right)=\log\left(1+\left|x-y\right|\right)&\le\log\left(1+\left|x-z\right|+\left|z-y\right|+\left|x-z\right|\left|z-y\right|\right)\\
&=\log\left(1+\left|x-z\right|\right)+\log\left(1+\left|z-y\right|\right)\\
&=d\left(x,z\right)+d\left(z,y\right).
\end{align\*}
You have the right idea about how to show that $d(x,y)=0$ implies $x=y$.

Hints for the triangle inequality:

* \begin{aligned}d(x,z)+d(z,y)&=\log(1+|x-z|)+\log(1+|z-y|) \\&= \log(1+|x-z|+|z-y|+|x-z||z-y|)
\end{aligned}
* The function $d': \mathbb R \times \mathbb R \to \mathbb R$ given by $d'(x,y)=|x-y|$ is a metric on $\mathbb R$.
* $\log(x)$ is nondecreasing on $[1, \infty)$.