Q:

Why $(\max\{0, x\})^n$ is a differentiable function?

I am reading this post that proves why $\max\{0,x\}$ is not differentiable. But why $(\max\{0, x\})^n$ for $n>1$ is differentiable? 

A:

Let $f_n(x) = max\lbrace 0, x\rbrace^n$ for some $n>1$, and the domain of the function is $\mathbb{R}$.
(edit) i.e. it is the piecewise function:
$$f_n(x) = \cases{0 & x $\leq$ 0 \\ x^n &x > 0}$$
It is clear that $f_n(n)$ is continuous over the domain by construction .
Note that for $x > 0$, the derivative of $f_n(x)$ exists and is $f_n'(x) = nx^{n-1}$.
For $x < 0$, the derivative is trivially 0. All that is left is to verify that the function is differentiable at $x=0$, and we are finished.
By definition, a function $g(x)$ is differentiable at a point $x_0$ if the limit $\lim_{x_n \rightarrow x_0} \frac{g(x_n - x_0) - g(x_0)}{x_n - x_0}$ exists. An equivalent definition is $\lim_{x_n \rightarrow x_0^+} \frac{g(x_n - x_0) - g(x_0)}{x_n - x_0} = \lim_{x_n \rightarrow x_0^-} \frac{g(x_n - x_0) - g(x_0)}{x_n - x_0}$ (i.e. the limit approaching from the left is equal to the limit approaching from the right).
You can show that the left-hand and right-hand limit are both equal to 0 directly.
(edit for clarification) If the derivative exists for a function g(x) for some point $x_0$, then the left hand limit and right hand limit at that point are equal to the derivative $g'(x_0)$.
Since the derivative of $x^n$ at $0$ (for $n > 1$) is 0 always, the right-hand limit is of our derivative is 0. Similarly, since the derivative of $0$ is $0$, the left-hand limit is 0.
Thus, the right-hand and left-hand limits are equal, which means the derivative exists at that point. With that, we have shown that the derivative exists for every point in $\mathbb{R}$.

