In[1]:=

{f = x^2 Cos[1/x], df = D[f, x]}

Out[1]=

{x^2 Cos[1/x], 2 x Cos[1/x] + Sin[1/x]}

In[2]:=

Plot[f, {x, -3/4, 3/4}, PlotPoints -> 10000]

[Graphics:HTMLFiles/NonDifferentiableDerivative_4.gif]

In[3]:=

Plot[df, {x, -3/4, 3/4}, PlotPoints -> 10000]

[Graphics:HTMLFiles/NonDifferentiableDerivative_6.gif]

Aside:

In[4]:=

n = 1000 ; t[i_] := -1. + 2 i/1000 ; g[x_] := Sqrt[1 - x^2]

In[5]:=

2 * Sum[g[t[i]] * (t[i] - t[i - 1]), {i, 1, 1000}]

Out[5]=

3.141487477002142`


Converted by Mathematica  (January 14, 2004)