Taylor's and Maclaurin's series
Taylor's series expresses a function f ( x ) f(x) f ( x ) near a point x = a x = a x = a as an infinite sum of terms involving derivatives of the function at x = a x = a x = a . When a = 0 a = 0 a = 0 , the series is called Maclaurin's series.
Taylor's theorem
The Taylor series expansion of a function f ( x ) f(x) f ( x ) about x = a x = a x = a is given by:
f ( x ) = f ( a ) + f ′ ( a ) ( x − a ) + f ′ ′ ( a ) 2 ! ( x − a ) 2 + f ′ ′ ′ ( a ) 3 ! ( x − a ) 3 + f ( 4 ) ( a ) 4 ! ( x − a ) 4 + … f(x) = f(a) + f'(a)(x - a) + \frac{f''(a)}{2!}(x - a)^2 + \frac{f'''(a)}{3!}(x - a)^3 + \frac{f^{(4)}(a)}{4!}(x - a)^4 + \dots f ( x ) = f ( a ) + f ′ ( a ) ( x − a ) + 2 ! f ′′ ( a ) ( x − a ) 2 + 3 ! f ′′′ ( a ) ( x − a ) 3 + 4 ! f ( 4 ) ( a ) ( x − a ) 4 + …
If x = a + h x = a + h x = a + h , then h = x − a h = x - a h = x − a , and the theorem becomes:
f ( a + h ) = f ( a ) + f ′ ( a ) h + f ′ ′ ( a ) 2 ! h 2 + f ′ ′ ′ ( a ) 3 ! h 3 + f ( 4 ) ( a ) 4 ! h 4 + … f(a + h) = f(a) + f'(a)h + \frac{f''(a)}{2!}h^2 + \frac{f'''(a)}{3!}h^3 + \frac{f^{(4)}(a)}{4!}h^4 + \dots f ( a + h ) = f ( a ) + f ′ ( a ) h + 2 ! f ′′ ( a ) h 2 + 3 ! f ′′′ ( a ) h 3 + 4 ! f ( 4 ) ( a ) h 4 + …
Example 1: Expand sin ( π 3 + h ) \sin(\frac{\pi}{3} + h) sin ( 3 π + h ) in ascending powers of h h h up to the term in h 4 h^4 h 4 .
Let f ( x ) = sin x f(x) = \sin x f ( x ) = sin x , so f ( π 3 + h ) f(\frac{\pi}{3} + h) f ( 3 π + h ) is the expansion we seek. We evaluate the function and its derivatives at x = π 3 x = \frac{\pi}{3} x = 3 π :
f ( π 3 ) = sin ( π 3 ) = 3 2 f(\frac{\pi}{3}) = \sin(\frac{\pi}{3}) = \frac{\sqrt{3}}{2} f ( 3 π ) = sin ( 3 π ) = 2 3
f ′ ( x ) = cos x f'(x) = \cos x f ′ ( x ) = cos x , f ′ ( π 3 ) = cos ( π 3 ) = 1 2 f'(\frac{\pi}{3}) = \cos(\frac{\pi}{3}) = \frac{1}{2} f ′ ( 3 π ) = cos ( 3 π ) = 2 1
f ′ ′ ( x ) = − sin x f''(x) = -\sin x f ′′ ( x ) = − sin x , f ′ ′ ( π 3 ) = − sin ( π 3 ) = − 3 2 f''(\frac{\pi}{3}) = -\sin(\frac{\pi}{3}) = -\frac{\sqrt{3}}{2} f ′′ ( 3 π ) = − sin ( 3 π ) = − 2 3
f ′ ′ ′ ( x ) = − cos x f'''(x) = -\cos x f ′′′ ( x ) = − cos x , f ′ ′ ′ ( π 3 ) = − cos ( π 3 ) = − 1 2 f'''(\frac{\pi}{3}) = -\cos(\frac{\pi}{3}) = -\frac{1}{2} f ′′′ ( 3 π ) = − cos ( 3 π ) = − 2 1
f ( 4 ) ( x ) = sin x f^{(4)}(x) = \sin x f ( 4 ) ( x ) = sin x , f ( 4 ) ( π 3 ) = sin ( π 3 ) = 3 2 f^{(4)}(\frac{\pi}{3}) = \sin(\frac{\pi}{3}) = \frac{\sqrt{3}}{2} f ( 4 ) ( 3 π ) = sin ( 3 π ) = 2 3
Using Taylor's theorem:
sin ( π 3 + h ) = 3 2 + 1 2 h − 3 2 h 2 2 ! − 1 2 h 3 3 ! + 3 2 h 4 4 ! + … \sin\left(\frac{\pi}{3} + h\right) = \frac{\sqrt{3}}{2} + \frac{1}{2}h - \frac{\sqrt{3}}{2}\frac{h^2}{2!} - \frac{1}{2}\frac{h^3}{3!} + \frac{\sqrt{3}}{2}\frac{h^4}{4!} + \dots sin ( 3 π + h ) = 2 3 + 2 1 h − 2 3 2 ! h 2 − 2 1 3 ! h 3 + 2 3 4 ! h 4 + …
sin ( π 3 + h ) = 3 2 + 1 2 h − 3 4 h 2 − 1 12 h 3 + 3 48 h 4 + … \sin\left(\frac{\pi}{3} + h\right) = \frac{\sqrt{3}}{2} + \frac{1}{2}h - \frac{\sqrt{3}}{4}h^2 - \frac{1}{12}h^3 + \frac{\sqrt{3}}{48}h^4 + \dots sin ( 3 π + h ) = 2 3 + 2 1 h − 4 3 h 2 − 12 1 h 3 + 48 3 h 4 + …
Example 2: Expand cos ( π 6 + h ) \cos(\frac{\pi}{6} + h) cos ( 6 π + h ) in ascending powers of h h h up to h 4 h^4 h 4 .
Let f ( x ) = cos x f(x) = \cos x f ( x ) = cos x . Evaluating at x = π 6 x = \frac{\pi}{6} x = 6 π :
f ( π 6 ) = cos ( π 6 ) = 3 2 f(\frac{\pi}{6}) = \cos(\frac{\pi}{6}) = \frac{\sqrt{3}}{2} f ( 6 π ) = cos ( 6 π ) = 2 3
f ′ ( x ) = − sin x f'(x) = -\sin x f ′ ( x ) = − sin x , f ′ ( π 6 ) = − 1 2 f'(\frac{\pi}{6}) = -\frac{1}{2} f ′ ( 6 π ) = − 2 1
f ′ ′ ( x ) = − cos x f''(x) = -\cos x f ′′ ( x ) = − cos x , f ′ ′ ( π 6 ) = − 3 2 f''(\frac{\pi}{6}) = -\frac{\sqrt{3}}{2} f ′′ ( 6 π ) = − 2 3
f ′ ′ ′ ( x ) = sin x f'''(x) = \sin x f ′′′ ( x ) = sin x , f ′ ′ ′ ( π 6 ) = 1 2 f'''(\frac{\pi}{6}) = \frac{1}{2} f ′′′ ( 6 π ) = 2 1
f ( 4 ) ( x ) = cos x f^{(4)}(x) = \cos x f ( 4 ) ( x ) = cos x , f ( 4 ) ( π 6 ) = 3 2 f^{(4)}(\frac{\pi}{6}) = \frac{\sqrt{3}}{2} f ( 4 ) ( 6 π ) = 2 3
cos ( π 6 + h ) = 3 2 − 1 2 h − 3 4 h 2 + 1 12 h 3 + 3 48 h 4 + … \cos\left(\frac{\pi}{6} + h\right) = \frac{\sqrt{3}}{2} - \frac{1}{2}h - \frac{\sqrt{3}}{4}h^2 + \frac{1}{12}h^3 + \frac{\sqrt{3}}{48}h^4 + \dots cos ( 6 π + h ) = 2 3 − 2 1 h − 4 3 h 2 + 12 1 h 3 + 48 3 h 4 + …
Maclaurin's series
Maclaurin's series is a special case of Taylor's series where a = 0 a = 0 a = 0 :
f ( x ) = f ( 0 ) + f ′ ( 0 ) x + f ′ ′ ( 0 ) 2 ! x 2 + f ′ ′ ′ ( 0 ) 3 ! x 3 + f ( 4 ) ( 0 ) 4 ! x 4 + … f(x) = f(0) + f'(0)x + \frac{f''(0)}{2!}x^2 + \frac{f'''(0)}{3!}x^3 + \frac{f^{(4)}(0)}{4!}x^4 + \dots f ( x ) = f ( 0 ) + f ′ ( 0 ) x + 2 ! f ′′ ( 0 ) x 2 + 3 ! f ′′′ ( 0 ) x 3 + 4 ! f ( 4 ) ( 0 ) x 4 + …
Example 3: Expand ln ( 1 + x ) \ln(1 + x) ln ( 1 + x ) in ascending powers of x x x up to x 4 x^4 x 4 .
f ( x ) = ln ( 1 + x ) f(x) = \ln(1 + x) f ( x ) = ln ( 1 + x ) , f ( 0 ) = ln ( 1 ) = 0 f(0) = \ln(1) = 0 f ( 0 ) = ln ( 1 ) = 0
f ′ ( x ) = 1 1 + x f'(x) = \frac{1}{1 + x} f ′ ( x ) = 1 + x 1 , f ′ ( 0 ) = 1 f'(0) = 1 f ′ ( 0 ) = 1
f ′ ′ ( x ) = − 1 ( 1 + x ) 2 f''(x) = -\frac{1}{(1 + x)^2} f ′′ ( x ) = − ( 1 + x ) 2 1 , f ′ ′ ( 0 ) = − 1 f''(0) = -1 f ′′ ( 0 ) = − 1
f ′ ′ ′ ( x ) = 2 ( 1 + x ) 3 f'''(x) = \frac{2}{(1 + x)^3} f ′′′ ( x ) = ( 1 + x ) 3 2 , f ′ ′ ′ ( 0 ) = 2 f'''(0) = 2 f ′′′ ( 0 ) = 2
f ( 4 ) ( x ) = − 6 ( 1 + x ) 4 f^{(4)}(x) = -\frac{6}{(1 + x)^4} f ( 4 ) ( x ) = − ( 1 + x ) 4 6 , f ( 4 ) ( 0 ) = − 6 f^{(4)}(0) = -6 f ( 4 ) ( 0 ) = − 6
ln ( 1 + x ) = 0 + 1 x − 1 2 x 2 + 2 6 x 3 − 6 24 x 4 + ⋯ = x − x 2 2 + x 3 3 − x 4 4 + … \ln(1 + x) = 0 + 1x - \frac{1}{2}x^2 + \frac{2}{6}x^3 - \frac{6}{24}x^4 + \dots = x - \frac{x^2}{2} + \frac{x^3}{3} - \frac{x^4}{4} + \dots ln ( 1 + x ) = 0 + 1 x − 2 1 x 2 + 6 2 x 3 − 24 6 x 4 + ⋯ = x − 2 x 2 + 3 x 3 − 4 x 4 + …
Example 4: Find the Maclaurin's series for e 5 x e^{5x} e 5 x up to the term in x 3 x^3 x 3 .
f ( x ) = e 5 x f(x) = e^{5x} f ( x ) = e 5 x , f ( 0 ) = 1 f(0) = 1 f ( 0 ) = 1
f ′ ( x ) = 5 e 5 x f'(x) = 5e^{5x} f ′ ( x ) = 5 e 5 x , f ′ ( 0 ) = 5 f'(0) = 5 f ′ ( 0 ) = 5
f ′ ′ ( x ) = 25 e 5 x f''(x) = 25e^{5x} f ′′ ( x ) = 25 e 5 x , f ′ ′ ( 0 ) = 25 f''(0) = 25 f ′′ ( 0 ) = 25
f ′ ′ ′ ( x ) = 125 e 5 x f'''(x) = 125e^{5x} f ′′′ ( x ) = 125 e 5 x , f ′ ′ ′ ( 0 ) = 125 f'''(0) = 125 f ′′′ ( 0 ) = 125
e 5 x = 1 + 5 x + 25 2 x 2 + 125 6 x 3 + … e^{5x} = 1 + 5x + \frac{25}{2}x^2 + \frac{125}{6}x^3 + \dots e 5 x = 1 + 5 x + 2 25 x 2 + 6 125 x 3 + …