{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Proof\n\nWe compare $f$ with a constant on each interval of length $1$.\n\n1. If $n = 0$, all three expressions are $0$: the sums are empty and the interval $[a, a]$ is a point. From now on let $n \\ge 1$.\n2. Since $f$ is decreasing, it is monotone. So $f$ is [[Riemann integrable|04YKAYDQPW]] on $[a, a+n]$ and on each subinterval, in the sense of the [[Riemann integral|0QM4TXT3DR]].\n3. By [[additivity of the integral over intervals|05RCDKHZM6]], applied $n - 1$ times,\n$$\\int_a^{a+n} f(x)\\, dx = \\sum_{i=1}^{n} \\int_{a+i-1}^{a+i} f(x)\\, dx.$$\n4. Let $1 \\le i \\le n$ and $x \\in [a+i-1, a+i]$. Since $f$ is decreasing, $f(a+i) \\le f(x) \\le f(a+i-1)$.\n5. The integral of a constant $c$ over an interval of length $1$ is $c$. By [[monotonicity of the integral|0MBWQKM8QR]] and step 4,\n$$f(a+i) \\le \\int_{a+i-1}^{a+i} f(x)\\, dx \\le f(a+i-1).$$\n6. Add the inequalities of step 5 over $i = 1, \\dots, n$ and use step 3. This gives\n$$\\sum_{i=1}^{n} f(a+i) \\le \\int_a^{a+n} f(x)\\, dx \\le \\sum_{i=1}^{n} f(a+i-1) = \\sum_{i=0}^{n-1} f(a+i).$$\n\n## Idea\n\nOn each interval $[a+i-1, a+i]$ of length $1$, a decreasing function lies between its value at the right end and its value at the left end. Integrating gives the bounds on each piece, and adding the pieces gives the two sums.\n",
  "commit": "4a3290d299c8b2cd6493fce2296920ba7f82d942",
  "front": {
    "kind": "proof",
    "msc": [
      "26A42"
    ],
    "name": "Proof of the comparison of a series and an integral",
    "proves": "069HKV4X1E",
    "sources": [
      {
        "locator": "Proof",
        "url": "https://en.wikipedia.org/wiki/Integral_test_for_convergence"
      }
    ],
    "tag": "NQN8PB7V34",
    "uses": [
      "0QM4TXT3DR",
      "04YKAYDQPW",
      "05RCDKHZM6",
      "0MBWQKM8QR"
    ]
  },
  "kind": "proof",
  "link": "https://math2.tamnd.com/node/NQN8PB7V34/",
  "links": [
    {
      "field": "proves",
      "target": "069HKV4X1E"
    },
    {
      "field": "uses",
      "target": "0QM4TXT3DR"
    },
    {
      "field": "uses",
      "target": "04YKAYDQPW"
    },
    {
      "field": "uses",
      "target": "05RCDKHZM6"
    },
    {
      "field": "uses",
      "target": "0MBWQKM8QR"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/NQN8PB7V34.md",
  "msc": [
    "26A42"
  ],
  "name": "Proof of the comparison of a series and an integral",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/NQN/NQN8PB7V34.md",
  "status": null,
  "tag": "NQN8PB7V34",
  "uri": "m2://NQN8PB7V34",
  "url": "https://math2.tamnd.com/wiki/proof-of-the-comparison-of-a-series-and-an-integral/",
  "writing": {
    "tag": "NQN8PB7V34",
    "kind": "proof",
    "level": "W0",
    "next": [
      {
        "what": "an inventory row",
        "note": "the row of the inventory that the node accounts for",
        "have": 0,
        "want": 1
      }
    ]
  }
}
