I'm considering the question: "If $f_n:[0,1] \rightarrow \mathbb{R}$ is a sequence of functions that converges uniformly to $f:[0,1] \rightarrow \mathbb{R}$, does $f_n^2$ converge uniformly to $f^2$ on $[0,1]$?"
From the examples I've come up with, I can certainly conclude that the answer is no, but I've noticed that the above does seem to hold if in addition we require that $f_n$ is a sequence of continuous functions.
For example, if $f_n(x) = \frac{x}{nx+1}$, then $f_n(x)$ converges uniformly to $f(x) = 0$, and $[f_n(x)]^2$ converges to $[f(x)]^2$ (also 0).
Am I correct in attributing this to continuity? If so, how would I go about proving this formally without specifically defining $f_n(x)$?
Thanks in advance.
If all $f_n$ are continuous, $f$ is continuous, hence there is $M \ge 0$ such that $|f(x)| \le M$ for all $x \in I$, where $I=[0,1]$.
There is $N \in \mathbb N$ such that $|f_n(x)-f(x)| \le 1$ for all $n>N$ and all $x \in I$, hence $|f_n(x)| =|f_n(x)-f(x)+f(x)| \le 1+M$ for all $n>N$ and all $x \in I$.
We get:
$|f_n(x)^2-f(x)^2|=|f_n(x)-f(x)| \cdot |f_n(x)+f(x)| \le |f_n(x)-f(x)| \cdot(|f_n(x)|+|f(x)| \le |f_n(x)-f(x)| \cdot(1+2M)$
for all $n>N$ and all $x \in I$.
Can you proceed ?