Search the corpus

    $x^2\sin(1/x)$ is differentiable everywhere but $f'$ is discontinuous at $0$

    P-F03D3

    Area
    Prelim
    Topics
    Continuity, Differentiation
    Seen at
    UGA
    Years
    2003
    Status
    draft

    Show that the function \[f(x) = \begin{cases} x^2 \sin \frac{1}{x}, & \text{for } x \neq 0 \\ 0, & \text{for } x = 0 \end{cases}\] is differentiable everywhere in \((-\infty, \infty)\), but that \(f'\) is not continuous at \(0\).

    Solution

    1. For \(x \neq 0\), \(f\) is differentiable (it is a product of differentiable functions), with \(f'(x) = 2x\sin(1/x) - \cos(1/x)\).

    product and chain rule.

    2. At \(x = 0\), \(f'(0) = \lim_{h \to 0} \frac{f(h) - f(0)}{h} = \lim_{h \to 0} \frac{h^2 \sin(1/h)}{h} = \lim_{h \to 0} h \sin(1/h) = 0\).

    \(|h \sin(1/h)| \le |h| \to 0\).

    3. Hence \(f\) is differentiable everywhere.

    1 and 2.

    4. \(f'\) is not continuous at \(0\): \(\lim_{x \to 0} f'(x) = \lim_{x \to 0} (2x\sin(1/x) - \cos(1/x))\) does not exist (the term \(\cos(1/x)\) oscillates and has no limit).

    1 (the term \(-\cos(1/x)\) has no limit as \(x \to 0\)).

    5. Hence \(f'\) is discontinuous at \(0\).

    4.

    6. Q.E.D.

    3 and 5.