{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Counterexample\n\nLet $f(x) = x^2 \\sin(1/x)$ for $x \\ne 0$, and let $f(0) = 0$.\nThen $f$ is [[differentiable|0A61B60B5R]] on $\\mathbb{R}$, but $f'$ is not continuous at $0$.\nAt $0$, the difference quotient is $h \\sin(1/h)$, which tends to $0$. So $f'(0) = 0$.\nFor $x \\ne 0$, $f'(x) = 2 x \\sin(1/x) - \\cos(1/x)$. This has no limit as $x \\to 0$, because $\\cos(1/x)$ has none.\n\n## Remarks\n\nSo $f$ is differentiable but not [[of class $C^1$|06SKCHDQT5]].\nThe discontinuity of $f'$ at $0$ is essential. By [[Darboux's theorem|0Q5A47J48D]], a derivative can have no jump discontinuities.\n\n## Explanations\n\n### L1 human\n\nThe factor $x^2$ flattens the oscillation of $\\sin(1/x)$ enough to give a slope $0$ at the origin.\nBut near the origin the slopes keep swinging between about $-1$ and $1$.\n",
  "commit": "f591989ed15704e9d8755a7a5a6426d73de7a3ae",
  "front": {
    "kind": "counterexample",
    "msc": [
      "26A24"
    ],
    "name": "x^2 sin(1/x) is differentiable with discontinuous derivative",
    "sources": [
      {
        "locator": "Differentiability classes",
        "url": "https://en.wikipedia.org/wiki/Differentiable_function"
      }
    ],
    "tag": "0WDAKKN4NC",
    "uses": [
      "0A61B60B5R",
      "06SKCHDQT5",
      "0Q5A47J48D"
    ]
  },
  "kind": "counterexample",
  "link": "https://math2.tamnd.com/node/0WDAKKN4NC/",
  "links": [
    {
      "field": "uses",
      "target": "0A61B60B5R"
    },
    {
      "field": "uses",
      "target": "06SKCHDQT5"
    },
    {
      "field": "uses",
      "target": "0Q5A47J48D"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/0WDAKKN4NC.md",
  "msc": [
    "26A24"
  ],
  "name": "x^2 sin(1/x) is differentiable with discontinuous derivative",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/0WD/0WDAKKN4NC.md",
  "status": null,
  "tag": "0WDAKKN4NC",
  "uri": "m2://0WDAKKN4NC",
  "url": "https://math2.tamnd.com/wiki/x-2-sin-1-x-is-differentiable-with-discontinuous-derivative/",
  "writing": {
    "tag": "0WDAKKN4NC",
    "kind": "counterexample",
    "level": "W0",
    "next": [
      {
        "what": "an inventory row",
        "note": "the row of the inventory that the node accounts for",
        "have": 0,
        "want": 1
      },
      {
        "what": "edge refutes or not_instance_of out",
        "have": 0,
        "want": 1
      }
    ]
  }
}
