Question
Question: Find the Taylor series for \[f\left( x \right) = \cos x\]....
Find the Taylor series for f(x)=cosx.
Solution
Taylor’s series is an infinite sum of terms that are expressed in terms of the derivatives of the function at a single point.
Complete step by step solution:
The Taylor’s series for a function f(x) at x=a(where a is any real or complex number) can be found by the formula : n=0∑∞n!f(n)(a)(x−a)n (where f(n)(x) is the nth derivative of f(x) at x=a).
Let us find the Taylor series for f(x)=cosx at x=0. First we need to find the derivatives of cosx and their values for x=0.
f(x)=cosx⇒f(0)=cos(0)=1
f′(x)=−sinx⇒f′(0)=−sin(0)=0
f′′′(x)=sinx⇒f′′′(0)=sin(0)=0
Observe that after f′′′(x), the value of is equal to f(x) , then f(5)(x) is equal to f′(x) and the cycle repeats itself after every four values i.e. 1,0,−1,0.
Thus, the sum of the series is as follows:
Substituting the values :
= \cos (0) + \dfrac{{{x^1}}}{{1!}}\left\\{ { - \sin (0)} \right\\} + \dfrac{{{x^2}}}{{2!}}\left\\{ { - \cos (0)} \right\\} + \dfrac{{{x^3}}}{{3!}}\left\\{ {\sin (0)} \right\\} + \dfrac{{{x^4}}}{{4!}}\left\\{ {\cos (0)} \right\\} + .....
=1+1!x1(0)+2!x2(−1)+3!x3(0)+4!x4(1)+.....
=1+2!x2(−1)+4!x4(1)−.....
It is seen that only the even power of x exists in the final series and there are alternate positive and negative signs, therefore the summation of the series can be written as:
n=0∑∞(2n)!(−1)nx2n [ here n∈W and we take 2n because only the even powers of x exist and (−1)n because of the alternate positive and negative signs.]
Hence, the Taylor’s series for f(x)=cosx is:
1−2!x2+4!x4−6!x6+....
Note:
The factorial of a number denoted by n! is equal to the product of all numbers from 1 to that number. For example 4!=4×3×2×1=24 and 3!=3×2×1=6.