Can I apply power rule to the derivative of constant function? I just saw someone trying to show $\frac{d f(x)}{d x}=\frac{d k}{d x}=0$ by arguing that
$$f(x)=k=k\cdot x^0;$$ thus, according to the power rule, $f'(x)=0\cdot k x^{-1}=0.$  I wonder if this is mathematically valid in terms of general application of the power rule. In other words, can I apply the power rule even to constant functions?
 A: Whether you can use the power rule (or any other rule) depends on what assumptions you made when you proved that rule.
It's likely that you first saw a proof for positive integers.
It's true for negative integers too, but the proof is not the same.
It's true for arbitrary positive real exponents too, with yet another proof.
I would hope that you saw the proof that the derivative of a constant function is $0$ when your first learned about derivatives.
A: It is wrong & invalid & misuse .... but harmless.
In Mathematics , the Correct Process will always give the Correct Conclusion , while the wrong Process , which will generally give the wrong Conclusion , might "Occasionally" give the Correct Conclusion by co-incidence.
Eg 1 : $16/64$ : Cancel the $6$ in the Numerator with the $6$ on the Denominator to get $1/4$ which is Correct by co-incidence.
Eg 2 : Power rule for integration , where we get wrong Conclusion :
$\int{x^n}dx=x^{n+1}/(n+1)+C$
Let $n=-1$ , $\int{x^{-1}}dx=x^{-1+1}/(-1+1)=x^0/0=????$
We know that Power rule will not work on $\int{x^{-1}}dx$
Power rule for Differentiation :
Now , coming to the $dk/dx$ , we should "Ideally" not use Power rule , even though we get the Correct Conclusion by co-incidence.
The Power rule can be Proved by taking "Binomial Expansion" , where $n=0$ will not work.
It so happens that we get $dk/dx=0$ , where we can make it "$0 \times \text{whatever}$" , hence we can try to make it match the Power rule , to use that "Same" Power rule over all $n$.
In that case , whether we "call" it Power rule or Constant Derivative , we get $0$ , hence that is harmless.
The Power rule will break when we generalize more $d^m (x^n) /dx^m$ to then take $m=2n$ ....
$d^m (x^n) /dx^m=[n!/(n-m)!]x^{n-m}$
With $n=3$ , $m=6$ , we get :
$U=d^6 (x^3) /dx^6=[3!/(3-6)!]x^{3-6}$
$U=d^6 (x^3) /dx^6=[3!/(-3)!]x^{-3}$
With $n=1$ , $m=2$ , we get :
$V=d^2 (x^1) /dx^2=[1!/(1-2)!]x^{1-2}$
$V=d^2 (x^1) /dx^2=[1!/(-1)!]x^{-1}$
We get wrong Conclusion that $V/U=Kx^2$ is quadratic , which happens because we did not check that Constant Derivatives are involved here.
A: It depends: over what domain are you considering $x^n$? For example, for positive $n$ we have
$$\lim_{h\to 0}\frac{(x+h)^n-x^n}{h}=\lim_{h\to 0}\frac{\sum_{k=0}^n\binom{n}{k}x^kh^{n-k}-x^n}{h}$$
$$=\lim_{h\to 0}\left[\sum_{k=0}^{n-1}\binom{n}{k}x^kh^{n-k-1}\right]=\lim_{h\to 0}\left[\binom{n}{n-1}x^{n-1}+h\sum_{k=0}^{n-2}\binom{n}{k}x^kh^{n-k-2}\right]$$
$$=\binom{n}{n-1}x^{n-1}=nx^{n-1}$$
This formula works for all $x\in\mathbb{R}$. For $n=0$ and $x\neq 0$ we have
$$\lim_{h\to 0}\frac{(x+h)^0-x^0}{h}=\lim_{h\to 0}\frac{0}{h}=0$$
For negative $n$ and $x\neq 0$ we can use the rule for derivatives of a fraction to get
$$\frac{d}{dx}x^{-n}=\frac{d}{dx}\frac{1}{x^n}=\frac{x^{n}\frac{d}{dx}1-1\frac{d}{dx}x^{n}}{x^{2n}}=\frac{-nx^{n-1}}{x^{2n}}=-nx^{-n-1}$$
Now, what happens at $x=0$ for $n\leq 0$? Its not to hard to show that
$$f(x)=x^0\text{ for }x\in\mathbb{R}/\{0\}$$
can be 'filled in' to form a function $g(x)=1$ for all $x\in\mathbb{R}$. What we mean by 'filled in' is that $f(x)=g(x)$ for all $x\in\mathbb{R}/\{0\}$ and that $g(x)$ is continuous. Thus, it is reasonable to say that for all $x\in\mathbb{R}$ we have
$$\frac{d}{dx}x^0=\frac{d}{dx}1=0$$
And for negative $n$ you can easily show that
$$\lim_{x\to 0}x^{n}\text{ DNE}$$
so the same logic does not apply.
In conclusion: It is not correct to say that
$$\frac{d}{dx} x^0=0x^{-1}=0$$
since $0^0$ is undefined. HOWEVER once can reasonably say that
$$f(x)=x^0=1\text{ for }x\in\mathbb{R}/\{0\}$$
$$f'(x)=0\text{ for }x\in\mathbb{R}/\{0\}$$
and that
$$g(x)=1\text{ for }x\in\mathbb{R}$$
$$g'(x)=0\text{ for }x\in\mathbb{R}$$
Then
$$g(x)=f(x)\text{ for }x\in\mathbb{R}/\{0\}$$
$$g'(x)=f'(x)\text{ for }x\in\mathbb{R}/\{0\}$$
and both $g(x)$ and $g'(x)$ are continuous on the real numbers.
