How do you differentiate #f(x) = x^2sin(1/x)#, when #f(x)# is defined as #0# for #x=0#?

1 Answer
Apr 24, 2016

You'll need to use the definition.

Explanation:

#f'(0) = lim_(hrarr0)(f(0+h)-f(0))/h#

# = lim_(hrarr0)(f(h)-f(0))/h#

In this case we get

#f'(x) = lim_(hrarr0)((h^2sin(1/h))-0)/h#

# = lim_(hrarr0)hsin(1/h)#

The limit hence, the derivative is #0#.
(Use the squeeze theorem.)

Bonus

An interesting thing about this function is that #f# is continuous at #0#, and #f'(0)# exists, but #f'# is not continuous at #0#.

#f'(x) = 2xsin(1/x)+cos(1/x)#

#lim_(xrarro)f'(x)# does not exist. #2xsin(1/x)# goes to #0#, but #cos(1/x)# does not approach a limit.

Here is the graph of #f(x)#. (You can zoom and drag the graph around. When you leave the page and return the default image will appear again.)

graph{x^2sin(1/x) [-0.238, 0.2813, -0.095, 0.1643]}

Here's the graph of #f'(x)#.

graph{2xsin(1/x)+cos(1/x) [-1.865, 1.981, -0.872, 1.048]}