3

$g: \mathbb{R} \to \mathbb{R} $

$$g(x) = \begin{cases} x^2\sin(1/x)& \text{if $x\ne 0$}, \\ 0 &\text{if $x = 0$}.\end{cases}$$

Prove that g is differentiable everywhere, and that its derivative $g':\mathbb{R} \to \mathbb{R}$ is continuous on $\{x\in\mathbb{R}| x\not=0\}$ but discontinuous at 0.

My attempt,

since $x^2$ is differentiable everywhere, and $\sin(1/x)$ is differentiable every $x\not=0$ then the product is differentiable everywhere but $x\not=0$. if $x = 0$ could I simply state that since $g(x) = 0$ then it is differentiable at $ x = 0$ or would I have to use $x^2\sin(1/x)$? I wrote down on paper that $-x^2 \leq x^2\sin(1/x) \leq x^2$ and used the sandwich theorem to say it's differentiable at x = 0. Is this true or would I have to use $g(x) = 0$?

I've done all other parts of the question, just stuck on this part.

  • No. Sandwich theorem is fine. You still need to prove that the derivative is discontinuous at 0 though. – Prahlad Vaidyanathan Dec 11 '13 at 17:38
  • 2
    Why don't you use the definition, i.e. $g'(0)=\lim_{x\rightarrow 0}\frac{x^2\sin(1/x)}{x}=\lim_{x\rightarrow 0}x\sin(1/x)=...$? – Avitus Dec 11 '13 at 17:41
  • This is a great problem. The derivative exists at the Origin (and it is zero), the derivative also exists everywhere else (you can just take the derivative using differentiation rules) but the derivative is discontinuous at zero! Hence an upvote – imranfat Dec 11 '13 at 17:42
  • That's not what I'm confused about. I'm confused whether I'm asked to show if $g(x) = x^2\sin(1/x)$ is differentiable at x = 0 because right now, I see that $g(x) = 0$ at x = 0 so it's surely differentiable? Thanks – user113494 Dec 11 '13 at 17:42
  • 1
    $g(0)=0\Rightarrow g'(0)=0$ is in general not true. Consider, for example $g(x)=x$. – Avitus Dec 11 '13 at 17:45
  • 2
    I fixed up the formatting you didn't know how to do. Look at the code to learn how to do it yourself. – Harald Hanche-Olsen Dec 11 '13 at 17:45
  • @user113494. Like Avitus says. You must use the original limit definition of the derivative to show that f'(0) = 0. – imranfat Dec 11 '13 at 17:48
  • @Avitus but I'm having troubles with me proving that at x = 0, g(0) = 0 by definition, why do we have to consider $g(x) = x^2\sin(1/x)?$ – user113494 Dec 11 '13 at 17:52
  • I have written an asnwer; please tell me if you need more details, ok? – Avitus Dec 11 '13 at 17:53

1 Answers1

2

By definition

$$g'(0)=\lim_{x\rightarrow 0}\frac{x^2\sin(\frac{1}{x})-g(0)}{x}=\lim_{x\rightarrow 0}\frac{x^2\sin(\frac{1}{x})}{x}= \lim_{x\rightarrow 0}x\sin(\frac{1}{x})=0 $$

by the sandwich theorem. We want to study continuity of

$$g'(x) = \begin{cases} 2x\sin(\frac{1}{x})-\cos(\frac{1}{x})& \text{if $x\ne 0$}, \\ 0 &\text{if $x = 0$}.\end{cases}.$$

Problems arise at $x=0$. Clearly the limits

$$\lim_{x\rightarrow 0^{\pm}}g'(x)$$

do not exist as $\cos(\frac{1}{x})$ admits no finite limit at $x=0$.

Avitus
  • 14,018
  • how do you know that g'(0) = 0?

    I'm still confused about the points I said before. We are seeing if $g(x)$ is differentiable at x = 0 firstly, but $g(x) = 0$ at x = 0. So why consider $g(x) = x^2\sin(1/x)$ when this is only true for $x\not=0$?

    – user113494 Dec 11 '13 at 18:06
  • it is the result of the first line of computations (the one which ends with the sandwich theorem) – Avitus Dec 11 '13 at 18:07
  • Thanks, I've edited my post – user113494 Dec 11 '13 at 18:08
  • You are welcome: why did you edit your post? – Avitus Dec 11 '13 at 18:09
  • To add what I'm confused about. I.e. why you considered $g(x) = x^2\sin(1/x)$ instead of $g(x) = 0$ to show it's differentiable at x = 0 – user113494 Dec 11 '13 at 18:12
  • because $g(x):=x^2sin 1/x$ for all $x\neq 0$ and $g(0):=0$ by definition: it is the definition of $g$ in your question. – Avitus Dec 11 '13 at 18:13
  • Yes I understand that, but the question is to show it is differentiable everywhere right? But to show it is differentiable at x = 0, you used $g(x) = x^2sin(1/x)$ instead of $g(x) = 0$ when $g(x)$ is defined to be 0 at x = 0. I'm asking why you used $g(x) = x^2sin(1/x)$ – user113494 Dec 11 '13 at 18:19
  • I got it, but please remember the definition of differentiability. If we want to check whether $g$ is diff. at $x=0$, then we need to consider $\lim_{x\rightarrow 0}\frac{g(x)-g(0)}{x}$, where $x$ is not equal to $0$. So you need to pick up the definition of $g(x)$ for $x$ different from $0$ in the limit. – Avitus Dec 11 '13 at 18:23
  • oh god yes, silly me. Thank you for your patience and help! – user113494 Dec 11 '13 at 18:26
  • not silly, just learning as everybody else in here :-) You are welcome! – Avitus Dec 11 '13 at 18:27