# Whats the derivative of $\sqrt{4+|x|}$ using first principle

Here is my attempt:

$$f(x)=\sqrt{4+|x|}$$ $$f`(x) = \lim_{h\to0} \frac{\sqrt{4+|x-h|}-\sqrt{4+|x|}}{h}$$ multiplying by the conjugate: $$\lim_{h\to0} \frac{4+|x-h|-4-|x|}{h[\sqrt{4+|x-h|}+\sqrt{4+|x|}]}$$ $$\lim_{h\to0} \frac{|x-h|-|x|}{h[\sqrt{4+|x-h|}+\sqrt{4+|x|}]}$$

What is the next step? how can I deal with absloute value of |x|?

• My gut is telling me to look at left and right handed limits but I haven't done all the computations yet so I'm unsure if this will give you the answer. – DanZimm Nov 28 '14 at 12:33
• Split the domain of the function into $x \gt 0$ ($f(x)=\sqrt{4+x}$) and $x \le 0$ ($f(x)=\sqrt{4-x}$). Both halves are easily differentiable, then show they have the same value at $x=0$ – Tom Collinge Nov 28 '14 at 12:34
• It would be easier to deal with two cases: $x$ non-negative and $x$ negative. When you get a formula for each you can combine them using the absolute value and signum ($+1$ for positive, $-1$ for negative) functions. (That is, if you want to end up with a single formula.) Show these are equal at $x=0$. – Rory Daulton Nov 28 '14 at 12:35
• @TomCollinge Not sure, but I guess that $f$ is not differentiable at $x = 0$. – Thekwasti Nov 28 '14 at 12:37
• @Thekwasti: I think you are correct. $f_-'(0) = -1/4$ whereas $f_+'(0) = +1/4$, so $f$ is not differentiable at $x = 0$. – Tom Collinge Nov 28 '14 at 13:11

The graph of the function looks like this: it isn't differentiable at x = 0.

As noted in the comments, Split the domain of the function into

x>0 $f(x)=\sqrt{4+x}$ and

x≤0 f(x)= $\sqrt{4-x}$.

Both halves are easily differentiable, but have different values at x = 0 (or to be more precise, the limiting value for x > 0 differs from the value for x = 0).

(P.S - this is quite an interesting web site: http://fooplot.com/

First note that if $f(x)=\sqrt{4+|x|}$, then $$\frac{d}{dx}f(0) = \lim_{h\to0} \frac{\sqrt{4+|0+h|}-\sqrt{4+|0|}}{h}= \lim_{h\to0} \frac{\sqrt{4+|h|}-\sqrt{4}}{h}$$ $$= \lim_{h\to0} \frac{\left(\sqrt{4+|h|}-\sqrt{4}\right)\left(\sqrt{4+|h|}+\sqrt{4}\right)}{h\left(\sqrt{4+|h|}+\sqrt{4}\right)}$$ $$= \lim_{h\to0} \frac{4+|h|-4}{h\left(\sqrt{4+|h|}+2\right)}= \lim_{h\to0} \frac{|h|}{h\left(\sqrt{4+|h|}+2\right)}$$ From the left of zero, we have $$\lim_{h\to0^-} \frac{|h|}{h\left(\sqrt{4+|h|}+2\right)}= \lim_{h\to0^-} \frac{-h}{h\left(\sqrt{4-h}+2\right)}$$ $$= \lim_{h\to0^-} \frac{-1}{\left(\sqrt{4-h}+2\right)}=-\frac{1}{\left(\sqrt{4}+2\right)}=-\frac14$$ From the right of zero, we have $$\lim_{h\to0^+} \frac{|h|}{h\left(\sqrt{4+|h|}+2\right)}= \lim_{h\to0^+} \frac{h}{h\left(\sqrt{4+h}+2\right)}$$ $$= \lim_{h\to0^+} \frac{1}{\left(\sqrt{4+h}+2\right)}=\frac{1}{\left(\sqrt{4}+2\right)}=\frac14$$ Therefore, $f(x)$ is not differentiable at $x=0$.