Summoning Cthulhu: sin^2 + cos^2 with power series

I would like to dedicate this post to the Redditor AlanCrowe. When I claimed that working out the formula \mbox{sin}^2 + \mbox{cos}^2 = 1 using power series wouldn’t be that big of a deal, he said that this was “a rash thing to do” and that I would “end up summoning Cthulhu doing weird shit like that.”

How could I resist such a dare? The following manipulations contain no real mysteries; they are all direct applications of the binomial theorem and the distributive law. There is a small but transparent trick using complex numbers, which can be eliminated at the expense of more combinatorial footwork.

Disclaimer: Be careful working with power series. Power series may carry high voltages. Improper handling of power series may result in extreme divergence or serious mental anguish. Power series have no remorse. Do not taunt power series. If the double summations make you queasy, go for a short walk outside. I’ll wait.

Step 1:

\mbox{sin}\ x = x - \frac{x^3}{3!} + \frac{x^5}{5!}\ldots = \sum_n \frac{(i)^n-(-i)^n}{2in!} x^n

\mbox{sin}^2\ x = (\sum_n \frac{(i)^n-(-i)^n}{2in!} x^n)^2

= \sum_n x^n \sum_k (\frac{(i)^k-(-i)^k}{2ik!})(\frac{(i)^{n-k}-(-i)^{n-k}}{2i(n-k)!})

= \sum_n x^n i^n \sum_k \frac{-1 + (-1)^k + (-1)^{n-k} - (-1)^n}{4k!(n-k)!}

Step 2:

\mbox{cos}\ x = 1 - \frac{x^2}{2!} + \frac{x^4}{4!}\ldots = \sum_n \frac{(i)^n+(-i)^n}{2n!} x^n

\mbox{cos}^2\ x = (\sum_n \frac{(i)^n+(-i)^n}{2n!} x^n)^2

=\sum_n x^n \sum_k (\frac{(i)^k+(-i)^k}{2k!})(\frac{(i)^{n-k}+(-i)^{n-k}}{2(n-k)!})

= \sum_n x^n i^n \sum_k \frac{1 + (-1)^k + (-1)^{n-k} + (-1)^n}{4k!(n-k)!}

Step 3:

\mbox{sin}^2\ x + \mbox{cos}^2\ x = \sum_n x^n i^n \sum_k \frac{(-1)^k + (-1)^{n-k}}{2k!(n-k)!}

=\sum_n \frac{x^n i^n (1 + (-1)^n)}{2n!} \sum_k (-1)^k {n\choose k}

=\sum_n \frac{x^n i^n (1+(-1)^n)}{2n!} (1-1)^n = 1 + 0 + 0+\ldots = 1

UPDATE: notfancy has accused me of being a “cheater” for my use of complex numbers, claiming that I am relying on an implicit call to De Moivre’s theorem Euler’s formula. I have seen this view elsewhere as well, that the use of tricks like this is tantamount to pulling a rabbit out of a hat.

I have a somewhat different viewpoint. At the heart of the series for \mbox{sin} and \mbox{cos} is the periodic sequence 0,1,0,-1, 0,1\ldots. And surely the mathematical techniques for manipulating this series can be no simpler than the series itself! In other words, I feel that my observation that we can write this sequence as \frac{i^n + (-i)^n}{2} was just notational convenience and nothing more. My own style is to prefer algebra to case analysis because I tend to make more mistakes in the latter.

To illustrate this, I am presenting the same proof, without an appeal to complex numbers. It requires a little more thought, but is overall a much simpler-looking approach.

First, for the purpose of notation, we need to make an observation about power series. If f(x) = \sum_n \frac{a_n x^n}{n!} and g(x) = \sum_n \frac{b_n x^n}{n!}, then f(x)g(x) = \sum_n x^n \sum_k \frac{a_k b_{n-k}}{k! (n-k)!} = \sum_n \frac{x^n}{n!} \sum_k {n\choose k}a_k b_{n-k}. Nothing special here; just the distributive law. (if you are interested in going deeper into these kinds of manipulations of sequences, I highly recommend Wilf’s generatingfunctionology, available for free online)

In the same notation, if f(x)=\mbox{sin}\ x and g(x)=\mbox{cos}\ x, then a_n and b_n are the sequences 0, 1, 0, -1\ldots and 1,0,-1,0\ldots respectively.

Steps 1 and 2:

\mbox{sin}\ x = \sum_n \frac{a_n x^n}{n!}

\mbox{sin}^2\ x = \sum_n \frac{c_n x^n}{n!}

where c_n = \sum_k {n\choose k} a_k a_{n-k}, and

\mbox{cos}\ x = \sum_n \frac{b_n x^n}{n!}

\mbox{cos}^2\ x = \sum_n \frac{d_n x^n}{n!}

where d_n = \sum_k {n\choose k} b_k b_{n-k}

Step 3:

\mbox{sin}^2\ x + \mbox{cos}^2\ x = \sum_n \frac{x^n}{n!} e_n

where e_n = c_n + d_n.

We have c_0 = 0 and d_0=1, so e_0=1. All that remains to be shown is that e_n=0 for all n>0.

First, suppose that n is odd. Then a_k a_{n-k} = b_k b_{n-k}=0 for all k, so e_n = 0.

Now, suppose that n=2m is even. Then c_n = (-1)^{m+1}( {n\choose 1} + {n\choose 3}+\ldots + {n\choose {n-1}} ) and d_n = (-1)^m ({n\choose 0} + {n\choose 2}\ldots+ {n\choose n}). Hence e_n = c_n + d_n = (-1)^m ({n\choose 0} - {n\choose 1} + {n\choose 2}\ldots + {n\choose n}) = (-1)^m (1-1)^n = 0.

9 Responses to Summoning Cthulhu: sin^2 + cos^2 with power series

  1. Alan Crowe says:

    What algebraic properties must x have for those manipulations to be valid? It seems clear that we never use any of the ordering properties of the reals, so the argument works just as well for complex numbers. Err, how do you have a complex angle? That seems just wrong. Hence my jest about summoning Cthulhu which I expand in a tongue-in-cheek blog post.

    Do we commutivity? If with view the polynomials as a module over the reals we only seem to be using commutivity of the reals. The angles could be quaterions. Indeed we don’t make much use of associativity, it only has to work with powers of x. So a power associative algebra will do.

    This surprised me, so I’ve coded up the Cayley-Dickson construction and been checking numerically to see if I’ve missed something. cosine squared plus sine squared equals one works for a few randomly chosed octonians, and sedenions, so it looks as if any power associative algebra will do.

    • lydianrain says:

      You accuse me of consorting with evil powers, and then I see you here, fully dressed in the black robes worn by the disciples of The Dark One, knife held above the sacrificial altar with no remorse or hesitation in your eyes at all!

      Indeed, I intended these manipulations to be purely formal, in, say, the ring of integer power series \mathbb{Z}[[x]], but to translate it to an analytical context in some demonic algebra \mathbb{A}, we seem to need only two things: a nice morphism \mathbb{Z}[x]\to \mathbb{A}, and a norm. Cayley-Dickson seems to provide both, as power associativity is indeed the only requirement for such a morphism to exist. Absolute convergence follows, dooming us all.

  2. lydianrain says:

    Correction: what we’re actually looking for is a *complete* norm, and a morphism \mathbb{Q}[[x]]\to\mathbb{A}. Both of which, terrifyingly, we have.

  3. [...] a visit. In a two-part act brought on by a challenge of Alan Crowe on Reddit, my friend lydianrain summons Cthulhu with power series (or at least shows that in the way you least want to do it in). Alan of course reciprocates with [...]

  4. Robert says:

    If you think that’s summoning Cthulhu, you should see what G. H. Hardy does in the first chapter of “Divergent Series”.

  5. Qiaochu Yuan says:

    Doron Zeilberger illustrates a combinatorial proof of this identity in the Princeton Companion by identifying the power series of sine and cosine with certain weighted exponential generating functions. More generally, there’s a certain philosophy that essentially every power-series argument is a combinatorial argument in disguise.

  6. CrashDummy001 says:

    Isn’t it much much easier to say sin^2(x) = [1-cos(2x)]/2, and the similar formula for cos^2(x), to find two extremely easy and fundamental power series and simply add them together?

    • lydianrain says:

      That would be cheating; the goal is to prove a formula given a definition. To use your auxiliary formula, you would first need to demonstrate, in the ring of formal power series, that sin^2(x) = [1-cos(2x)]/2. This demonstration would be slightly harder than my post, as it would require explicitly calculating the b_n and d_n.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

%d bloggers like this: