My book introduces $\mathbf{C}^{\infty}$ as subspace of $F(\mathbb{R},\mathbb{R})$ that consists of 'smooth' functions, that is, functions that are differentiable infinitely many times. It then asks me to tell whether or not $\mathbf{C}^{0}$=$(f\in(\mathbb{R},\mathbb{R})$ such that $f$ is continuous$)$ is a subspace. Is $\mathbf{C}^{0}$ a collection of undiffirentiable (because of 0 as opposed to $\infty$) functions that are continuous? Does it have any elements then? Thanks a lot for clarifying the confusion!
Meaning of $\mathbf{C}^{0}$?
1 Answers
Typically, $C^{0}(\Omega)$ denotes the space of functions which are continuous over $\Omega$. The higher derivatives may or may not exist.
$C^{\infty}(\Omega) \subset C^{0}(\Omega)$ since if the function is infinitely "smooth" it has to continuous.
Typically, people use the notation $C^{(n)}(\Omega)$ where $n \in \mathbb{N}$.
$f(x) \in C^{(n)}(\Omega)$, means that $f(x)$ has $n$ derivatives in the entire domain ($\Omega$ denotes the domain of the function) and the $n^{th}$ derivative of $f(x)$ is continuous i.e. $f^{n}(x)$ is continuous.
By convention, $f(x) \in C^{(0)}(\Omega)$ denotes the space of continuous functions.
$f(x) \in C^{(\infty)}(\Omega)$ if the function is differentiable any number of times. For instance, $e^{x} \in C^{(\infty)}(\mathbb{R})$
An example to illustrate is to consider the following function $f: \mathbb{R} \rightarrow \mathbb{R}$.
$f(x) = 0, x \leq 0$,
$f(x) = x^2, x>0$
This function is in $C^{(1)}(\mathbb{R})$ but not in $C^{(2)}(\mathbb{R})$
Also, when the domain of the function is the largest set over which the function definition makes sense, then we omit $\Omega$ and write that $f \in C^{(n)}$ the domain being understood as the largest set over which the function definition makes sense. Also, note the obvious embedding $C^{(n)} \subseteq C^{(m)}$ whenever $n>m$.
For "most" functions, if a function is differentiable $n$ times it is $C^{(n)}$. However, there are functions for which the derivative might exist but the derivative is not continuous. Some people might argue that the ramp function has derivative but the derivative is not continuous. It is incorrect.
$f(x) = 0$, when $x<0$
and
$f(x) = x$ when $x \geq 0$
Note that the derivative doesn't even exist at $x=0$. So the ramp function is not even differentiable in the first place.
Let us take a look at the function $f(x) = x^2 \sin(\frac{1}{x})$.
The first question is "Is the function even in $C^{(0)}$"?
The answer is not yet since the function is ill-defined at the origin. However if we define $f(0) = 0$, then yes the function is in $C^0$. This can be seen from the fact that $\sin(\frac{1}{x})$ is bounded and hence the function is bounded above by $x^2$ and below by $-x^2$. So as we go towards $0$, the function is bounded by functions which themselves tend to $0$. And the limit is $0$ and thereby the function is continuous.
Now, the next question "Is the function differentiable everywhere?"
It is obvious that the function is differentiable everywhere except at $0$. At $0$, we need to pay little attention. If we were to blindly differentiate $f(x)$ using the conventional formulas, we get g(x) = f'(x) = 2x \sin(\frac{1}{x}) + x^2 \times \frac{-1}{x^2} \cos(\frac{1}{x}).
Now $g(x)$ is ill-defined for $x=0$. Further $\displaystyle \lim_{x \rightarrow 0} g(x)$ doesn't exist. This is what we get if we use the formula. So can we say that $f(x)$ is not differentiable at the origin. Well no! All we can say is $g(x)$ is discontinuous at $x=0$.
So what about the derivative at $x=0$? Well as I always prefer to do, get back to the definition of f'(0).
f'(0) = \displaystyle \lim_{\epsilon \rightarrow 0} \frac{f(\epsilon) - f(0)}{\epsilon} = \displaystyle \lim_{\epsilon \rightarrow 0} \frac{\epsilon^2 \sin(\frac{1}{\epsilon})}{\epsilon} = \displaystyle \lim_{\epsilon \rightarrow 0} \epsilon \sin(\frac{1}{\epsilon}) = 0.
(Since $|\sin(\frac{1}{\epsilon})| \leq 1$ so it is bounded).
So we find that the function $f(x)$ has a derivative at the origin whereas the function g(x) = f'(x), $\forall x \neq 0$ is not continuous or even well-defined at the origin.
So we have this function whose derivative exists everywhere but then $f(x) \notin C^{(1)}$ since the derivative is not continuous at the origin.