{
  "id": "end-behavior",
  "version": "873db43ba75c",
  "status": "published",
  "name": "End Behavior Calculator",
  "question": "What is the end behavior of f(x)?",
  "summary": "Finds where a polynomial or rational function goes as x → ∞ and x → −∞, and the term it behaves like, checked numerically.",
  "category": "math",
  "subcategory": "calculus",
  "url": "https://www.acalculator.org/math/end-behavior-calculator",
  "markdown": "https://www.acalculator.org/math/end-behavior-calculator.md",
  "kind": "function",
  "method": "For a polynomial or rational function, f(x)/x^k → c ≠ 0 as x → ±∞ for one whole number k (the leading term c x^k). A computer algebra system finds c; the ends follow from the signs of c and of x^k.",
  "assumptions": [
    "f is a polynomial or a quotient of polynomials in x.",
    "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 polynomial or a polynomial over a polynomial, typed like -3x^2 (x - 1)(x + 4) or (6x^3 - 10x^2)/(x^3 + 5x^2).",
        "type": "string",
        "maxLength": 200
      }
    }
  },
  "outputs": {
    "right": {
      "label": "As x → ∞, f(x) →",
      "description": "∞, −∞, or the number f approaches for large x.",
      "format": "text"
    },
    "left": {
      "label": "As x → −∞, f(x) →",
      "description": "∞, −∞, or the number f approaches for large negative x.",
      "format": "text"
    },
    "like": {
      "label": "For large |x|, f(x) behaves like",
      "description": "The leading term: c x^k, where f(x)/x^k → c.",
      "format": "math"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "f": "-3x^2 (x - 1)(x + 4)"
    },
    "outputs": {
      "right": "-∞",
      "left": "-∞",
      "like": "-3x^4"
    },
    "text": "As x → ∞, -3x^2 (x - 1)(x + 4) → -∞; as x → −∞, it → -∞."
  },
  "examples": [
    {
      "given": {
        "f": "-3x^2 (x - 1)(x + 4)"
      },
      "expect": {
        "right": "-∞",
        "left": "-∞",
        "like": "-3x^4"
      },
      "source": "OpenStax, College Algebra 2e, section 5.2 Power Functions and Polynomial Functions, Example 7. https://openstax.org/books/college-algebra-2e/pages/5-2-power-functions-and-polynomial-functions"
    },
    {
      "given": {
        "f": "-x^9"
      },
      "expect": {
        "right": "-∞",
        "left": "∞",
        "like": "-x^9"
      },
      "source": "OpenStax, College Algebra 2e, section 5.2, Example 3"
    },
    {
      "given": {
        "f": "(x^2 + 4x)/(x^3 - 8)"
      },
      "expect": {
        "right": "0",
        "left": "0",
        "like": "1/x"
      },
      "source": "OpenStax, College Algebra 2e, section 5.6 Rational Functions, Example 7(c)"
    }
  ],
  "sources": [
    "OpenStax, College Algebra 2e, section 5.2 Power Functions and Polynomial Functions: https://openstax.org/books/college-algebra-2e/pages/5-2-power-functions-and-polynomial-functions",
    "OpenStax, College Algebra 2e, section 5.6 Rational Functions: https://openstax.org/books/college-algebra-2e/pages/5-6-rational-functions"
  ],
  "related": [
    "asymptote",
    "lhopitals-rule",
    "quadratic-formula",
    "integral"
  ],
  "changelog": []
}
