31st March 2004

Calculus Lecture
28th April 2004
Notes by Omar Shouman
Example 5 (Taylor series for the ln (natural logarithm) function)
Let f ( x)  ln( x) and x0  1
f (x )  ln(x )
f ( x)  x 1
f ( x)   x 2
f (3) ( x)  (1)(2) x 3
 f (1)  0
 f (1)  1
 f (1)  1
 f (3) (1)  (1)(2)
Now, we find an expression for the nth derivative of the function:
f
(n )
f
(1)
(x )  (1)(2).....((n  1))x  n  (1)n 1 (n  1)!x  n
(1)  (1)n 1 (n  1)!
The formula for the Taylor series is:

(x  x 0 ) n
(x  1)n
  (1)n 1 (n  1)!
n!
n!
n 0
n 1

(1)n 1
1
1
ln x  
(x  1)n  (x  1)  (x  1)2  (x  1)3  ...
n
2
3
n 1

f (x )   f
Example 6
(n )
(x 0 )
(The arctangent function)
f ( x)  arctan x
1
1
f ( x) 

2
1 x
1  ( x 2 )

Using the formula
q
n

n 0
1
we can write
1 q

f ( x)  1  ( x 2 )  ( x 2 ) 2  ( x 2 )3  .......   (  x 2 ) n
n 0
This is the derivative; we can integrate to get the function:

f ( x)   (1)n .
n0
x 2n1
C
2n  1
where C  R
1
Dr.Kuenzer
To evaluate the constant:
f (0)  arctan(0)  0
2 n1
 

n 0
(

1)
.

C  0
2n  1 
 n0
The value of the series is zero. Thus, C  0.
The final result we have is:
x 2 n1
x3 x5
f ( x)  arctan x   (1) .
 x    ........
2n  1
3 5
n0

n
In particular,

1 1 1
1

f (1)  arctan(1)  1     .........   (1) n .
 .
3 5 7
2n  1 4
n 0
Example 7
Let   R , x0  0 , f ( x)  (1  x)
Then,
f  0 (x )  (1  x ) ,
f
(1)
 1
( x)   .(1  x)
f
,
f (2) ( x)   .(  1)(1  x) 2
 0
(0)  1
f (0)  
f (2) (0)   (  1)
(1)
Now we write the expression for the nth derivative of the function:
f
(n )
(x )   (  1)  (  n  1)(1  x ) n
f
(n )
(0)   (  1)  (  n  1)
The Taylor series is given as:

f
n 0
(n )

(x  x 0 ) n
xn
(x 0 )
  (  1)  (  n  1)
n!
n!
n 0
2
Now we introduce a new notation:
 
The binomial coefficient   is defined as follows:
n
    (  1)  (  n  1)
for   R , n is an integer n  0
 
1 2  3  n
n 
Examples
 
  1
0
 
  
1
    (  1)
 
1.2
2
 
  1
 
Therefore, we can use this notation to express the Taylor series for the function
f ( x)  (1  x) as

 
 
 
 
f (x )  (1  x )     x n    x 0    x    x 2  
n 0  n 
0
1
2
 (  1) 2
 1  x 
x  
2
Now consider the case where   m  0 (a positive integer)
 m  m (m  1)  (m  m )  (m  n  1)
Then,   
0
n!
n
m 
m!
If n  m , then   
 n  n !(m  n )!
Therefore, the Taylor series is given by a polynomial:
m
m 
(1  x )m     x n
n 0  n 
Conclusion:
m
n
m
m
 m  b 
m 
 b
(a  b )m  a m 1    a m          a m nb n
 a
n 0  n   a 
n 0  n 
3
if n  m
The Binomial Theorem:
m
m 
(a  b )m     a m nb n
n 0  n 
Examples
1) Expand: (a  b)4
 4
 4
 4
 4
 4
(a  b ) 4    a 4b 0    a 3b 1    a 2b 2    a1b 3    a 0b 4
0
1
 2
 3
 4
4! 4 4! 3 1 4! 2 2 4! 1 3
4! 4

a 
ab 
ab 
ab 
b  a 4  4a 3b 1  6a 2b 2  4ab 3  b 4 .
0!4!
1!3!
2!2!
3!1!
4!0!
2) Expand
1 2  1 2 
1 2 
1 2 
1/ 2  4
(1  x )       x    x 2    x 3  
 x  
 0   1 
 2 
 3 
 4 
1
1
1
5 4
 1 x  x 2  x 3 
x  
2
8
16
128
1
2
1 2 
Note that in 2) we do not use the factorial to evaluate   , because m ,here, is NOT an
 n 
integer. Recall the definition:
    (  1)....(  n  1)
 
n!
n
The Taylor series is very useful, but we should know when it is valid. To know this, we have
to calculate the radius of convergence.
Problem: when are these formulas valid?

(e.g. e x  
n 0
xn
(according to the Taylor series): What is the radius of convergence? )
n!
Lemma (Weak Stirling)
Let n  1
Then, n ne 1n  n !  (n  1)n 1e  n
4
Proof:
n
ln(n !)   ln k
k 1
In general,
n
n
n1
k 1
1
k 1
 ln k   ln xdx   ln k
n
We know that:  ln xdx   x ln x  x 1  n ln n  n  1
n
1
n
n 1
k 1
k 1
Hence, n ln n  n  1   ln k , and n ln n  n  1   ln k
If we replace n by n  1 in the second inequality, we get:
n
(n  1) ln(n  1)   n  1  1   ln k
k 1
Now, from the first and the third inequalities, we can conclude that:
n ln  n  1  ln(n!)  (n  1) ln(n  1)  n
Applying the exponential function, we get:
en ln( n )n1  n !  e( n1) ln( n1)n ,
that is n ne 1n  n !  (n  1)e  n , as was to be shown.

Let us calculate the radius of convergence of
1
xn
. We have an  .

n!
n 0 n !
So,
1
an
1
n
1
1
 1  n  1  n 1 1
     n 1n   e n  0
n
 n !
 n .e 
1
Hence, R  (lim an n )1  01  
n
The exponential function converges everywhere.
More precisely: The complex exponential function
def 
zn
n 0 n !
ez  
converges for all z 
5
Similarly,
z 2n 1
sin z   (1)
(2n  1)!
n 0

for z 
n

cos z   (1)n
n 0
z 2n
(2n )!
for z 
Now,
(iz )0 (iz )1 (iz ) 2 (iz )3 (iz ) 4 (iz )5





 
0!
1!
2!
3!
4!
5!
(iz )0
(iz ) 2
(iz ) 4



 
0!
2!
4!
(iz )1
(iz )3
(iz )5



 
1!
3!
5!
z0
z2
z4



 
0!
2!
4!
z1
z3
z5
i
i
i
 
1!
3!
5!
 cos z  i sin z
e iz 
Hence, we have Euler’s Formula e iz  cos z  i sin z
for any z 
In particular,
e x iy  e x e iy  e x (cos y  i sin y )
Thus, e xiy  e x cos y  i sin y  e x ( (cos y) 2  (sin y) 2 )  e x .
Note:

sin(z )   (1) n
n 0

(z ) 2 n 1
z 2 n 1
  (1) n
  sin z (odd function)
 2n  1! n 0
 2n  1!
2n

( z ) 2 n
n z
cos(z )   (1)
  (1)
 cos z (even function)
(2n )! n 0
(2n )!
n 0

n
Now we derive an expression for the cosine function:
e iz  e iz  (cos z  i sin z )  (cos z  i sin z )  2cos z
1
Thus, cos z  (e iz  e iz )
2
Similarly, we derive an expression for the sine function:
6
e iz  e iz  (cos z  i sin z )  (cos z  i sin z )  2i sin z
1
sin z  (e iz  e  iz )
2i
Example (Integrating using e ix and e  ix )
e
x
(cos x ) 4 dx we use the substitution for the cosine function in terms of the e function
4
1
x 1
ix
 ix 
x
4ix
2ix
2ix
4ix
 e  2 (e  e )  dx  16  e (e  4e  6  4e  e )dx (Binomial Theorem)
1
(e (1 4i ) x  4e (1 2i ) x  6e x  4e (12i ) x  e (14i ) x )dx

16
1 1
 1

 1
 
e (1 4i ) x  4 
e (1 2i ) x   6e x  4 
e (12i ) x
16  1  4i
 1  2i

 1  2i


 1  2i (12i ) x
x
e
  6e  4 

 5
1

e (14i ) x

 1  4i

  const .

 1  4i (14i ) x
e

 17

  const .


1  1  4i (1 4i ) x
 1  2i (1 2i ) x
e
 4
.e

16  17
 5

1 x
1
1
1
e cos(4x )  e x sin(4x )  e x cos(2x )  e x sin(2x )  6e x  const
136
34
10
5
7