How to prove that a function is differentiable everywhere? The function I come up  with is:
$f(x)= -5x$
and I think this function can be differentiated everywhere because the domain is $\mathbb R$ right?
$f'(x) = -5$ which is constant, but my question is that how can I use theorem to prove my answer.
 A: To show that $f$ is differentiable at all $x \in \Bbb R$, we must show that $f'(x)$ exists at all $x \in \Bbb R$.
Recall that $f$ is differentiable at $x$ if $\lim\limits_{h \to 0} \frac{f(x+h)-f(x)}{h}$ exists.
So for $f(x)=-5x$, we examine
$$\lim\limits_{h \to 0} \frac{-5(x+h)- (-5x)}{h} = \lim\limits_{h \to 0} \frac{-5h}{h} = \lim\limits_{h \to 0}{-5} = -5$$
And so we see that $f$ is differentiable at all $x \in \Bbb R$ with derivative $f'(x)= -5$.

We could also say that if $g(x)$ and $h(x)$ are differentiable, then so too is $f(x) = g(x) h(x)$ and that $f'(x) = g'(x) h(x) + g(x) h'(x)$. Then let $g(x) = x, \; h(x) = -5$, noting that both are differentiable with derivates $1$ and $0$ respectively, leading to the same result.
A: Since we need to prove that the function is differentiable everywhere, in other words, we are proving that the derivative of the function is defined everywhere.
In the given function, the derivative, as you have said, is a constant (-5). This constant is independent of the value of x.
In other words, the derivative of the function remains the same, regardless of what real value you assign to the variable x. This implies that the derivative certainly exists for all real values of x.
Note: The derivative of the function need not be constant (as it was in this case), for the function to be differentiable. The only condition is: the derivative should be defined in the interval where the function is differentiable.
