5
$\begingroup$

Let $f : \Bbb R \to \Bbb R$ be the function defined by $f(x)= \frac {\sin x}{|x|+ \cos x}$. Then

A.$f$ is differentiable at all $x \in \Bbb R$.

B.$f$ is not differentiable at $x =0$.

C.$f$ is differentiable at $x=0$ but $f'$ is not continuous at $x=0$.

D.$f$ is not differentiable at $x=\frac {\pi}{2}$.

Using the standard definition of derivative, I get that $f$ is differentiable at $0$ as well as $\frac {\pi}2$. This is as follows,

$\lim_{h \to 0} \frac {f(0+h)-f(0)}{h}=1=\lim_{h \to 0} \frac {f(0-h)-f(0)}{-h}$

and

$\lim_{h\to 0} \frac {f(\frac {\pi}2 +h)-f(\frac {\pi}{2})}{h}=0=\lim_{h \to 0} \frac {f(\frac {\pi}2 -h)-f(\frac {\pi}2)}{-h}$ using L'Hospital rule at one stage.

Hence I eliminate options B and D.

Since $0$ was the only doubtful point to check about differentiability, I choose option A as the answer.

I regret a little about not knowing how to check validity of option C. Can you tell me how to prove it wrong?

$\endgroup$
6
  • $\begingroup$ Just differentiate and see what happens when $x=0$. $\endgroup$ Dec 14, 2015 at 13:31
  • $\begingroup$ While I differentiate by $\frac uv$-rule, I get encountered by the term $|x|$. In that case how should I approach it? $\endgroup$
    – Error 404
    Dec 14, 2015 at 13:35
  • 2
    $\begingroup$ $\frac{d}{dx}|x|=\frac{x}{|x|}$, to see this start with $t=|x|$ and then $t^2=x^2$ $\endgroup$ Dec 14, 2015 at 13:38
  • 1
    $\begingroup$ @Quintic. Nice. That really worked. I verified $ \lim_{h \to 0} f'(0+h)=\lim_{h \to 0} f'(0-h)=1$. $\endgroup$
    – Error 404
    Dec 14, 2015 at 14:13
  • 2
    $\begingroup$ Then you can post your solution as an answer. It is a nice practice to answer your own question after you find out everything right. :) $\endgroup$ Dec 14, 2015 at 15:18

3 Answers 3

7
$\begingroup$

A is true answer

By definition of the derivative $$f'(0)=\lim_{h\to0}\frac{\frac{\sin h}{|h|+\cos h} - \frac{\sin 0}{0+1} }h= \lim_{h\to0}\frac{\sin h}{h(|h|+\cos h)} $$ Note that (using L'Hospital and then substitution) $$ \lim_{h\to0^+}\frac{\sin h}{h(|h|+\cos h)}=\lim_{h\to0^+}\frac{\sin h}{h(h+\cos h)}=\lim_{h\to0^+}\frac{\cosh}{2h+\cos h - h\sinh)}=1 $$

Verify by yourself that also $$ \lim_{h\to0^-}\frac{\sin h}{h(|h|+\cos h)}= \lim_{h\to0^-}\frac{\sin h}{h(-h+\cos h)}=1 $$

Conclude that $f'(0)=1$


So you got that $f'(0)$ is defined, to show $f'$ is continuous at $x=0$ one need to show for example that $$\lim_{x\to0} f'(x)=f'(0)$$

$$\lim_{x\to0} f'(x) = \lim_{x\to0}\lim_{h\to0}\frac{\frac{\sin x+h}{|x+h|+\cos (x+h)} - \frac{\sin x}{|x|+\cos x} }h= \lim_{h\to0}\lim_{x\to0}\frac{\frac{\sin x+h}{|x+h|+\cos (x+h)} - \frac{\sin x}{|x|+\cos x} }h=f'(0) $$ The switching the order of limits is allowed when the function is uniformly continuous. A continuous function on a compact set is uniformly continuous, so everything is fine here, but I guess that you won't like this sort of answer:)


Using $x\ne0$: $|x|'=\mathrm{sgn}(x)$ where $$\mathrm{sgn}(x) = \begin{cases}1&x>0\\0&x=0\\-1&x<0\end{cases}$$ $$f'(x)=\frac{\cos (x)}{\left| x\right| +\cos (x)}-\frac{\sin (x) (\mathrm{sgn}(x)-\sin (x))}{(\left| x\right| +\cos (x))^2},\quad x\ne0$$

$$\lim_{x\to0^+} f'(x) = \frac{1}{0 +1}-\frac{0 (0-0)}{(0 +1)^2}=1$$

Similarly $$\lim_{x\to0^-} f'(x) = 1$$ Conclude $$\lim_{x\to0} f'(x)=f'(0)$$ and you done.

$\endgroup$
13
  • 1
    $\begingroup$ How did you conclude that $f'$ is continuous at $0$? $\endgroup$ Dec 14, 2015 at 13:45
  • $\begingroup$ I just show why $f$ is differentiable at $x=0$, will add a note about continuity $\endgroup$ Dec 14, 2015 at 13:52
  • $\begingroup$ One more thing as $f'(0)=1$ so we can conclude that $f'$ is continuous at $0$. Is that right? $\endgroup$ Dec 14, 2015 at 13:53
  • 1
    $\begingroup$ @Quintic nope, math.stackexchange.com/questions/292275/… $\endgroup$ Dec 14, 2015 at 14:19
  • 1
    $\begingroup$ @Alex Nope, using L'Hospital we differentiate different function, the nominator and denominator. $\endgroup$ Dec 14, 2015 at 14:20
6
$\begingroup$

I feel you are looking for a descriptive answer, still leaving it here as an answer since it explains your doubt.

From graph:

enter image description here

Where green is $f$, blue is $f'$, orange is $f''$. $f'$ is clearly continuous but not differentiable at $0$

$\endgroup$
1
  • 1
    $\begingroup$ The graph certainly makes the things clear. Thanks :) $\endgroup$
    – Error 404
    Dec 14, 2015 at 14:07
3
$\begingroup$

As per the discussion with @Quintic in the above comments,

$f'(x)=\frac {1+|x|\cos x-\frac {x}{|x|} \sin x}{(|x|+\cos x)^2}$.

Now, $\lim_{h \to 0} f'(0+h)=\lim_{h \to 0} \frac {1+|h|\cos h-\frac {h}{|h|}\sin h}{(|h|+\cos h)^2}=\lim_{h \to 0}\frac {1+h\cos h-\sin h}{(h+\cos h)^2}$. (Where $h \gt 0$)

$\Rightarrow \lim_{h\to 0} f'(0+h)=\frac {1+0-0}{(0+1)^2}=1.$

Similarly, $\lim_{h\to 0} f'(0-h)=\lim_{h\to 0} \frac {1+h\cos h-\sin h}{(h+\cos h)^2}$ (Where $h \gt 0)$

$\Rightarrow \lim_{h\to 0} f'(0-h)=1$.

Hence $\lim_{h\to 0} f'(0+h)=\lim_{h\to 0} f'(0-h) \Rightarrow$ $f'$ is continuous at $x=0$.

$\endgroup$

This site is temporarily in read-only mode and not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .