{
  "id": "series",
  "version": "b6417e4250d5",
  "status": "published",
  "name": "Series Calculator",
  "question": "What is the sum of a series?",
  "summary": "Sums a(n) from n = n0 to a whole number or to infinity, and says whether an infinite series converges.",
  "category": "math",
  "subcategory": "calculus",
  "url": "https://www.acalculator.org/math/series-calculator",
  "markdown": "https://www.acalculator.org/math/series-calculator.md",
  "kind": "function",
  "method": "Geometric series with ratio r: a/(1 − r) when |r| < 1. Rational terms: partial fractions that telescope.",
  "assumptions": [
    "n takes every whole number from the first to the last."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "a": {
        "title": "Term a(n)",
        "description": "The n-th term, such as 1/(n (n + 1)).",
        "type": "string",
        "maxLength": 200
      },
      "from": {
        "title": "From n =",
        "description": "The first n.",
        "type": "string",
        "maxLength": 10
      },
      "to": {
        "title": "To n =",
        "description": "The last n, or inf.",
        "type": "string",
        "maxLength": 12
      }
    }
  },
  "outputs": {
    "verdict": {
      "label": "The series",
      "description": "Converges or diverges.",
      "format": "text"
    },
    "sum": {
      "label": "Sum",
      "description": "The sum of the terms.",
      "format": "number"
    },
    "exact": {
      "label": "Exact sum",
      "description": "The sum written exactly.",
      "format": "math"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "a": "(-3)^(n + 1)/4^(n - 1)",
      "from": "1",
      "to": "inf"
    },
    "outputs": {
      "verdict": "Converges",
      "sum": 5.142857142857143,
      "exact": "36/7"
    },
    "text": "The sum of (-3)^(n + 1)/4^(n - 1) from n = 1 to inf is 5.142857143."
  },
  "examples": [
    {
      "given": {
        "a": "(-3)^(n + 1)/4^(n - 1)",
        "from": "1",
        "to": "inf"
      },
      "expect": {
        "verdict": "Converges",
        "sum": 5.142857142857143,
        "exact": "36/7"
      },
      "source": "OpenStax, Calculus Volume 2, section 5.2 Infinite Series, Example 5.9(a). https://openstax.org/books/calculus-volume-2/pages/5-2-infinite-series"
    },
    {
      "given": {
        "a": "1/(n (n + 1))",
        "from": "1",
        "to": "inf"
      },
      "expect": {
        "verdict": "Converges",
        "sum": 1,
        "exact": "1"
      },
      "source": "OpenStax, Calculus Volume 2, section 5.2 Infinite Series, Example 5.7(c)"
    },
    {
      "given": {
        "a": "n/(n + 1)",
        "from": "1",
        "to": "inf"
      },
      "expect": {
        "verdict": "Diverges"
      },
      "source": "OpenStax, Calculus Volume 2, section 5.2 Infinite Series, Example 5.7(a)"
    }
  ],
  "sources": [
    "OpenStax, Calculus Volume 2, section 5.2 Infinite Series: https://openstax.org/books/calculus-volume-2/pages/5-2-infinite-series",
    "OpenStax, Calculus Volume 2, section 5.4 Comparison Tests: https://openstax.org/books/calculus-volume-2/pages/5-4-comparison-tests"
  ],
  "related": [
    "improper-integral",
    "integral",
    "lhopitals-rule",
    "percentage"
  ],
  "changelog": []
}
