# Identities for Cosine cos^n(x) and Sine sin^n(x) by Complex Numbers

Document Sample

```					                                                                                          Page 1 of 17

Identities for cosn ( x) & sin n ( x)
By Complex Numbers
Rev. Edition
╬

Francis J. O’Brien, Jr., Ph.D.
Aquidneck Indian Council
Newport, RI

 Francis   J. O’Brien, Jr.                                                      August 24, 2013

References

Boas, Mary L. Mathematical Methods in the Physical Sciences, 3rd ed., 2006. NY: Wiley.

Carr, G.S. Formulas and Theorems in Pure Mathematics, 2nd ed. New York: Chelsea
Publishing Co., 1970.

O’Brien, Francis J. Jr., “Euler’s               Formula      by    Series    Expansions,”      2013
http://www.docstoc.com/profile/waabu.

Spiegel, M. R. Mathematical Handbook of Formulas and Tables. New York: McGraw-Hill,
1968. [Reprinted Spiegel, Murray R., John Liu, and Seymour Lipschutz. Mathematical
Handbook of Formulas and Tables. New York: McGraw-Hill, 1999.]

Introduction

This paper shows the derivation for obtaining the identities for cos n ( x) & sin n ( x) by
means of expanding the real part of cosine and sine powers in Euler’s Formula. A basic
summary is provided for the Binomial Theorem and complex numbers. We assume
knowledge of elementary complex numbers.1
Spiegel is a good reference for such identities, and Carr has a famous book which
provides very concise proofs2. Sometimes different references provide alternative formulas.

1 A good introductory treatment is found in Boas (Ch. 2); See O’Brien (2013) for real parts analysis.
2 See Spiegel, p. 17 and Carr, Theorems 772-774, p. 175. Online resources include Wolfram MathWorld
(“Multiple-Angle Formulas”).
Page 2 of 17

The expansions require a fair amount of work. Here we present an approach which
is very detailed (but lacking some elegance) and interconnects different ways of expressing
the same solution.

Binomial Theorem for Integer Exponents
The following are provided for reference in the development of the derivations.
n n
(a  b) n    a n  k b k , n  1,2,
k 
k 0  

n(n  1) n  2 2 n(n  1)(n  2) n  3 3
(a  b) n  a n  na n 1b            a     b                a b  ...  nab n 1  b n
2!                   3!

n         n
n
( a  b)      1k  k a n  k b k ,
                   n  1,2,
k 0        

n(n  1) n  2 2 n(n  1)(n  2) n  3 3
(a  b) n  a n  na n 1b            a     b                a b  ...  nab n 1  b n
2!                   3!

n       n!        n(n  1)(n  2)n  k  1
 
 k  k!(n  k )!                             , 0! 1! 1.
                               k!

NOTE: It is clear that the Binomial Expansion has n+1terms since the sum runs from
2 2
k  0 to k  n . (a  b) 2    a k b n  k  a 2  2ab  b 2 .
k 
k 0  

Three important relations needed for the derivation are:

 cos( x)  cos( x) (cosine is an even function)

 sin(  x)   sin( x) (sine is an odd function)

n  n 
k  n  k 
         
         

o Verify identity by above definition for Binomial Theorem.

Page 3 of 17

n!                n!               n!
                       
k!n  k  n  k  n  (n  k ) (n  k )!k!
!        !              !
n  n 
k  n  k 
        
         

Elementary Complex Numbers

Euler’s Formula
   Euler’s Formula3 is:
e ix    cos x  i sin x
e  ix  cos x  i sin x

NOTE: some texts use  instead of x as the real variable.
Adding and subtracting e ix and e ix provides definitions of cosine and sine used in
the expansions:

e ix  e ix  2 cos x
e ix  e  ix  2i sin x

Euler’s Identity & Complex Exponentials

These relations establish important consequences of Euler’s Formula useful for
calculations by complex exponentials.

i
ei  1    [Identity]                                                      i 2  1
e2   1  i   12

[positive sq. root]
k                                                   k
 k        k                  i
2  i k  cos k   i sin  k 
i
e 2  i k  cos   i sin                  e                                     
 2          2                                     2          2 
NOTE: to verify, substitute all into Euler’s Formula; e.g., e i  cos  i sin    1.
The value of i n (n odd/even) is important in the sine expansions (Table 3 below).

3   Formula demonstrated in O’Brien (2013) by exponential series.

Page 4 of 17

Real Parts
It is clear that the real parts of Euler’s Formula are:

o      Re eix  Re(cos x  i sin x)  cos x [by inspection and definition of “real”]
o      Re e ix  Re(cos x  i sin x)  cos x
ix
 cos x  i sin x       e
o      Re                   Re            sin x
       i                 i
ix
 cos x  i sin x         e
o      Re                   Re               sin x
      i                   i

___________

Derivation for cosn ( x)
The work will be divided into the case of n an even integer, and n is an odd integer.
The even integer case is done first4.

_________________

cos n ( x) For Even Integer n

From above we restate Euler’s Formula for cosine raised to the n th power.

ix  e ix   2 cos xn  2n cos n x . Substituting the left side into the Binomial Theorem
e
n

and using laws of exponents:

                                                           
n    n  ix n  k  ix k     n n    n  k ix  k
 ix n
e   ix
e                e          e           e ix
k        e
k
k 0                       k 0  

Carrying out the expansion for several terms:

4   Recall that the power of cosine is written by convention,       cos n ( x)  (cos x) n , and the power of sine is
sin n ( x)  (sin x) n .

Page 5 of 17

ix  e ix     n ix  k ix  k 
n        n         n        
e                          e        e
k
k 0    

 e
0      
 n  ix n ix  0  n  ix n 1 ix 1  n  ix n  2 ix  2
e        e
1         
e       e
2           
e
                                   

 n  2 e
           e       
 n  ix n  n  2  ix  n  2   n  ix n  n 1 ix  n 1  n  ix n  n ix  n
                                     n  1 e
               e           e
n           e   
                                                                 


NOTE: if the real part of e ix  e  ix        is expanded and divided by 2n the desired result
n

cos n x  is obtained. The pattern we seek becomes clear if the terms are put in a table (Table
1). For n even there will be n  1 terms in the Binomial expansion. Half of the cosine terms
in the beginning are equal to half of the cosine terms at the end5 and one constant term is in
the middle. For n  4 the 5 term expansion will show 2 pairs of equal cosine terms and one
unequal term. We look for the pattern and summarize it with a computing formula.

5
 
Since n  n and cos(  x )  cos( x ) .
k nk
Page 6 of 17

Table 1. Expansion of eix  e  ix                        for n even integer
n

k                n
 
k 
  k  k
Re eix
n      
eix
                                                          Real Part
0                n
 
0
ix   cos(n) x
e
n

 
1                n
 
1 
ix 1 ix 1  ix  2  cos(n  2) x
e
n
e

e
n

 
2                n
 
2
ix  2 ix 2  ix  4  cos(n  4) x
e
n
e

e
n

 
3                n
 
3 
ix 3 ix 3  ix 6  cos(n  6) x
e
n
e

e
n

 
                                                                       
n                n 
ix  2 ix  2  ix  n  cos(0) x =1
n         n
                        n                 n
Middle term                                                   e        e         e
2                n
 
2
                                                                           
n3              n  n

 n  3   3 
  
     ix  n  cos(6  n) x  cos(n  6) x
eix n  n  3 ix  n  3
e               e
6

         
n2              n  n

 n  2   2
  
ix n  2ix  n  2  ix  n  cos(4  n) x  cos(n  4) x
e
n
e

e
4

        
n 1             n  n

 n  1  1 
  
ix n 1ix  n 1  ix  n  cos(2  n) x  cos(n  2) x
e
n
e

e
2

        
n            n n
  
n 0
ix nix  n  ix  n  cos(n) x  cos(n) x
e
n
e

e


   

The table shows this symmetric pattern: double all cosine terms up to the middle term and
n
add the constant value of the middle term k  :
2
n

                 2
1                     n 
ix         ix n     n       n         2 n
e        e                  cos ( x)  2    cosn  2k x   n 
  k                
k 0                    
2
One form of the solution is given by bringing over the 2 n term:

Page 7 of 17

n
n            n            1
cos ( x)  1           1 2 n
 n   n  1   k  cosn  2k x,
                   n  2,4,6,
2n     2
2
k 0  

This general computing formula can be simplified algebraically to obtain a second
n 
 
form of the solution. Reduce the middle term  n  from definition and identity,
 
2
n  n 
 
k  n  k .

         

n   n 
                    n!                             n(n  1)(n  2)(n  3)(n  4)(n  5)
 n   n  n    n   n          n  n  2  n  4  n  6    n  n  2  n  4  n  6  
            
2         2   ! !               2  2  2  2   2  2  2  2 
2 2                
                                                     
n                                    n
terms                                terms
2                                    2
n(n  1)(n  2)(n  3)(n  4)(n  5)           (n  1)(n  3)(n  5)
                                                   2n
n(n  2)(n  4)(n  6) n(n  2)(n  4)(n  6)      n(n  2)(n  4)(n  6)
n                         n
22                        22

n 
 
Then, substitute for  n  in first solution:
 
2

n
1
(n  1)(n  3)(n  5)   1           2 n
cos n x                                      cosn  2k x,             n  2,4,6,
n(n  2)(n  4)(n  6) 2 n 1 k  0  k 
 

A third form also exists6 (Spiegel, Formula 5.73, p. 17). Also see Carr (p.175). Others may
also be available in the literature.

6   cos
2n  
x 
1  2n 
 n 
1 n 1 2n
 k cos 2n  2k  x
2 2n   2 2n 1 k  0

If this form is used, the even power 2n must be set to n. For cos x set 2 n  4, n  2, etc. Verify with
4
numerical examples. The author prefers the second form as the most straightforward.

Page 8 of 17

Examples

We use the second form, although any of the three forms will give the answer.

1 1  0 2                1 cos(2 x)
cos 2 x           cos(2  2k ) x   
k 
2 2 k  0  
                      2
      2

(3)     1    1 4                 3 1           1
cos 4 x                     cos(4  2k ) x    cos(2 x)  cos(4 x)
k 
(4)2  23   k  0  
                       8 2
               8

(5)(3)   1      2 6                 5 15           3         1
cos 6 ( x)                        cos(6  2k ) x  =  cos(2 x)  cos(4 x)  cos(6 x)
k 
6(4)(2) 25     k  0  
                       16 32
               16         32

NOTE: It is possible to find the value for cos nx by solving directly in cos n ( x) .
Calculations show:

              n 1                          
 n  
1 n
              2 n                    
cos(nx)  2 cos ( x)  2    cosn  2k x   n  
n
                            n  2,4,6,
2              k 1  k                
 2  

                                            
n                         n
NOTE: Recall, by definition, for a summation,              uk , if n  m, set  uk  0.
k m                   k m

NOTE: See the MathWord article for a number of formulas to generate cos(nx).

______________________

cos n ( x) for Odd Integer n

The reader can verify this derivation with the information provided on the even n
case. Create a table like Table 1 to see the pattern. When n is odd there are n  1 terms (an
even number) in the binomial expansion. There will be an equal number of cosine pairs and
no middle term. Thus we need to double all cosine terms up to the dividing point of the
expansion, at the term n  1 . For n = 7 there will be 8 terms in the expansion or 4 pairs of
2

Page 9 of 17

cosine terms. Thus, add the first 4 cosine terms in the expansion, doubling each. The
formula for this expansion is:

n 1
1       2 n
cos n ( x) 
n 1
   cosn  2k x,
                    n  1,3,5,.
2          k 0  k 

For example, cos 3 x   1  3  cos(3x)   3  cos( x)  3 cos( x)  cos(3x) .
              
2  0           1          
4
2                                  

Another form exists (Spiegel, Formula 5.71, p. 17)7.

NOTE: The value for cos nx is obtained by solving directly in cos n ( x) .
That calculation is:

              n 1                 
1 n             2 n               
cos(nx)  2 cos ( x)  2    cosn  2k x 
n
k                                n  1,3,5,
2              k 1               
                                   

Derivation for sin n ( x)

The derivations for sin n ( x) are a little more complicated because we have the
imaginary value i to consider and the  1 terms in the definition of sine, eix  e ix  2i sin x .
The above results for the cosine structure will be helpful in providing results. We consider
the even n case first.

sin n ( x) for Even Integer n

We know from the case of cosine that there are n + 1 terms in the expansion (an odd
number of terms); this means a middle term needs to be considered. Before expanding the
left side, we draw a table (Table 2) to search for the pattern. Table 3 summarizes the
structure of the imaginary number i raised to odd/even powers; these properties provide
insight into the behavior of the expansion.

By definition of sine from Euler’s Formula,

7
cos
2 n 1
( x) 
1
 
n 1 2 n 1
 k cos2 n 2 k 1x
22 n  2 k 0
Set n  2n  1 in solution for odd n.

Page 10 of 17

e ix  e ix  2i sin x 

ix  e ix   2n i n sin n x.
e
n

n

    1
n
2
Table 3 indicates that for even n, i n               i 2 2
, giving

n

e   ix
e      
 ix n
 2 (1) 2 sin n x .
n

And the Binomial expansion is:

n
                    1  k    
n
ix         ix n                 k  n  ix n  k     ix  k
e        e                           e   e                           n
 2 (1) 2 sin n ( x)
k 0

See Table 2 for the structure of the expansion.

Page 11 of 17

Table 2. Expansion of e ix  e  ix                     for n even integer
n

n
n
i        (1) 2

k
 1k 


n


  k  k
n
Re e ix

e ix
k                                                    Real Part

0               n
 
0
ix   cos(n) x
e
n

 
1                n
 
1 
ix 1 ix 1  cos(n  2) x
e
n
e


 
2               n
 
2
ix  2 ix 2  cos(n  4) x
e
n
e


 
3                n
 
3 
ix 3 ix 3  cos(n  6) x
e
n
e


 
                                                                     
n
 
n                       n          n
                 ix n  2     ix  2
Middle term 
2             n                e            e             cos(0) x =1
 
2
                                                                         
n3             n 

 n  3    3 

n
 
    cos(6  n) x  cos(n  6) x
e  ix n  n  3 ix  n  3
e
            
n2             n  n

 n  2   2
  
ix n  2ix  n  2  cos(4  n) x  cos(n  4) x
e
n
e


        
n 1            n 
 n  1  1 
      
n
 
ix n 1ix  n 1 cos(2  n) x  cos(n  2) x
e
n
e


            
n            n n
  
n 0
ix nix  n  cos(n) x  cos(n) x
e
n
e


   
n
NOTE: The corresponding Binomial coefficient terms  1k   will have the same value
 
k 
n     n 
 n  k .
by     
k            
            

Page 12 of 17

Table 3
Powers of Imaginary Number
i 2  1
k       ik               Value of i k            Re i k
0            i0                          1              X
1             i1                       i
2            i2                            –1            X
3            i3                     –i
4            i4                            1             X
5            i5                        i
6            i6                            –1            X
7            i7                     –i
8            i8                            1             X
9            i9                        i
10           i10                           –1            X
11           i11                  –i

k                          1 if k 2 even

k
(even)      i 2 2                                       X
 1 if k 2 odd
k                k 1
i if k  1 2 even
(odd)

i i2 2           
 i if k  1 2 odd
k
i           k        k 
NOTE: by Euler’s Formula,             e 2  i k  cos   i sin  
 2         2

 k                                     k 
cos   0; k  1,3,5,...               sin    0; k  0,2,4,...
 2                                      2 
 k                                     k 
cos   1; k  0,4,8,...               sin    1; k  1,5,9,...
 2                                      2 
 k                                     k 
cos   1; k  2,6,10,...             sin    1; k  3,7,11,...
 2                                      2 

Page 13 of 17

The complex exponential terms will be cosine terms since Re e ix  Re e ix  cos x and  

n
 
n
Re e ix  Re e  ix  cos nx . As with the cosine expansion for even n given earlier, half of
the terms in the beginning of the expansion will be equal to half of the corresponding terms
at the end and one term is in the middle (Table 2).
NOTE: The middle term will always be positive since the k th value of the middle term is
n               n
n                      2               2
i k   1
2               1       
 1
so that                           n  1 .   The reader can work through the details to show
in                    2
 1

that e ix  e            2n i n sin n xleads to:
 ix n

n n
n      2 1
1    1 2       k n
  1   cosn  2k x,         n  2,4,6,
n
sin ( x)      n 
n   2 n1 k 0
2 2
k 
 
 

Other equivalent versions of the expansion formula exist (Spiegel, p. 17)8, or Carr (p. 175).

NOTE: It appears that sin nx cannot be obtained from sin n ( x) above. Other solutions exist
(see MathWorld, cited earlier).

sin n ( x) for Odd Integer n
This expansion is the hardest one to derive. We start with the definition from Euler’s
Formula and the property of powers of imaginary numbers for odd integers (Table 3).
The following indicates the expansion to be performed.

8   cos
2n  
x 
1  2n  ( 1) n n 1 2n
 n 
2 2n   2 2n 1 k  0

 k cos 2n  2k  x The even power 2n must be set to n in our version.

Page 14 of 17

e ix  e ix  2i sin x 

ix  e ix   2i sin xn
e
n

ix  e ix   2n i n sin n ( x)
e
n

     n 1 
ix  e ix   2n i2  2  sin n ( x)
e
n
i
              
n1
ix  e ix   2n i 1 sin n ( x)
e
n                     2

ix  e ix   2n  1n21 sin n ( x)
e
n

i

This last expression represents the complex exponential term to be expanded by the
Binomial Theorem. Unlike the foregoing expansions for cosine and sine this expansion is
reduced in terms of the sine function since,

e ix
Re             sin x
i
e  ix
Re          sin x
i

The real part of
ix  e ix  is expanded as follows:
e
n

i

  1k  k ix              ix  k
n          n           nk       

ix  e   k  0
e         ix n                e
 
e

i                                 i

The basic relation governing the derivation of sin n ( x) is:

 
 n  ix n  k ix  k
 e
k 
 
e
 n  ix  n  k  ix k
n  k  e





e               

i                         i

Substituting,

Page 15 of 17

n                    n 
 n  k  sin n  2k x
  sin n  2k x  
k                           
                           
n                    n 
 n  k   sin n  2k x
  sin n  2k x  
k                           
                           
n                   n 
 n  k  sin n  2k x
  sin n  2k x  
k                          
                          

Furthermore, corresponding terms have the same  sign values. To show this, assume from
above:

 1k 
n                               n 

                                 n  k  sin 2k  n x
 sin n  2k x   1n  k 
                                     
k                                     

 1k 
n                                  n 

                                    n  k  sin n  2k x
 sin n  2k x   1n  k 1 
                                        
k                                        
 1k   1n  k 1   1 k  1n 1
 1k   1 k
 1n 1  1 for n odd

To clarify these abstract relations Table 4 shows details for the expansion of sin 5 ( x) .

Page 16 of 17

Table 4.       Expansion of
ix  e ix 
e
n
for n  5.
i
k                   n
 
k 
 n  k  k
Re 1k e ix

e ix
                                                     Real Part
0                   5
 
 0
ix   sin(5x)
e
5

                        i
1                    5
 
1                   
ix ix 1   sin3x
e
4
e


                                    i
2
5  
 n 
    n 1
              ix ix 2  sinx
e
3
e


 2                                    i
          
 2 
3                5  5 
  
 3  2                 
ix ix 3   sin x sin( x)
e
2
e


                                      i
4                5   5
  
 4  1 
ix ix 4  sin(3x)   sin(3x)
e
1
e


                                  i
5                5  5 
  
 5  0                 
ix 5   sin(5x)  sin(5x)
e


                              i
n 1                          5
Corresponding terms are equal north and south of the border at the k        term,                     
 2
2                           
When all the algebra is complete, the expansion shows for n  5 :
n1
2                5                5           5
2  1
n
sin n ( x)  2  sin(5 x)  2  sin 3 x  2  sin( x)
 0              1             2
                              
2 2 sin(5 x)  5 sin 3 x  10 sin( x) sin(5 x)  5 sin 3 x  10 sin( x)
sin 5 ( x)   1                                         
25                                   16
n 1
The general case is found by doubling all equal sine terms around the                         term and
2
n1
2
bringing over the terms, 2  1n
:

n1 n 1
2
 1      2            n
sin n ( x) 
2 n 1 k  0
  1k  k  sin n  2k x, n  1,3,5,
 
 

The Spiegel version of this expansion (on page 17) sets n  2n  1.

Page 17 of 17

NOTE: It is possible to find the value for sin nx by solving directly in sin n ( x) .
Calculations show:

                            n 1                         
n1

1           2                  2       n                

sin( nx)  2 n  1     sin n ( x)  2   1k   sin n  2k x, n  1,3,5,
k 
2                            k 1                       

                                                         


____________

As in many derivations in mathematics, elementary complex numbers is a remarkable
tool for analysis.