I'm trying to find the derivative by definition of the following function:


I know that by definition:

$$ f'(x)=\lim_{h\to0}\frac{\sqrt{|x+h|}\sin(x+h)-\sqrt{|x|}\sin(x)}{h} $$

But if I try to find the derivative at $0$ I get:

$$ f'(0)=\lim_{h\to0}\frac{\sqrt{|h|}\sin(h)}{h}=0 $$

which is not true because the derivative $DNE$ at $0$ because:

$$f'(x)=\begin{cases} \sqrt{x} \cos x+\frac{\sin x}{2\sqrt{x}}, \ \ \ \ \ x>0 \\ \sqrt{-x} \cos x-\frac{\sin x}{2\sqrt{-x}}\ \ \ x<0 \\ \end{cases}$$

So how can it be that the derivative exists only when it is calculated by definition?

  • $\begingroup$ Your final expression for $f'(x)$ looks as if it has limits of $0$ as $x \to 0$ from above or below. Combine this with the continuity of $f(x)$ $\endgroup$ – Henry Jan 19 '16 at 10:57
  • $\begingroup$ You could make the derivative concise by taking $$\frac{d}{dx}|x|=|x|/x$$. Try evaluating the resultant derivative using a limit $\endgroup$ – Prish Chakraborty Jan 19 '16 at 13:07

You shouldn't say that the derivative does not exist.



As the limit exists, this is the value of the derivative.

  • 2
    $\begingroup$ Just a comment to the OP: the first equality holds because both limits on the right exist. If $\lim g$ and $\lim f$ exist, then $\lim f\cdot g$ exists and is equal to $\lim f\cdot \lim g$ $\endgroup$ – 5xum Jan 19 '16 at 9:18
  • $\begingroup$ Yves, I edited my question. $\endgroup$ – CodeNinja Jan 19 '16 at 9:31
  • $\begingroup$ @CodeNinja: when you modify a question after the fact, you should clearly indicate it, otherwise comments and answers can become nonsense. $\endgroup$ – Yves Daoust Jan 19 '16 at 10:03
  • $\begingroup$ I just clarified my intention. $\endgroup$ – CodeNinja Jan 19 '16 at 10:07
  • 1
    $\begingroup$ @CodeNinja: you should clearly indicate the change. $\endgroup$ – Yves Daoust Jan 19 '16 at 10:20

We have $$f(x)=\begin{cases} \sqrt{x} \sin x, \ \ \ \ \ x\geq0 \\ \sqrt{-x} \sin x\ \ \ x<0 \\ \end{cases}$$ and $$f'(x)=\begin{cases} \sqrt{x} \cos x+\frac{\sin x}{2\sqrt{x}}, \ \ \ \ \ x>0 \\ \sqrt{-x} \cos x-\frac{\sin x}{2\sqrt{-x}}\ \ \ x<0 \\ \end{cases}$$ But $$\frac{\sin x}{2\sqrt{x}}\rightarrow 0, \ \ \ \frac{\sin x}{2\sqrt{-x}}\rightarrow 0$$ for $x\rightarrow 0^+$ and $x\rightarrow 0^-$. Moreover, by definition of derivative: $$\lim_{h\to0}\sqrt{|h|}\cdot\lim_{h\to0}\frac{\sin(h)}{h}=0\cdot1.$$

  • $\begingroup$ but it does not defined at $x=0$ so the derivative does not exist at that point (because you divide by $\sqrt{x}$) $\endgroup$ – CodeNinja Jan 19 '16 at 9:26
  • 1
    $\begingroup$ @CodeNinja Not true. The derivative at $0$ is defined as $\lim_{h\to 0} \frac{f(0+h) - f(0)}{h}$. That is the definition. The fact that $\sqrt{x}\cos x + \frac{\sin x}{2\sqrt x}$ is not defined for $x=0$ does not mean that the derivative does not exist. $\endgroup$ – 5xum Jan 19 '16 at 9:30
  • $\begingroup$ I agree with @5xum. Furthermore, the two limits are equal. $\endgroup$ – Mark Jan 19 '16 at 9:32
  • $\begingroup$ @Mark, So I can I know when I can calculate the derivative by a formula (like the chain rule of something else) or that it can be calculated only by definition. $\endgroup$ – CodeNinja Jan 19 '16 at 9:37
  • $\begingroup$ @CodeNinja, if $\exists$ $\lim_{x\to x_0} f'(x)$ then $f'(x_0)=\lim_{x\to x_0} f'(x)$. But beware: this is only a sufficient condition. $\endgroup$ – Mark Jan 19 '16 at 9:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.