{
  "id": "curl",
  "version": "6ddb516066dc",
  "status": "published",
  "name": "Curl Calculator",
  "question": "What is the curl of a vector field?",
  "summary": "Finds the curl and divergence of a vector field, checked numerically.",
  "category": "math",
  "subcategory": "calculus",
  "url": "https://www.acalculator.org/math/curl-calculator",
  "markdown": "https://www.acalculator.org/math/curl-calculator.md",
  "kind": "function",
  "method": "curl F = (R_y − Q_z, P_z − R_x, Q_x − P_y), each partial derivative from a CAS, checked.",
  "assumptions": [
    "Radians. An answer that fails its check is not shown."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "p": {
        "title": "P (i component)",
        "description": "The P component, a function of x, y and z.",
        "type": "string",
        "maxLength": 150
      },
      "q": {
        "title": "Q (j component)",
        "description": "The Q component, a function of x, y and z.",
        "type": "string",
        "maxLength": 150
      },
      "r": {
        "title": "R (k component)",
        "description": "The R component, a function of x, y and z.",
        "type": "string",
        "maxLength": 150
      }
    }
  },
  "outputs": {
    "curl": {
      "label": "curl F",
      "description": "The curl (R_y − Q_z, P_z − R_x, Q_x − P_y).",
      "format": "text"
    },
    "div": {
      "label": "div F",
      "description": "The divergence P_x + Q_y + R_z.",
      "format": "math"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "p": "x^2 z",
      "q": "e^y + x z",
      "r": "x y z"
    },
    "outputs": {
      "curl": "(x z - x, x^2 - y z, z)",
      "div": "x y + 2x z + e^y"
    },
    "text": "The curl of (x^2 z, e^y + x z, x y z) is (x z - x, x^2 - y z, z)."
  },
  "examples": [
    {
      "given": {
        "p": "x^2 z",
        "q": "e^y + x z",
        "r": "x y z"
      },
      "expect": {
        "curl": "(x z - x, x^2 - y z, z)"
      },
      "source": "OpenStax Calculus Vol. 3 (Strang and Herman, 2016), 6.5, Ex. 6.52"
    },
    {
      "given": {
        "p": "y z",
        "q": "x z",
        "r": "x y"
      },
      "expect": {
        "curl": "(0, 0, 0)",
        "div": "0"
      },
      "source": "OpenStax Calculus Vol. 3 (Strang and Herman, 2016), 6.5, Ex. 6.56"
    },
    {
      "given": {
        "p": "e^x",
        "q": "y z",
        "r": "-y z^2"
      },
      "expect": {
        "div": "-2y z + z + e^x"
      },
      "source": "OpenStax Calculus Vol. 3 (Strang and Herman, 2016), 6.5, Ex. 6.48"
    }
  ],
  "sources": [
    "OpenStax, Calculus Volume 3, section 6.5 Divergence and Curl: https://openstax.org/books/calculus-volume-3/pages/6-5-divergence-and-curl"
  ],
  "related": [
    "partial-derivative",
    "jacobian",
    "cross-product",
    "dot-product"
  ],
  "changelog": []
}
