{
  "id": "inverse-function",
  "version": "6c022cb1cc86",
  "status": "published",
  "name": "Inverse Function Calculator",
  "question": "What is the inverse function of f?",
  "summary": "Finds the formula of the inverse function f⁻¹(x) of a one-to-one function, checked by composing it with f.",
  "category": "math",
  "subcategory": "algebra",
  "url": "https://www.acalculator.org/math/inverse-function-calculator",
  "markdown": "https://www.acalculator.org/math/inverse-function-calculator.md",
  "kind": "function",
  "method": "Solve y = f(x) for x by undoing each operation of f in reverse order, then swap x and y. The answer is shown only when f⁻¹(f(x)) = x at test points.",
  "assumptions": [
    "The variable is x; angles are in radians; ln is the natural logarithm.",
    "f⁻¹ is defined on the range of f.",
    "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": "A one-to-one function, typed like 2/(x - 3) + 4, sqrt(x - 4) + 2 or (2x + 3)/(x - 1).",
        "type": "string",
        "maxLength": 200
      }
    }
  },
  "outputs": {
    "inverse": {
      "label": "f⁻¹(x) =",
      "description": "The inverse function: f⁻¹(f(x)) = x for every x in the domain of f.",
      "format": "math"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "f": "2/(x - 3) + 4"
    },
    "outputs": {
      "inverse": "2/(x - 4) + 3"
    },
    "text": "The inverse of f(x) = 2/(x - 3) + 4 is f⁻¹(x) = 2/(x - 4) + 3."
  },
  "examples": [
    {
      "given": {
        "f": "2/(x - 3) + 4"
      },
      "expect": {
        "inverse": "2/(x - 4) + 3"
      },
      "source": "OpenStax, College Algebra 2e, section 3.7 Inverse Functions, Example 8. https://openstax.org/books/college-algebra-2e/pages/3-7-inverse-functions"
    },
    {
      "given": {
        "f": "2 + sqrt(x - 4)"
      },
      "expect": {
        "inverse": "(x - 2)^2 + 4"
      },
      "source": "OpenStax, College Algebra 2e, section 3.7 Inverse Functions, Example 9 (for x ≥ 2, the range of f)"
    }
  ],
  "sources": [
    "OpenStax, College Algebra 2e, section 3.7 Inverse Functions: https://openstax.org/books/college-algebra-2e/pages/3-7-inverse-functions"
  ],
  "related": [
    "log",
    "exponent",
    "quadratic-formula",
    "end-behavior"
  ],
  "changelog": []
}
