{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Proof\n\nWe compare the integrals $I_n = \\int_0^{\\pi/2} \\sin^n x \\, dx$ for even and odd $n$, and use the squeeze theorem.\n\n1. Let $\\sin$ and $\\cos$ be the [[sine and cosine|0WB57D9488]], and let $\\pi$ be the [[number pi|0C1VYVNV2N]]. So $\\pi/2$ is the only zero of $\\cos$ in $[0, 2]$.\n2. From the series, $\\sin 0 = 0$ and $\\cos 0 = 1$. By the [[derivative of sine|00R4MWW532]] and of [[cosine|0V2DV29EGT]], both functions are differentiable on $\\R$. So they are [[continuous|07ZMX4ANJS]].\n3. Claim: $\\cos x \u003e 0$ for $0 \\le x \u003c \\pi/2$. Otherwise $\\cos x \\le 0$ for such an $x$, and $x \u003e 0$ since $\\cos 0 = 1$.\n4. Then the [[intermediate value theorem|00KAFBR32E]] on $[0, x]$ gives $c \\in [0, x]$ with $\\cos c = 0$. But $c \\le x \u003c \\pi/2 \\le 2$, so $c$ is a zero of $\\cos$ in $[0, 2]$ other than $\\pi/2$. This contradicts step 1, so the claim holds.\n5. By steps 3 and 1, $\\sin' = \\cos \\ge 0$ on $[0, \\pi/2]$. So $\\sin$ is [[increasing|026BJBQNGJ]] on $[0, \\pi/2]$, and $\\sin x \\ge \\sin 0 = 0$ there.\n6. By the [[Pythagorean identity|03H7WZ4T3K]], $\\sin^2 x \\le 1$. With step 5, $0 \\le \\sin x \\le 1$ for $x \\in [0, \\pi/2]$.\n7. For $n \\ge 0$, the function $\\sin^n$ is continuous, as a [[product of continuous functions|0VGMHCF4SC]] (with $\\sin^0 = 1$). So it is [[Riemann integrable|06SESV7GQY]] on $[0, \\pi/2]$, and $I_n$ is defined.\n8. Reduction formula. Let $n \\ge 2$, $u(x) = \\sin^{n-1} x$ and $v(x) = -\\cos x$. By the [[chain rule|0RXX2PT1MQ]], the [[power rule|0JZGW75C5Z]] and the [[constant multiple rule|0Z9JB71BS0]], $u'(x) = (n-1) \\sin^{n-2} x \\cos x$ and $v'(x) = \\sin x$.\n9. These derivatives are continuous, by step 2 and the continuity of products used in step 7. So [[integration by parts|08Y1BBQTK9]] on $[0, \\pi/2]$ applies:\n$$I_n = \\int_0^{\\pi/2} u v' \\, dx = u(\\tfrac{\\pi}{2}) v(\\tfrac{\\pi}{2}) - u(0) v(0) + (n - 1) \\int_0^{\\pi/2} \\sin^{n-2} x \\cos^2 x \\, dx.$$\n10. The boundary terms vanish, since $v(\\pi/2) = -\\cos(\\pi/2) = 0$, and $u(0) = 0$ because $n - 1 \\ge 1$.\n11. Replace $\\cos^2 x$ by $1 - \\sin^2 x$ and use the [[linearity of the integral|080RWVVSB6]]. This gives $I_n = (n-1)(I_{n-2} - I_n)$, so $n I_n = (n - 1) I_{n-2}$ for $n \\ge 2$.\n12. By the [[integral of a power|0Q3HYFT9RQ]] with exponent $0$, $I_0 = \\pi/2$. By the [[integral of sine|0GXCXCX3QN]], $I_1 = \\cos 0 - \\cos(\\pi/2) = 1$.\n13. By induction on $n$ with step 11, for all $n \\ge 0$,\n$$I_{2n} = \\frac{\\pi}{2} \\prod_{k=1}^{n} \\frac{2k - 1}{2k}, \\qquad I_{2n+1} = \\prod_{k=1}^{n} \\frac{2k}{2k + 1}.$$\nThe case $n = 0$ is step 12. The step from $n$ to $n + 1$ multiplies by $\\frac{2n+1}{2n+2}$ and by $\\frac{2n+2}{2n+3}$.\n14. By step 13, every $I_n$ is a product of positive numbers, so $I_n \u003e 0$.\n15. By step 6, $0 \\le \\sin^{n+1} x \\le \\sin^n x$ on $[0, \\pi/2]$. By the [[monotonicity of the integral|0MBWQKM8QR]], $I_{n+1} \\le I_n$ for all $n \\ge 0$.\n16. Let $n \\ge 1$. Step 15 gives $I_{2n+1} \\le I_{2n} \\le I_{2n-1}$. Step 11 with index $2n + 1$ gives $I_{2n-1} = \\frac{2n+1}{2n} I_{2n+1}$.\n17. Divide by $I_{2n} \u003e 0$. Then $r_n = I_{2n+1} / I_{2n}$ satisfies $\\frac{2n}{2n+1} \\le r_n \\le 1$.\n18. Let $P_n = \\prod_{k=1}^{n} \\frac{4k^2}{4k^2 - 1}$ be the partial products of the [[infinite product|RZ0Z2BTMT4]]. Since $4k^2 - 1 = (2k - 1)(2k + 1)$, step 13 gives\n$$r_n = \\frac{2}{\\pi} \\prod_{k=1}^{n} \\frac{2k}{2k+1} \\cdot \\frac{2k}{2k-1} = \\frac{2}{\\pi} P_n.$$\n19. By steps 17 and 18, $\\frac{\\pi}{2} \\left(1 - \\frac{1}{2n+1}\\right) \\le P_n \\le \\frac{\\pi}{2}$ for $n \\ge 1$.\n20. By the [[Archimedean property|0A74SX55QP]], $\\frac{1}{2n+1} \\to 0$. By the [[algebra of limits|07XBM3A9J5]], the lower bound in step 19 tends to $\\frac{\\pi}{2}$. The upper bound is the constant $\\frac{\\pi}{2}$.\n21. By the [[squeeze theorem|0XMF00T4XQ]], $P_n \\to \\frac{\\pi}{2}$. So the partial products of $\\prod_{n \\ge 1} \\frac{4n^2}{4n^2 - 1}$ converge to $\\pi/2$.\n\n## Idea\n\nThe integrals of $\\sin^n$ over $[0, \\pi/2]$ satisfy a simple recursion from integration by parts. So the even ones carry a factor $\\pi/2$, and the odd ones are rational. They decrease in $n$, and consecutive odd ones have ratio tending to $1$. So the ratio of an odd one to the neighbouring even one tends to $1$, and this ratio is $2/\\pi$ times a partial Wallis product.\n",
  "commit": "4a3290d299c8b2cd6493fce2296920ba7f82d942",
  "front": {
    "kind": "proof",
    "msc": [
      "11Y60"
    ],
    "name": "Proof of the Wallis product by integrals of powers of sine",
    "proves": "0XCYA4YERS",
    "sources": [
      {
        "locator": "Proof using integration",
        "url": "https://en.wikipedia.org/wiki/Wallis_product"
      }
    ],
    "tag": "YHN341V2E6",
    "uses": [
      "0WB57D9488",
      "0C1VYVNV2N",
      "00R4MWW532",
      "0V2DV29EGT",
      "07ZMX4ANJS",
      "00KAFBR32E",
      "026BJBQNGJ",
      "03H7WZ4T3K",
      "0VGMHCF4SC",
      "06SESV7GQY",
      "0RXX2PT1MQ",
      "0JZGW75C5Z",
      "0Z9JB71BS0",
      "08Y1BBQTK9",
      "080RWVVSB6",
      "0MBWQKM8QR",
      "0Q3HYFT9RQ",
      "0GXCXCX3QN",
      "0XMF00T4XQ",
      "0A74SX55QP",
      "07XBM3A9J5",
      "RZ0Z2BTMT4"
    ]
  },
  "kind": "proof",
  "link": "https://math2.tamnd.com/node/YHN341V2E6/",
  "links": [
    {
      "field": "proves",
      "target": "0XCYA4YERS"
    },
    {
      "field": "uses",
      "target": "0WB57D9488"
    },
    {
      "field": "uses",
      "target": "0C1VYVNV2N"
    },
    {
      "field": "uses",
      "target": "00R4MWW532"
    },
    {
      "field": "uses",
      "target": "0V2DV29EGT"
    },
    {
      "field": "uses",
      "target": "07ZMX4ANJS"
    },
    {
      "field": "uses",
      "target": "00KAFBR32E"
    },
    {
      "field": "uses",
      "target": "026BJBQNGJ"
    },
    {
      "field": "uses",
      "target": "03H7WZ4T3K"
    },
    {
      "field": "uses",
      "target": "0VGMHCF4SC"
    },
    {
      "field": "uses",
      "target": "06SESV7GQY"
    },
    {
      "field": "uses",
      "target": "0RXX2PT1MQ"
    },
    {
      "field": "uses",
      "target": "0JZGW75C5Z"
    },
    {
      "field": "uses",
      "target": "0Z9JB71BS0"
    },
    {
      "field": "uses",
      "target": "08Y1BBQTK9"
    },
    {
      "field": "uses",
      "target": "080RWVVSB6"
    },
    {
      "field": "uses",
      "target": "0MBWQKM8QR"
    },
    {
      "field": "uses",
      "target": "0Q3HYFT9RQ"
    },
    {
      "field": "uses",
      "target": "0GXCXCX3QN"
    },
    {
      "field": "uses",
      "target": "0XMF00T4XQ"
    },
    {
      "field": "uses",
      "target": "0A74SX55QP"
    },
    {
      "field": "uses",
      "target": "07XBM3A9J5"
    },
    {
      "field": "uses",
      "target": "RZ0Z2BTMT4"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/YHN341V2E6.md",
  "msc": [
    "11Y60"
  ],
  "name": "Proof of the Wallis product by integrals of powers of sine",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/YHN/YHN341V2E6.md",
  "status": null,
  "tag": "YHN341V2E6",
  "uri": "m2://YHN341V2E6",
  "url": "https://math2.tamnd.com/wiki/proof-of-the-wallis-product-by-integrals-of-powers-of-sine/",
  "writing": {
    "tag": "YHN341V2E6",
    "kind": "proof",
    "level": "W0",
    "next": [
      {
        "what": "an inventory row",
        "note": "the row of the inventory that the node accounts for",
        "have": 0,
        "want": 1
      }
    ]
  }
}
