Solveeit Logo

Question

Question: Find the Taylor series for \[f\left( x \right) = \cos x\]....

Find the Taylor series for f(x)=cosxf\left( x \right) = \cos x.

Explanation

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)f\left( x \right) at x=ax = a(where aa is any real or complex number) can be found by the formula : n=0f(n)(a)n!(xa)n\sum\limits_{n = 0}^\infty {\dfrac{{{f^{\left( n \right)}}\left( a \right)}}{{n!}}} {\left( {x - a} \right)^n} (where f(n)(x){f^{(n)}}(x) is the nth derivative of f(x)f(x) at x=ax = a).
Let us find the Taylor series for f(x)=cosxf(x) = \cos x at x=0x = 0. First we need to find the derivatives of cosx\cos x and their values for x=0x = 0.
f(x)=cosxf(0)=cos(0)=1f(x) = \cos x \Rightarrow f(0) = \cos (0) = 1
f(x)=sinxf(0)=sin(0)=0f'(x) = - \sin x \Rightarrow f'(0) = - \sin (0) = 0

f(x)=sinxf(0)=sin(0)=0f'''(x) = \sin x \Rightarrow f'''(0) = \sin (0) = 0

Observe that after f(x)f'''(x), the value of is equal to f(x)f(x) , then f(5)(x){f^{(5)}}(x) is equal to f(x)f'(x) and the cycle repeats itself after every four values i.e. 1,0,1,01,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+x11!(0)+x22!(1)+x33!(0)+x44!(1)+.....= 1 + \dfrac{{{x^1}}}{{1!}}(0) + \dfrac{{{x^2}}}{{2!}}( - 1) + \dfrac{{{x^3}}}{{3!}}(0) + \dfrac{{{x^4}}}{{4!}}(1) + .....
=1+x22!(1)+x44!(1).....= 1 + \dfrac{{{x^2}}}{{2!}}( - 1) + \dfrac{{{x^4}}}{{4!}}(1) - .....

It is seen that only the even power of xx 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(1)nx2n(2n)!\sum\limits_{n = 0}^\infty {\dfrac{{{{\left( { - 1} \right)}^n}{x^{2n}}}}{{\left( {2n} \right)!}}} [ here nWn \in W and we take 2n2n because only the even powers of xx exist and (1)n{( - 1)^n} because of the alternate positive and negative signs.]

Hence, the Taylor’s series for f(x)=cosxf(x) = \cos x is:
1x22!+x44!x66!+....1 - \dfrac{{{x^2}}}{{2!}} + \dfrac{{{x^4}}}{{4!}} - \dfrac{{{x^6}}}{{6!}} + ....

Note:
The factorial of a number denoted by n!n! is equal to the product of all numbers from 11 to that number. For example 4!=4×3×2×1=244! = 4 \times 3 \times 2 \times 1 = 24 and 3!=3×2×1=63! = 3 \times 2 \times 1 = 6.