# Derivative of $\sqrt{x^{2}}$ at $x=0$

I'm suppose to calculate the derivative of $$f(x)=\sqrt{x^2}$$ when $$x=0$$. I.e., I need to determine $$f'(0)$$. I worked it out this way:

\begin{align} f'(0 )&= \lim_{x\rightarrow 0} \frac{f(x)-f(a)}{x-a}\\ \\ &=\lim_{x\rightarrow 0} \frac{\sqrt{x^2} - 0}{x-0}\\\\ &=\lim_{x\rightarrow 0} \frac{x}{x}\\ \\ &=1\end{align}

I know I'm doing something wrong, because the solution says there is no derivative, But I don't know why.

Your issue is the following: $$\sqrt{x^{2}}=|x|$$, not $$x$$. So your problem reduces to $$\lim_{x\to 0}\frac{|x|}{x}$$ which does not exist. This is because the right-hand limit ($$1$$) and left-hand limit $$(-1)$$ do not agree.