Chapter X · The general theory of the logarithmic, exponential and circular functions

The power series for cos z and sin z

§243 30 min

The cosine and sine series hold for every complex z, and with them the series become a tool for proving identities, bounding values and summing other series.

Why this matters

§238 defined cos⁡z\cos z and sin⁡z\sin z through the exponential, and §242 expanded the exponential in a power series. Putting the two together, §243 obtains the familiar series for cosine and sine, now valid for every complex zz. The examples that follow show what this buys: inequalities for ∣cos⁡z∣|\cos z| and ∣sin⁡z∣|\sin z|, combinatorial identities by comparing coefficients, and closed forms for series such as ∑cos⁡nz/n!\sum \cos nz/n!.

The idea

cos⁡z\cos z is the average of exp⁡(iz)\exp(iz) and exp⁡(−iz)\exp(-iz). Write both as series: the terms of exp⁡(iz)\exp(iz) are (iz)n/n!(iz)^n/n!, and those of exp⁡(−iz)\exp(-iz) are (−iz)n/n!(-iz)^n/n!. For even nn they are equal; for odd nn they are opposite. So in the average the odd terms cancel and the even ones survive, with i2m=(−1)mi^{2m} = (-1)^m. That is the cosine series. The sine is the same with the roles of even and odd exchanged.

The pictures are telling. On the imaginary axis, z=iyz = iy, every term of the cosine series is (−1)m(iy)2m/(2m)!=y2m/(2m)!(-1)^m (iy)^{2m}/(2m)! = y^{2m}/(2m)!: real and positive. The partial sums march steadily along the real axis to cosh⁡y\cosh y, with no cancellation at all, which is why cos⁡z\cos z is large off the real axis.

Explore Partial sums of the cosine and sine series

Try this. Start with cos⁡z\cos z at the given zz and add terms. Then drag zz onto the imaginary axis, say z=2iz = 2i, and watch the direction of the steps. Switch to sin⁡z\sin z at z=2iz = 2i and at a real zz such as z=3z = 3.

1−z22!+z44!−⋯  →  cos⁡z1 - \frac{z^2}{2!} + \frac{z^4}{4!} - \cdots \;\to\; \cos z
ReIm
  • z (drag it)
  • partial sums sₖ, one side per term
  • the sum
Series
z=1.4+1.2iz = 1.4 + 1.2i, ∣z∣=1.84|z| = 1.84. Partial sum: 0.74−1.68i0.74 - 1.68i. Sum: 0.30775−1.4875i0.30775 - 1.4875i; distance 0.4730.473. Next term has modulus 0.4820.482.
What to notice

Successive steps of the cosine series turn by 2am⁡z+π2\operatorname{am} z + \pi (each is the previous one times −z2/{(2m+1)(2m+2)}-z^2/\{(2m+1)(2m+2)\}), and their lengths soon shrink. At z=2iz = 2i all the steps of the cosine series point the same way, to the right: cos⁡2i=cosh⁡2≈3.76\cos 2i = \cosh 2 \approx 3.76. For sin⁡\sin at z=2iz = 2i they all point up, to sin⁡2i=isinh⁡2\sin 2i = i\sinh 2. On the real axis the steps alternate in direction and largely cancel, which is why ∣cos⁡x∣≤1|\cos x| \le 1 there.

Precise statements

Theorem The cosine and sine series Hardy: §243

For every complex zz,

cos⁡z=1−z22!+z44!−⋯=∑m=0∞(−1)mz2m(2m)!,sin⁡z=z−z33!+z55!−⋯=∑m=0∞(−1)mz2m+1(2m+1)!,\cos z = 1 - \frac{z^2}{2!} + \frac{z^4}{4!} - \cdots = \sum_{m=0}^\infty (-1)^m\frac{z^{2m}}{(2m)!}, \qquad \sin z = z - \frac{z^3}{3!} + \frac{z^5}{5!} - \cdots = \sum_{m=0}^\infty (-1)^m\frac{z^{2m+1}}{(2m+1)!},

both series being absolutely convergent. Likewise cosh⁡z=∑z2m/(2m)!\cosh z = \sum z^{2m}/(2m)! and sinh⁡z=∑z2m+1/(2m+1)!\sinh z = \sum z^{2m+1}/(2m+1)!.

Corollary Taylor's series for cos and sin everywhere Hardy: Examples XCVII, 11

The expansions cos⁡(x+h)=cos⁡x−hsin⁡x−h22!cos⁡x+h33!sin⁡x+⋯\cos(x + h) = \cos x - h\sin x - \tfrac{h^2}{2!}\cos x + \tfrac{h^3}{3!}\sin x + \cdots and sin⁡(x+h)=sin⁡x+hcos⁡x−h22!sin⁡x−⋯\sin(x + h) = \sin x + h\cos x - \tfrac{h^2}{2!}\sin x - \cdots of §152 hold for all complex xx and hh.

Proofs

Proof The cosine and sine series
Strategy

Substitute the exponential series for exp⁡(iz)\exp(iz) and exp⁡(−iz)\exp(-iz) into the definitions of §238, and add or subtract term by term, which is allowed for convergent series.

The two series

By §242, exp⁡(iz)=∑ninzn/n!\exp(iz) = \sum_{n} i^n z^n/n! and exp⁡(−iz)=∑n(−i)nzn/n!\exp(-iz) = \sum_n (-i)^n z^n/n!, both absolutely convergent.

Cosine

cos⁡z=12{exp⁡(iz)+exp⁡(−iz)}=∑n12{in+(−i)n}znn!\cos z = \tfrac12\{\exp(iz) + \exp(-iz)\} = \sum_n \tfrac12\{i^n + (-i)^n\}\dfrac{z^n}{n!}. For odd nn the bracket is 00; for n=2mn = 2m it is 12⋅2i2m=(−1)m\tfrac12 \cdot 2 i^{2m} = (-1)^m.

Sine

sin⁡z=−12i{exp⁡(iz)−exp⁡(−iz)}=∑n−12i{in−(−i)n}znn!\sin z = -\tfrac12 i\{\exp(iz) - \exp(-iz)\} = \sum_n -\tfrac12 i\{i^n - (-i)^n\}\dfrac{z^n}{n!}. For even nn the bracket is 00; for n=2m+1n = 2m + 1 it is −12i⋅2i2m+1=−i2m+2=(−1)m-\tfrac12 i \cdot 2i^{2m+1} = -i^{2m+2} = (-1)^m.

Absolute convergence and the hyperbolic functions

Each series is dominated termwise by ∑∣z∣n/n!\sum |z|^n/n!. For cosh⁡\cosh and sinh⁡\sinh do the same with exp⁡(z)\exp(z) and exp⁡(−z)\exp(-z), where no powers of ii appear.

Proof Taylor's series everywhere
Strategy

Use the addition formulae (§238), which hold for complex arguments, and then expand cos⁡h\cos h and sin⁡h\sin h by the theorem.

Addition formula

cos⁡(x+h)=cos⁡xcos⁡h−sin⁡xsin⁡h\cos(x + h) = \cos x\cos h - \sin x\sin h for all complex xx, hh.

Expand in hh

Insert the series for cos⁡h\cos h and sin⁡h\sin h and multiply by the constants cos⁡x\cos x, sin⁡x\sin x: cos⁡(x+h)=cos⁡x (1−h22!+⋯ )−sin⁡x (h−h33!+⋯ )\cos(x + h) = \cos x\,(1 - \tfrac{h^2}{2!} + \cdots) - \sin x\,(h - \tfrac{h^3}{3!} + \cdots). Merging the two convergent series term by term gives the stated expansion. The sine is similar.

Worked examples and exercises

Exercise Bounds from the series ●○○ Hardy: Examples XCVII, 1–2

Show that ∣cos⁡z∣≤cosh⁡∣z∣|\cos z| \le \cosh|z| and ∣sin⁡z∣≤sinh⁡∣z∣|\sin z| \le \sinh|z|. Deduce that if ∣z∣<1|z| < 1 then ∣cos⁡z∣<2|\cos z| < 2 and ∣sin⁡z∣<65∣z∣|\sin z| < \tfrac65|z|.

Hint
Take moduli term by term. For the second part, sinh⁡1≈1.1752\sinh 1 \approx 1.1752.

Solution

∣cos⁡z∣≤∑∣z∣2m/(2m)!=cosh⁡∣z∣|\cos z| \le \sum |z|^{2m}/(2m)! = \cosh|z|, and similarly for sin⁡\sin. If ∣z∣<1|z| < 1: ∣cos⁡z∣≤cosh⁡∣z∣<cosh⁡1≈1.543<2|\cos z| \le \cosh|z| < \cosh 1 \approx 1.543 < 2. And ∣sin⁡z∣≤sinh⁡∣z∣=∣z∣(1+∣z∣23!+∣z∣45!+⋯ )<∣z∣(1+13!+15!+⋯ )=∣z∣sinh⁡1<65∣z∣|\sin z| \le \sinh|z| = |z|\bigl(1 + \tfrac{|z|^2}{3!} + \tfrac{|z|^4}{5!} + \cdots\bigr) < |z|\bigl(1 + \tfrac1{3!} + \tfrac1{5!} + \cdots\bigr) = |z|\sinh 1 < \tfrac65|z| (for z≠0z \ne 0).

Exercise An identity by comparing coefficients ●●○ Hardy: Examples XCVII, 3

From sin⁡2z=2sin⁡zcos⁡z\sin 2z = 2\sin z\cos z, by multiplying the series and comparing coefficients of z2n+1z^{2n+1}, prove

(2n+11)+(2n+13)+⋯+(2n+12n+1)=22n.\binom{2n+1}{1} + \binom{2n+1}{3} + \cdots + \binom{2n+1}{2n+1} = 2^{2n}.
Hint
Coefficients of equal convergent power series are equal (§201). The coefficient of z2n+1z^{2n+1} in sin⁡2z\sin 2z is (−1)n22n+1/(2n+1)!(-1)^n 2^{2n+1}/(2n+1)!.
Solution

In 2sin⁡zcos⁡z=2(∑j(−1)jz2j+1(2j+1)!)(∑k(−1)kz2k(2k)!)2\sin z\cos z = 2\bigl(\sum_j (-1)^j\tfrac{z^{2j+1}}{(2j+1)!}\bigr)\bigl(\sum_k (-1)^k\tfrac{z^{2k}}{(2k)!}\bigr), the coefficient of z2n+1z^{2n+1} is 2(−1)n∑j+k=n1(2j+1)!(2k)!=2(−1)n(2n+1)!∑j=0n(2n+12j+1)2(-1)^n\sum_{j + k = n}\dfrac{1}{(2j+1)!(2k)!} = \dfrac{2(-1)^n}{(2n+1)!}\sum_{j=0}^{n}\binom{2n+1}{2j+1}. Equating with (−1)n22n+1/(2n+1)!(-1)^n 2^{2n+1}/(2n+1)! gives ∑j(2n+12j+1)=22n\sum_j\binom{2n+1}{2j+1} = 2^{2n}.

Check by the binomial theorem: (1+1)2n+1=∑k(2n+1k)(1 + 1)^{2n+1} = \sum_k\binom{2n+1}{k} and (1−1)2n+1=∑k(−1)k(2n+1k)=0(1 - 1)^{2n+1} = \sum_k(-1)^k\binom{2n+1}{k} = 0. Subtracting, twice the sum of the odd-index coefficients is 22n+12^{2n+1}.

Exercise Expanding sin² z ●○○ Hardy: Examples XCVII, 6

Expand sin⁡2z\sin^2 z and sin⁡3z\sin^3 z in powers of zz.

Hint
sin⁡2z=12(1−cos⁡2z)\sin^2 z = \tfrac12(1 - \cos 2z) and sin⁡3z=14(3sin⁡z−sin⁡3z)\sin^3 z = \tfrac14(3\sin z - \sin 3z).

Solution

sin⁡2z=12−12∑m(−1)m(2z)2m(2m)!=∑m≥1(−1)m+122m−1z2m(2m)!=z2−z43+2z645−⋯\sin^2 z = \tfrac12 - \tfrac12\sum_m (-1)^m\dfrac{(2z)^{2m}}{(2m)!} = \sum_{m \ge 1}(-1)^{m+1}\dfrac{2^{2m-1}z^{2m}}{(2m)!} = z^2 - \dfrac{z^4}{3} + \dfrac{2z^6}{45} - \cdots.

sin⁡3z=14∑m(−1)m(3−32m+1)z2m+1(2m+1)!\sin^3 z = \tfrac14\sum_m (-1)^m\dfrac{(3 - 3^{2m+1})z^{2m+1}}{(2m+1)!}; the m=0m = 0 term vanishes, and the next ones give z3−12z5+⋯z^3 - \tfrac12 z^5 + \cdots (for m=1m = 1: 14⋅(−1)(3−27)/6=1\tfrac14 \cdot (-1)(3 - 27)/6 = 1; for m=2m = 2: 14(3−243)/120=−12\tfrac14(3 - 243)/120 = -\tfrac12).

Exercise Summing a series of cosines ●●○ Hardy: Examples XCVII, 7

Show that, for all complex zz,

1+cos⁡z1!+cos⁡2z2!+⋯=exp⁡(cos⁡z)cos⁡(sin⁡z),sin⁡z1!+sin⁡2z2!+⋯=exp⁡(cos⁡z)sin⁡(sin⁡z).1 + \frac{\cos z}{1!} + \frac{\cos 2z}{2!} + \cdots = \exp(\cos z)\cos(\sin z), \qquad \frac{\sin z}{1!} + \frac{\sin 2z}{2!} + \cdots = \exp(\cos z)\sin(\sin z).
Hint
Call the sums CC and SS and look at C+iSC + iS and C−iSC - iS.
Solution

Since cos⁡nz+isin⁡nz=exp⁡(inz)={exp⁡(iz)}n\cos nz + i\sin nz = \exp(inz) = \{\exp(iz)\}^n, we get C+iS=∑n{exp⁡(iz)}n/n!=exp⁡{exp⁡(iz)}C + iS = \sum_n \{\exp(iz)\}^n/n! = \exp\{\exp(iz)\}, and likewise C−iS=exp⁡{exp⁡(−iz)}C - iS = \exp\{\exp(-iz)\} (all series converge absolutely). Now exp⁡(±iz)=cos⁡z±isin⁡z\exp(\pm iz) = \cos z \pm i\sin z, so by the addition theorem C±iS=exp⁡(cos⁡z)exp⁡(±isin⁡z)C \pm iS = \exp(\cos z)\exp(\pm i\sin z). Adding and subtracting: C=exp⁡(cos⁡z)cos⁡(sin⁡z)C = \exp(\cos z)\cos(\sin z) and S=exp⁡(cos⁡z)sin⁡(sin⁡z)S = \exp(\cos z)\sin(\sin z), using the definitions of cosine and sine of the complex number sin⁡z\sin z.

Check yourself

Check yourself Enter a number

Compute cos⁡2i\cos 2i.

Why

Every term of the series is positive: cos⁡2i=1+42!+164!+⋯=cosh⁡2≈3.7622\cos 2i = 1 + \tfrac{4}{2!} + \tfrac{16}{4!} + \cdots = \cosh 2 \approx 3.7622.

Check yourself Choose one

Why does the cosine series contain only even powers of zz?

Why

The nn-th terms of the two series are inzn/n!i^n z^n/n! and (−i)nzn/n!(-i)^n z^n/n!, which are opposite for odd nn. (cos⁡z\cos z is not real in general, and the odd derivatives of cos⁡\cos vanish at 00, not everywhere.) Equivalently: cos⁡\cos is an even function.

Check yourself True or false?

The series z−z3/3!+⋯z - z^3/3! + \cdots converges only for ∣z∣<π|z| < \pi, the distance to the nearest zero of sin⁡\sin other than 00.

Why

False. It converges for every zz: its terms are dominated by those of ∑∣z∣n/n!\sum |z|^n/n!. Zeros do not limit the radius of convergence; only points where the function misbehaves (such as the pole of 1/(1+z)1/(1 + z) at −1-1) do.

Hardy’s language

Summary

Summary
  • cos⁡z=∑(−1)mz2m/(2m)!\cos z = \sum (-1)^m z^{2m}/(2m)! and sin⁡z=∑(−1)mz2m+1/(2m+1)!\sin z = \sum (-1)^m z^{2m+1}/(2m+1)! for every complex zz: average or difference of two exponential series.
  • On the imaginary axis the terms do not alternate, which is why cos⁡iy=cosh⁡y\cos iy = \cosh y is large.
  • Term-by-term moduli give ∣cos⁡z∣≤cosh⁡∣z∣|\cos z| \le \cosh|z|, ∣sin⁡z∣≤sinh⁡∣z∣|\sin z| \le \sinh|z|.
  • Comparing coefficients turns trigonometric identities into combinatorial ones; ∑cos⁡nz/n!=exp⁡(cos⁡z)cos⁡(sin⁡z)\sum \cos nz/n! = \exp(\cos z)\cos(\sin z).