{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Proof\n\nWe compare partial sums of the power series.\n\n1. A sequence $(u_N)$ of complex numbers converges to $u$ when $|u_N - u| \\to 0$, with $|\\cdot|$ the [[modulus|0KW2X0TFBX]].\nFor each complex $v$, $|\\operatorname{Re} v| \\le |v|$, $|\\operatorname{Im} v| \\le |v|$ and $|v| \\le |\\operatorname{Re} v| + |\\operatorname{Im} v|$.\nThese follow by squaring both sides, since $|v|^2 = (\\operatorname{Re} v)^2 + (\\operatorname{Im} v)^2$.\nSo $u_N \\to u$ holds exactly when $\\operatorname{Re} u_N \\to \\operatorname{Re} u$ and $\\operatorname{Im} u_N \\to \\operatorname{Im} u$.\n2. By step 1, rules for real limits carry over to complex sequences, part by part.\nSo [[limits of sums|0RAM4E07NR]] are sums of limits, and the same holds for [[products|0734RSVF2V]] with a constant.\nAlso, [[subsequences|0VHAVXW08V]] of a convergent sequence converge to the same limit.\n3. For complex $w$ and $M \\ge 0$, let $E_M(w) = \\sum_{k=0}^{M} w^k / k!$.\nBy the definition of the [[complex exponential|054VXHMCA3]], $E_M(w) \\to e^w$ as $M \\to \\infty$.\n4. Since [[$i^2 = -1$|07KBQCG9KV]], we get $i^{2n} = (-1)^n$ and $i^{2n+1} = (-1)^n i$ for each $n \\ge 0$.\nAlso $(i z)^k = i^k z^k$ and $(-i z)^k = (-1)^k i^k z^k$.\n5. Fix $z \\in \\C$. For $N \\ge 0$ let $C_N = \\sum_{n=0}^{N} (-1)^n \\dfrac{z^{2n}}{(2n)!}$ and $S_N = \\sum_{n=0}^{N} (-1)^n \\dfrac{z^{2n+1}}{(2n+1)!}$.\nThese are the partial sums of the power series of $\\cos z$ and $\\sin z$. Let $M = 2N + 1$.\n6. By step 4, $E_M(i z) + E_M(-i z) = \\sum_{k=0}^{M} \\bigl(1 + (-1)^k\\bigr) i^k z^k / k!$.\nThe terms with odd $k$ vanish, and the term with $k = 2n$ is $2 (-1)^n z^{2n} / (2n)!$. So the sum is $2 C_N$.\n7. In the same way, $E_M(i z) - E_M(-i z) = \\sum_{k=0}^{M} \\bigl(1 - (-1)^k\\bigr) i^k z^k / k!$.\nThe terms with even $k$ vanish, and the term with $k = 2n + 1$ is $2 (-1)^n i z^{2n+1} / (2n+1)!$. So the sum is $2 i S_N$.\n8. As $N \\to \\infty$, the sequences $E_{2N+1}(i z)$ and $E_{2N+1}(-i z)$ are subsequences of the sequences in step 3.\nBy step 2, they converge to $e^{i z}$ and $e^{-i z}$.\n9. By steps 6 to 8 and step 2, $C_N \\to \\dfrac{e^{i z} + e^{-i z}}{2}$ and $S_N \\to \\dfrac{e^{i z} - e^{-i z}}{2 i}$.\nSo the power series of $\\cos z$ and $\\sin z$ converge, and these limits are $\\cos z$ and $\\sin z$.\n10. Therefore\n$$\\cos z + i \\sin z = \\frac{e^{i z} + e^{-i z}}{2} + \\frac{e^{i z} - e^{-i z}}{2} = e^{i z}.$$\n\n## Idea\n\nThe powers of $i$ repeat with period four: $1, i, -1, -i$.\nSo in the series for $e^{i z}$ the even terms are real multiples of $z^{2n}$ and give $\\cos z$, while the odd terms give $i \\sin z$.\nAdding and subtracting the series for $e^{-iz}$ separates the two halves cleanly, so no rearrangement of an infinite series is needed.\n",
  "commit": "4a3290d299c8b2cd6493fce2296920ba7f82d942",
  "front": {
    "kind": "proof",
    "msc": [
      "33B10"
    ],
    "name": "Proof of Euler's formula by power series",
    "proves": "04R3CY41VJ",
    "sources": [
      {
        "locator": "Using power series",
        "url": "https://en.wikipedia.org/wiki/Euler%27s_formula"
      }
    ],
    "tag": "X4XV12DX48",
    "uses": [
      "054VXHMCA3",
      "0VARVQ9ZW1",
      "07KBQCG9KV",
      "0KW2X0TFBX",
      "0RAM4E07NR",
      "0734RSVF2V",
      "0VHAVXW08V"
    ]
  },
  "kind": "proof",
  "link": "https://math2.tamnd.com/node/X4XV12DX48/",
  "links": [
    {
      "field": "proves",
      "target": "04R3CY41VJ"
    },
    {
      "field": "uses",
      "target": "054VXHMCA3"
    },
    {
      "field": "uses",
      "target": "0VARVQ9ZW1"
    },
    {
      "field": "uses",
      "target": "07KBQCG9KV"
    },
    {
      "field": "uses",
      "target": "0KW2X0TFBX"
    },
    {
      "field": "uses",
      "target": "0RAM4E07NR"
    },
    {
      "field": "uses",
      "target": "0734RSVF2V"
    },
    {
      "field": "uses",
      "target": "0VHAVXW08V"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/X4XV12DX48.md",
  "msc": [
    "33B10"
  ],
  "name": "Proof of Euler's formula by power series",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/X4X/X4XV12DX48.md",
  "status": null,
  "tag": "X4XV12DX48",
  "uri": "m2://X4XV12DX48",
  "url": "https://math2.tamnd.com/wiki/proof-of-eulers-formula-by-power-series/",
  "writing": {
    "tag": "X4XV12DX48",
    "kind": "proof",
    "level": "W0",
    "next": [
      {
        "what": "an inventory row",
        "note": "the row of the inventory that the node accounts for",
        "have": 0,
        "want": 1
      }
    ]
  }
}
