{
  "id": "double-integral",
  "version": "92160d54a5e3",
  "status": "published",
  "name": "Double Integral Calculator",
  "question": "What is the double integral of f?",
  "summary": "Evaluates an iterated integral exactly where possible, checked numerically.",
  "category": "math",
  "subcategory": "calculus",
  "url": "https://www.acalculator.org/math/double-integral-calculator",
  "markdown": "https://www.acalculator.org/math/double-integral-calculator.md",
  "kind": "function",
  "method": "Iterated CAS definite integrals, checked against tanh-sinh cubature.",
  "assumptions": [
    "Finite limits; radians. 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, y)",
        "description": "The integrand.",
        "type": "string",
        "maxLength": 200
      },
      "order": {
        "title": "Order",
        "description": "dy dx: inner in y, outer in x.",
        "type": "string",
        "maxLength": 12
      },
      "a1": {
        "title": "Inner lower",
        "description": "The inner lower limit.",
        "type": "string",
        "maxLength": 60
      },
      "b1": {
        "title": "Inner upper",
        "description": "The inner upper limit.",
        "type": "string",
        "maxLength": 60
      },
      "a2": {
        "title": "Outer lower",
        "description": "The outer lower limit.",
        "type": "string",
        "maxLength": 60
      },
      "b2": {
        "title": "Outer upper",
        "description": "The outer upper limit.",
        "type": "string",
        "maxLength": 60
      }
    }
  },
  "outputs": {
    "exact": {
      "label": "Exact value",
      "description": "The integral, exact.",
      "format": "math"
    },
    "value": {
      "label": "Decimal value",
      "description": "The integral to 10 significant figures.",
      "format": "number"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "f": "x^2 e^(x y)",
      "order": "dy dx",
      "a1": "x/2",
      "b1": "1",
      "a2": "0",
      "b2": "2"
    },
    "outputs": {
      "exact": "2",
      "value": 2
    },
    "text": "The double integral of x^2 e^(x y) (dy dx) is 2."
  },
  "examples": [
    {
      "given": {
        "f": "x^2 e^(x y)",
        "order": "dy dx",
        "a1": "x/2",
        "b1": "1",
        "a2": "0",
        "b2": "2"
      },
      "expect": {
        "exact": "2",
        "value": 2
      },
      "source": "OpenStax Calculus Vol. 3 (Strang and Herman, 2016), 5.2, Ex. 5.12"
    },
    {
      "given": {
        "f": "3x^2 + y^2",
        "order": "dx dy",
        "a1": "y^2 - 3",
        "b1": "y + 3",
        "a2": "-2",
        "b2": "3"
      },
      "expect": {
        "exact": "2375/7",
        "value": 339.2857142857143
      },
      "source": "OpenStax Calculus Vol. 3 (Strang and Herman, 2016), 5.2, Ex. 5.13"
    }
  ],
  "sources": [
    "OpenStax, Calculus Volume 3, section 5.1 Double Integrals over Rectangular Regions: https://openstax.org/books/calculus-volume-3/pages/5-1-double-integrals-over-rectangular-regions",
    "OpenStax, Calculus Volume 3, section 5.2 Double Integrals over General Regions: https://openstax.org/books/calculus-volume-3/pages/5-2-double-integrals-over-general-regions"
  ],
  "related": [
    "triple-integral",
    "integral",
    "partial-derivative",
    "jacobian"
  ],
  "changelog": []
}
