How do I find the the derivative of $|x|^p$ for $x\in \mathbb{R}$ and $p\in [1,\infty)$ via the definition of the derivative? I know the derivative is equal to $px|x|^{p-2}$. If I use the answer to this question, I don't get to anywhere useful:
$$f(x)'=\lim_{h\to0}\frac{f(x+h)-f(x)}{h}=\frac{|x+h|^p-|x|^p}{h}=\frac{(|x+h|^p-|x|^p)(|x+h|^p+|x|^p)}{h(|x+h|^p+|x|^p)}=\frac{|x+h|^{2p}-|x|^{2p}}{h(|x+h|^p+|x|^p)}$$
So I don't think myself that adopting the method from the question is correct. But then I can't think of any other way to get to the desired answer. Any help is appreciated.