Prove that $f_n\to f$ uniformly does not imply $f_n^2 \to f^2$ uniformly.

I've been searching for a function series $f_n:[0,\infty] -> \mathbb{R}$ such that $(f_n)_{n\geq1}$ uniformly converges to $f$, but $(f^2_n)_{n\geq1}$ does not uniformly converges to $f^2$.

I've tried it with many functions. Does anyone have a hint?

Hint: $$f_n(x) = x-\frac1n{}$$
• That's right. Now, for your given $N\in \Bbb N$, choose $x$ large enough that $\frac{2xN - 1}{N^2} > \epsilon$, and you have disproven uniform convergence. (Some boks require you to find an $x$ such that $\frac{2x(N+1) - 1}{(N+1)^2} > \epsilon$, but they're both very doable.) – Arthur Jul 17 '17 at 11:16
• Well, no, it's not a full solution, as there are a lot of details to type out. But if you're wondering where the idea came form , then that's precicely because $f^2 - f_n^2$ is, in general, roughly $2f$ times larger than $f-f_n$ (as you discovered). You just need an example where that allows you to make the difference arbitrarily large for any $n$, and that means having an $f$ that gets arbitrarily large. Second, $f-\frac1n$ is the standard way of making a non-trivial sequence that converges uniformly to $f$. – Arthur Jul 17 '17 at 11:22
• Yes, exactly. When disproving uniform convergence of a sequence $f_n\to f$, you're free to pick an $\epsilon$ (you've chosen $1$, which is an excellent choice in my opinion, as long as it works with whatever example your working on; some times, when you're not free to choose the function yourself, $\frac12$ or $\frac14$ might be needed), then you're given an arbitrary $N$, and then you get to choose an $x$. If the given quintuple $f,f_n,\epsilon,N,x$ violates the inequality in the definition of uniform convergence, then you've shown that the sequence is not uniformly convergent. – Arthur Jul 17 '17 at 11:41
• The order, and who chooses what (whether you choose or you're given an arbitrary value) is important in order to determine what you're actually showing: Different ways give different results, including proving uniform convergence (arbitrary $\epsilon$, you choose $N$, arbitrary $x$), proving pointwise convergence (arbitrary $\epsilon$, arbitrary $x$, you choose $N$), or disproving pointwise convergence (you choose $\epsilon$, you choose $x$, arbitrary $N$). Note specifically that switching between proving and disproving only swaps which numbers are arbitrary and which ones you get to choose. – Arthur Jul 17 '17 at 11:46