{
  "id": "math",
  "version": "d00ec35cd8f3",
  "status": "published",
  "name": "Math Calculator",
  "question": "What is the answer to a math problem?",
  "summary": "Evaluates, simplifies, solves, differentiates, integrates.",
  "category": "math",
  "subcategory": "algebra",
  "url": "https://www.acalculator.org/math/math-calculator",
  "markdown": "https://www.acalculator.org/math/math-calculator.md",
  "kind": "function",
  "method": "A computer algebra system; each answer is checked numerically.",
  "assumptions": [
    "Real numbers only; angles in radians."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "q": {
        "title": "Math problem",
        "description": "Numbers, or an expression or equation in one letter.",
        "type": "string",
        "maxLength": 200
      },
      "mode": {
        "title": "What to do",
        "description": "What to do with the problem.",
        "type": "string",
        "enum": [
          "evaluate",
          "simplify",
          "solve",
          "derivative",
          "integral"
        ]
      }
    }
  },
  "outputs": {
    "value": {
      "label": "Value",
      "description": "The value.",
      "format": "number"
    },
    "simplified": {
      "label": "Simplified",
      "description": "A simpler equal form.",
      "format": "math"
    },
    "solutions": {
      "label": "Solutions",
      "description": "Every real solution.",
      "format": "text"
    },
    "derivative": {
      "label": "Derivative",
      "description": "The derivative.",
      "format": "math"
    },
    "antiderivative": {
      "label": "Integral",
      "description": "An antiderivative.",
      "format": "math"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "q": "(3/4 + 1/6) * 12 + sqrt(50)",
      "mode": "evaluate"
    },
    "outputs": {
      "value": 18.071067811865476
    },
    "text": "The value of (3/4 + 1/6) * 12 + sqrt(50) is 18.07106781."
  },
  "examples": [
    {
      "given": {
        "q": "(3/4 + 1/6) * 12 + sqrt(50)",
        "mode": "evaluate"
      },
      "expect": {
        "value": 18.071067811865476
      },
      "source": "hand calculation in content.mdx"
    },
    {
      "given": {
        "q": "2x + 7 = 19",
        "mode": "solve"
      },
      "expect": {
        "solutions": "x = 6"
      },
      "source": "OpenStax College Algebra 2e, 2.2, Ex. 1. https://openstax.org/books/college-algebra-2e/pages/2-2-linear-equations-in-one-variable"
    }
  ],
  "sources": [
    "OpenStax, College Algebra 2e, section 2.2 Linear Equations in One Variable: https://openstax.org/books/college-algebra-2e/pages/2-2-linear-equations-in-one-variable",
    "OpenStax, College Algebra 2e, section 1.6 Rational Expressions: https://openstax.org/books/college-algebra-2e/pages/1-6-rational-expressions",
    "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"
  ],
  "related": [
    "equation-solver",
    "integral"
  ],
  "changelog": []
}
