{
  "id": "calculus",
  "version": "b37bfafdb541",
  "status": "published",
  "name": "Calculus Calculator",
  "question": "How do you solve a calculus problem?",
  "summary": "Derivatives, integrals and definite integrals of a function, each checked numerically.",
  "category": "math",
  "subcategory": "calculus",
  "url": "https://www.acalculator.org/math/calculus-calculator",
  "markdown": "https://www.acalculator.org/math/calculus-calculator.md",
  "kind": "function",
  "method": "A computer algebra system finds each answer; it shows only after a numeric check.",
  "assumptions": [
    "One variable letter (x if none); 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": "Function f(x)",
        "description": "The function, in one letter.",
        "type": "string",
        "maxLength": 200
      },
      "op": {
        "title": "Find",
        "description": "What to find.",
        "type": "string",
        "enum": [
          "derivative",
          "integral",
          "definite"
        ]
      },
      "a": {
        "title": "Lower limit a",
        "description": "A number, such as 0.",
        "type": "string",
        "maxLength": 40
      },
      "b": {
        "title": "Upper limit b",
        "description": "A number, such as pi.",
        "type": "string",
        "maxLength": 40
      }
    }
  },
  "outputs": {
    "derivative": {
      "label": "Derivative",
      "description": "The derivative with respect to the letter.",
      "format": "math"
    },
    "value": {
      "label": "Definite integral",
      "description": "The signed area under f from a to b.",
      "format": "number"
    },
    "antiderivative": {
      "label": "Antiderivative",
      "description": "A function whose derivative is f, plus a constant C.",
      "format": "math"
    },
    "exact": {
      "label": "Exact value",
      "description": "The definite integral, exactly.",
      "format": "math"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "f": "4/(1 + x^2)",
      "op": "integral",
      "a": "0",
      "b": "1"
    },
    "outputs": {
      "antiderivative": "4 atan(x) + C"
    },
    "text": "An antiderivative of 4/(1 + x^2) is 4 atan(x) + C."
  },
  "examples": [
    {
      "given": {
        "f": "4/(1 + x^2)",
        "op": "integral"
      },
      "expect": {
        "antiderivative": "4 atan(x) + C"
      },
      "source": "OpenStax Calculus Vol. 1, 4.10, Ex. 4.52(c). https://openstax.org/books/calculus-volume-1/pages/4-10-antiderivatives"
    },
    {
      "given": {
        "f": "t^2 - 4",
        "op": "definite",
        "a": "-2",
        "b": "2"
      },
      "expect": {
        "value": -10.666666666666666,
        "exact": "-32/3"
      },
      "source": "OpenStax Calculus Vol. 1, 5.3, Ex. 5.20"
    },
    {
      "given": {
        "f": "5x^2/(4x + 3)",
        "op": "derivative"
      },
      "expect": {
        "derivative": "10x (2x + 3)/(4x + 3)^2"
      },
      "source": "OpenStax Calculus Vol. 1, 3.3, Ex. 3.25"
    }
  ],
  "sources": [
    "OpenStax, Calculus Volume 1, section 3.3 Differentiation Rules: https://openstax.org/books/calculus-volume-1/pages/3-3-differentiation-rules",
    "OpenStax, Calculus Volume 1, section 4.10 Antiderivatives: https://openstax.org/books/calculus-volume-1/pages/4-10-antiderivatives",
    "OpenStax, Calculus Volume 1, section 5.3 The Fundamental Theorem of Calculus: https://openstax.org/books/calculus-volume-1/pages/5-3-the-fundamental-theorem-of-calculus"
  ],
  "related": [
    "derivative",
    "integral",
    "limit",
    "taylor-series",
    "math"
  ],
  "changelog": []
}
