{
  "id": "curvature",
  "version": "f7764d7c32ee",
  "status": "published",
  "name": "Curvature Calculator",
  "question": "What is the curvature of y = f(x)?",
  "summary": "Finds the curvature κ and the radius of curvature of the graph y = f(x) at x = a, checked numerically.",
  "category": "math",
  "subcategory": "calculus",
  "url": "https://www.acalculator.org/math/curvature-calculator",
  "markdown": "https://www.acalculator.org/math/curvature-calculator.md",
  "kind": "function",
  "method": "κ = |f″(x)| / (1 + f′(x)²)^(3/2), radius R = 1/κ. A computer algebra system finds f′ and f″, each checked against a difference quotient.",
  "assumptions": [
    "The variable is x; angles are in radians; ln is the natural logarithm.",
    "An answer that fails its check is not shown."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "f": {
        "title": "Curve y = f(x)",
        "description": "The graph, typed like x^3 - 3x + 1, sin(x) or e^x.",
        "type": "string",
        "maxLength": 200
      },
      "a": {
        "title": "At x = a",
        "description": "Where to measure the curvature: a number or a constant such as pi/2.",
        "type": "string",
        "maxLength": 40
      }
    }
  },
  "outputs": {
    "curvature": {
      "label": "Curvature κ",
      "description": "How sharply the graph bends at x = a, in radians per unit of length.",
      "format": "number"
    },
    "exact": {
      "label": "Exact κ",
      "description": "The curvature at a, written exactly.",
      "format": "math"
    },
    "radius": {
      "label": "Radius of curvature",
      "description": "1/κ: the radius of the circle that fits the curve best at a.",
      "format": "number"
    },
    "formula": {
      "label": "κ(x) =",
      "description": "|f″(x)| / (1 + f′(x)²)^(3/2) at every x.",
      "format": "math"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "f": "x^3 - 3x + 1",
      "a": "1"
    },
    "outputs": {
      "curvature": 6,
      "exact": "6",
      "radius": 0.16666666666666666,
      "formula": "|6x|/(1 + (3x^2 - 3)^2)^(3/2)"
    },
    "text": "The curvature of y = x^3 - 3x + 1 at x = 1 is 6."
  },
  "examples": [
    {
      "given": {
        "f": "x^3 - 3x + 1",
        "a": "1"
      },
      "expect": {
        "curvature": 6,
        "exact": "6",
        "radius": 0.16666666666666666
      },
      "source": "OpenStax, Calculus Volume 3, section 3.3 Arc Length and Curvature, Example 3.13. https://openstax.org/books/calculus-volume-3/pages/3-3-arc-length-and-curvature"
    },
    {
      "given": {
        "f": "x - x^2/4",
        "a": "2"
      },
      "expect": {
        "curvature": 0.5,
        "exact": "1/2",
        "radius": 2
      },
      "source": "OpenStax, Calculus Volume 3, section 3.3 Arc Length and Curvature, Exercise 133"
    }
  ],
  "sources": [
    "OpenStax, Calculus Volume 3, section 3.3 Arc Length and Curvature: https://openstax.org/books/calculus-volume-3/pages/3-3-arc-length-and-curvature"
  ],
  "related": [
    "tangent-line",
    "linear-approximation",
    "integral",
    "arc-length"
  ],
  "changelog": []
}
