3

If a function $f(x) = x^2 \sin (\frac{1}{x}), x \neq 0$ and $f(0) = 0$, how do I show this function is differentiable on $\mathbb{R}.$

--Edit

I have tried to find the limit when $x \neq 0$ and got this. The definition of the limit of a function is $f'(x) = \lim_{h \rightarrow 0} \frac{f(x+h) - f(x)}{h}.$ So I got $f'(a) = \lim_{h \rightarrow0} \frac{a^2 (\sin(\frac{1}{a+h}) - \sin(\frac{1}{a}))}{h} = 0$ at $x = a,$ because as $h \rightarrow0$, $\sin(\frac{1}{a+h}) = \sin(\frac{1}{a}).$ Am I doing it right??

eChung00
  • 2,963
  • 8
  • 29
  • 42
  • Away from zero, the differentiation rules apply. At zero, start by writing down the difference quotient for the function. – Mark McClure Oct 09 '14 at 23:37
  • 2
    To add to that: you can use the product and chain rules to explicitly find the derivative on $\mathbb{R} \setminus {0}$. But at $0$, you'll have to use the definition of the derivative to prove it exists (make sure to evaluate the limit from both the negative side and the positive side). – Zubin Mukerjee Oct 09 '14 at 23:38

1 Answers1

5

We have, at $x=0,$

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

since $h$ goes to $0$ and $\sin \frac{1}{h}$ is bounded.

At any point $x\ne 0$ just apply the usual rules to get the derivative.

Edit

In a comment the OP asks for a proof of the fact that $f'$ is not continuous at $x=0.$

We have, using the useful rules to get the derivative, $f'(x)=2x\sin\frac1x-\cos\frac1x.$

We have $\lim_{x\to 0} 2x\sin \frac1x=0$ since $x$ goes to $0$ and $\sin \frac1x$ is bounded. However, $\lim_{x\to 0}\cos \frac1x$ doesn't exist. Why? Because $\frac1x$ goes to $\infty$ and the cosine function oscillates between $-1$ and $1$ without approaching any value.

mfl
  • 29,399
  • It's $\sin\left(\frac{1}{x}\right)$, not $\sin\left(\frac{1}{x^2}\right)$. – J126 Oct 09 '14 at 23:54
  • @JoeJohnson126 You are right. I am going to correct the typo. Thank you very much. – mfl Oct 09 '14 at 23:55
  • The original problem is asking to show $f'$ is not continuous at $x=0$. Can u explain this too? – eChung00 Oct 09 '14 at 23:57
  • @mfl Can u check the added part above?? And thanks for your answer. – eChung00 Oct 10 '14 at 17:56
  • It is $f'(a) = \lim_{h \to 0} \frac{(a+h)^2 \sin(\frac{1}{a+h}) -a^2 \sin(\frac{1}{a})}{h}$ which is not identically zero for any $a.$ – mfl Oct 10 '14 at 19:21
  • @mfl What do you mean by "not identically zero for any a??" Is that mean the limit approaches to zero but not exactly zero?? $f(a+h) \approx f(a)$ as $h \rightarrow 0$. – eChung00 Oct 10 '14 at 22:20
  • You are right when you write $f(a+h) \approx f(a).$ But $\lim_{h\to 0}\frac{f(a+h)-f(a)}{h}=\frac{0}{0}$ (if $f$ is continuous) which is an indeterminate form. You have to compute it based on the particular definition of $f.$ – mfl Oct 11 '14 at 04:15
  • @mfl thanks.. it was very helpful...^^ – eChung00 Oct 14 '14 at 03:50