{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Proof\n\nWe show that $b \\mapsto \\int_a^b f$ is increasing and bounded, so it has a limit by the completeness of $\\R$.\n\n1. For $b \u003e a$, let $F(b) = \\int_a^b f(x) \\, dx$ and $G(b) = \\int_a^b g(x) \\, dx$. They exist by hypothesis.\n2. If $h \\colon [c, d] \\to \\R$ is Riemann integrable with $h \\ge 0$, then $\\int_c^d h \\ge 0$. Indeed, the [[linearity of the integral|080RWVVSB6]] gives $\\int_c^d 0 \\, dx = 0 \\cdot \\int_c^d h = 0$. Then the [[monotonicity of the integral|0MBWQKM8QR]] gives $\\int_c^d h \\ge 0$.\n3. $F$ is increasing. Let $a \u003c b \u003c b'$. By the [[additivity over intervals|05RCDKHZM6]], $F(b') = F(b) + \\int_b^{b'} f$. By step 2 and $f \\ge 0$, $F(b') \\ge F(b)$. In the same way, $G$ is increasing.\n4. For $b \u003e a$, $F(b) \\le G(b)$, by the monotonicity of the integral and $f \\le g$ on $[a, b]$.\n5. Now assume that $\\int_a^\\infty g$ converges. By the definition of the [[improper integral|0VCTBJMEJF]], $G(b) \\to L$ as $b \\to \\infty$, where $L = \\int_a^\\infty g(x) \\, dx$.\n6. Claim: $G(b) \\le L$ for all $b \u003e a$. Suppose that $G(b_0) \u003e L$ for some $b_0 \u003e a$, and let $\\varepsilon = G(b_0) - L \u003e 0$.\n7. By the definition of the [[limit at infinity|0Y12QYTJK3]], there is $M$ with $\\abs{G(b) - L} \u003c \\varepsilon$ for all $b \u003e M$.\n8. Take $b \u003e \\max(M, b_0)$. By step 3, $G(b) \\ge G(b_0) = L + \\varepsilon$. So $G(b) - L \\ge \\varepsilon$, which contradicts step 7. This proves the claim.\n9. By steps 4 and 6, $F(b) \\le L$ for all $b \u003e a$. So the set $S = \\set{F(b) : b \u003e a}$ is nonempty and bounded above by $L$.\n10. Let $s$ be the [[supremum|0BTMQ04556]] of $S$. It exists by the [[completeness axiom|0AXWET80YW]]. Since $L$ is an upper bound of $S$, $s \\le L$.\n11. Claim: $F(b) \\to s$ as $b \\to \\infty$. Let $\\varepsilon \u003e 0$. By the [[approximation property of the supremum|0M8TGGP9JP]], there is $b_1 \u003e a$ with $s - \\varepsilon \u003c F(b_1) \\le s$.\n12. For $b \u003e b_1$, step 3 and the definition of $s$ give $s - \\varepsilon \u003c F(b_1) \\le F(b) \\le s$. So $\\abs{F(b) - s} \u003c \\varepsilon$ for all $b \u003e b_1$, which proves the claim.\n13. By step 11, $\\int_a^\\infty f(x) \\, dx$ converges and equals $s$. By step 10, $\\int_a^\\infty f(x) \\, dx = s \\le L = \\int_a^\\infty g(x) \\, dx$.\n14. Finally, assume that $\\int_a^\\infty f$ diverges. If $\\int_a^\\infty g$ converged, then steps 5 to 13 would show that $\\int_a^\\infty f$ converges. So $\\int_a^\\infty g$ diverges.\n\n## Idea\n\nFor a nonnegative function, the integral up to $b$ can only grow as $b$ grows. If it stays below a fixed bound, it must settle at its supremum, by the completeness of the real numbers. The convergent integral of the larger function provides this bound.\n",
  "commit": "68a8c3dc73fd55004b2796431c607c30960d1a85",
  "front": {
    "kind": "proof",
    "msc": [
      "40A10"
    ],
    "name": "Proof of the comparison test for improper integrals",
    "proves": "0FR1BDKK10",
    "sources": [
      {
        "locator": "Lemma 2 and proof of Theorem 1",
        "url": "https://www.macmillanlearning.com/studentresources/highschool/mathematics/rogawskiapet2e/additional_proofs/proof_of_comparison_test_for_improper_integrals.pdf"
      }
    ],
    "tag": "W9T63J9RF3",
    "uses": [
      "0VCTBJMEJF",
      "0Y12QYTJK3",
      "05RCDKHZM6",
      "0MBWQKM8QR",
      "080RWVVSB6",
      "0BTMQ04556",
      "0AXWET80YW",
      "0M8TGGP9JP"
    ]
  },
  "kind": "proof",
  "link": "https://math2.tamnd.com/node/W9T63J9RF3/",
  "links": [
    {
      "field": "proves",
      "target": "0FR1BDKK10"
    },
    {
      "field": "uses",
      "target": "0VCTBJMEJF"
    },
    {
      "field": "uses",
      "target": "0Y12QYTJK3"
    },
    {
      "field": "uses",
      "target": "05RCDKHZM6"
    },
    {
      "field": "uses",
      "target": "0MBWQKM8QR"
    },
    {
      "field": "uses",
      "target": "080RWVVSB6"
    },
    {
      "field": "uses",
      "target": "0BTMQ04556"
    },
    {
      "field": "uses",
      "target": "0AXWET80YW"
    },
    {
      "field": "uses",
      "target": "0M8TGGP9JP"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/W9T63J9RF3.md",
  "msc": [
    "40A10"
  ],
  "name": "Proof of the comparison test for improper integrals",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/W9T/W9T63J9RF3.md",
  "status": null,
  "tag": "W9T63J9RF3",
  "uri": "m2://W9T63J9RF3",
  "url": "https://math2.tamnd.com/wiki/proof-of-the-comparison-test-for-improper-integrals/",
  "writing": {
    "tag": "W9T63J9RF3",
    "kind": "proof",
    "level": "W0",
    "next": [
      {
        "what": "an inventory row",
        "note": "the row of the inventory that the node accounts for",
        "have": 0,
        "want": 1
      }
    ]
  }
}
