$$\max_{x\in [0, 1] \cup \mathbb{N}} xe^{-x^2}$$
So I thought: $[0, 1]$ is compact, hence Weiestrass Theorem holds. $\mathbb{N}$ is not compact instead.
$$f'(x) = e^{-x^2}(1-2x^2)$$
So the zeros are $x = \pm \dfrac{1}{\sqrt{2}}$ and I have to trash the negative one.
Now
$$f(0) = 0$$ $$f(1) = 1/e$$ $$f(1/\sqrt{2}) = \frac{1}{\sqrt{2e}}$$
I would say the minimum occurrs at $x = 1/\sqrt{2}$ but I really cannot understand how to treat the $\mathbb{N}$ part.
I mean I know that as $n\to +\infty,\ f(n) \to 0$ but this doesn't help me.
Also I was wondering: does the function has a minimum too? Is there a non empty subset of $\mathbb{R}$ in which the function has no absolute maximum?
Notice that $f'\left(x\right) \leq 0$ for $x \geq \frac{1}{\sqrt{2}}$, so the function is non-increasing in the interval $\left[\frac{1}{\sqrt{2}}, +\infty)\right]$, since $\mathbb{N}$ is in this interval, the maximum will be at the point $x = \frac{1}{\sqrt{2}}$.