The issue is about defining compact-supported smooth functions over the real semi-axis, such that they are null at the origin. My professor said it can be done in two equivalent ways:
- $f \in {\cal C}^\infty_c\{(0, +\infty)\}$
- $f \in {\cal C}^\infty_c\{[0, +\infty)\},$ such that $f(0)=0$.
Why is it necessary to specify $f(0)=0$ in the 2nd case?
$f \in \mathcal C^\infty_c\{[0, +\infty)\}$ means first of all that the domain of $f$ is $[0,\infty)$. Such an $f$ isn't even defined for inputs below $0$, much less having value $0$ there as you expect.
For example, the function $$f(x) = \begin{cases}e^{1/(x-1)}& x\in [0,1)\\0&x\in[1,\infty)\end{cases}$$
is in $\mathcal C^\infty_c\{[0, +\infty)\}$. I'm sure you are familiar with why it is smooth, and its support is $[0,1]$, which is compact. Clearly, $f(0) = \frac 1e \ne 0$.
Thus you need to specify $f(0) = 0$ if you want this condition to hold.
I'm not sure where your professor was going with those two sets, but let me point that they are not the same, even if we do the obvious continuous extension of the functions in $\mathcal C^\infty_c\{(0, +\infty)\}$ to the domain $[0,\infty)$. This only makes $$\mathcal C^\infty_c\{(0, +\infty)\} \subset \{f \in \mathcal C^\infty_c\{[0, +\infty)\} \mid f(0) = 0 \}$$ There are functions in the right hand set whose restrictions to $(0,\infty)$ are not in $\mathcal C^\infty_c\{(0, +\infty)\}$, such as
$$g(x) = \begin{cases}e^{1/(x^2-x)}& x\in (0,1)\\0&x\in\{0\}\cup[1,\infty)\end{cases}$$ The restriction of $g$ to $(0,\infty)$ has support $(0,1]$, which is not compact.