The Lumber Room

"Consign them to dust and damp by way of preserving them"

Archive for March 2013

The power series for sin and cos

with one comment

There are many ways to derive the power series of \sin x and \cos x using the machinery of Taylor series etc., but below is another elementary way of demonstrating that the well-known power series expansions are the right ones. The argument below is from Tristan Needham’s Visual Complex Analysis, which I’m reproducing without looking at the book just to convince myself that I’ve internalized it correctly.

So: let
\displaystyle  \begin{aligned}   P(x) &= x - \frac{x^3}{3!} + \frac{x^5}{5!} - \frac{x^7}{7!} + \dots \quad \text{ and }\\  Q(x) &= 1 - \frac{x^2}{2!} + \frac{x^4}{4!} - \frac{x^6}{6!} + \dots .  \end{aligned}

We will take the following two for granted (both can be proved with some effort):

  1. Both power series are convergent.
  2. The power series can be differentiated term-wise.

As suggested by (2) above, the first thing we observe is that \frac{d}{dx}P(x) = Q(x) and \frac{d}{dx}Q(x) = -P(x).


So firstly:
\begin{aligned}  \frac{d}{dx}(P(x)^2 + Q(x)^2)   &= 2P(x)P'(x) + 2Q(x)Q'(x) \\  &= 2P(x)Q(x) - 2Q(x)P(x) \\  &= 0  \end{aligned}
which means that P(x)^2 + Q(x)^2 is a constant and does not vary with x. Putting x = 0 shows that P(0) = 0 and Q(0) = 1, so P(x)^2 + Q(x)^2 = 1 for all x.


Secondly, define the angle \theta as a function of x, by \tan \theta(x) = P(x)/Q(x). (To be precise, this defines \theta(x) up to a multiple of \pi, i.e. modulo \pi.)
Differentiating the left-hand side of this definition gives
\displaystyle \begin{aligned}  \frac{d}{dx} \tan \theta(x)   &= (1 + \tan^2 \theta(x)) \theta'(x) \\  &= (1 + \frac{P(x)^2}{Q(x)^2}) \theta'(x) \\  &= \frac{1}{Q(x)^2} \theta'(x)   \end{aligned}
(where \theta'(x) means \frac{d}{dx} \theta(x))
while differentiating the right-hand side gives
\displaystyle \begin{aligned}  \frac{d}{dx} \frac{P(x)}{Q(x)}   &= \frac{Q(x)P'(x) - P(x)Q'(x)}{Q(x)^2} \\  &= \frac{Q(x)Q(x) + P(x)P(x)}{Q(x)^2} \\  &= \frac{1}{Q(x)^2}  \end{aligned}

The necessary equality of the two tells us that \frac{d}{dx}\theta(x) = 1, which along with the initial condition \tan \theta(0) = P(0)/Q(0) = 0 = \tan 0 that says \theta(0) \equiv 0 \mod \pi, gives \theta(x) = x (or to be precise, \theta(x) \equiv x \pmod {\pi}).


In other words, we have shown that the power series P(x) and Q(x) satisfy \frac{P(x)}{Q(x)} = \tan x = \frac{\sin x}{\cos x} and therefore P(x) = k \sin x and Q(x) = k \cos x for some k. The observation that Q(0) = 1 = \cos 0 (or our earlier observation that P(x)^2 + Q(x)^2 = 1 for all x) gives k = 1, thereby showing that P(x) = \sin x and Q(x) = \cos x.


So much for \sin x and \cos x. Just as an aside, observe that if we take i to be a symbol satisfying i^2 = -1, then
\displaystyle \begin{aligned}  \cos x + i\sin x   &= Q(x) + iP(x) \\  &= \left(1 - \frac{x^2}{2!} + \frac{x^4}{4!} - \frac{x^6}{6!} + \dots\right) + i\left(x - \frac{x^3}{3!} + \frac{x^5}{5!} - \frac{x^7}{7!} + \dots \right) \\  &= 1 + ix + \frac{-x^2}{2!} + \frac{-ix^3}{3!} + \frac{x^4}{4!} + \frac{ix^5}{5!} + \frac{-x^6}{6!} + \frac{-ix^7}{7!} + \dots \\  &= 1 + ix + \frac{(ix)^2}{2!} + \frac{(ix)^3}{3!} + \frac{(ix)^4}{4!} + \frac{(ix)^5}{5!} + \frac{(ix)^6}{6!} + \frac{(ix)^7}{7!} + \dots  \end{aligned}
the right hand side of which looks very much like the result of “substituting” y = ix in the known (real) power series
\displaystyle e^y = 1 + y + \frac{y^2}{2!} + \frac{y^3}{3!} + \dots
(which itself can be proved using the term-wise differentiation above and the defining property \frac{d}{dx} e^x = e^x, say).

So this is one heuristic justification for us to define e^{ix} = \cos x + i\sin x.
Or, if we define e^{ix} as the result of substituting ix in the real power series for e^y, this proves that e^{ix} = \cos x + i\sin x.

Advertisement

Written by S

Fri, 2013-03-08 at 00:33:12

Posted in mathematics