Solveeit Logo

Question

Question: How do you find the Taylor series for \(f\left( x \right)=\cos x\) centered at \(a=\pi \) ?...

How do you find the Taylor series for f(x)=cosxf\left( x \right)=\cos x centered at a=πa=\pi ?

Explanation

Solution

To find the Taylor series for f(x)=cosxf\left( x \right)=\cos x centered at a=πa=\pi , we will use the formula for Taylor series of a function which is given by f(x)=n=0Nf(n)(a)n!(xa)nf\left( x \right)=\sum\limits_{n=0}^{N}{\dfrac{{{f}^{\left( n \right)}}\left( a \right)}{n!}}{{\left( x-a \right)}^{n}} ., where f(n)(a){{f}^{\left( n \right)}}\left( a \right) is the nth{{n}^{th}} derivative of f(x) at x=ax=a . Then, we will differentiate the given function once, twice, thrice, and so on at x=ax=a and substitute these values in the given formula. Then, we will use the given condition a=πa=\pi and simplify further.

Complete step-by-step solution:
We have to find the Taylor series for f(x)=cosxf\left( x \right)=\cos x centered at a=πa=\pi . We know that Taylor series of a function is given by
f(x)=n=0Nf(n)(a)n!(xa)nf\left( x \right)=\sum\limits_{n=0}^{N}{\dfrac{{{f}^{\left( n \right)}}\left( a \right)}{n!}}{{\left( x-a \right)}^{n}}
where f(n)(a){{f}^{\left( n \right)}}\left( a \right) is the nth{{n}^{th}} derivative of f(x) at x=ax=a .
Let us expand the series.
f(x)=f(a)+f(a)xa1!+f(a)(xa)22!+f(a)(xa)33!+...+fn(a)(xa)nn!f\left( x \right)=f\left( a \right)+{f}'\left( a \right)\dfrac{x-a}{1!}+{f}''\left( a \right)\dfrac{{{\left( x-a \right)}^{2}}}{2!}+{f}'''\left( a \right)\dfrac{{{\left( x-a \right)}^{3}}}{3!}+...+{{f}^{n}}\left( a \right)\dfrac{{{\left( x-a \right)}^{n}}}{n!}
We are given that f(x)=cosxf\left( x \right)=\cos x . Let us differentiate this function with respect to x at x=ax=a .
f(x)x=a=sina{{\left. {f}'\left( x \right) \right|}_{x=a}}=-\sin a
Now, let us again differentiate the above function.
f(x)x=a=cosa{{\left. {f}''\left( x \right) \right|}_{x=a}}=-\cos a
We have to find the third derivative of the given function at x=ax=a .
f(x)x=a=sina{{\left. {f}'''\left( x \right) \right|}_{x=a}}=\sin a
We have to find the fourth derivative of the given function at x=ax=a .
f(x)x=a=cosa{{\left. {{f}'''}'\left( x \right) \right|}_{x=a}}=\cos a
Now, let us substitute these values in the Taylor series.
cosx=cosa+sinaxa1!+cosa(xa)22!+sina(xa)33!+cosa(xa)44!+...\cos x=\cos a+-\sin a\dfrac{x-a}{1!}+-\cos a\dfrac{{{\left( x-a \right)}^{2}}}{2!}+\sin a\dfrac{{{\left( x-a \right)}^{3}}}{3!}+\cos a\dfrac{{{\left( x-a \right)}^{4}}}{4!}+...
We are given that a=πa=\pi . Therefore, the above form becomes
cosx=cosπ+sinπxπ1!+cosπ(xπ)22!+sinπ(xπ)33!+cosπ(xπ)44!+...\Rightarrow \cos x=\cos \pi +-\sin \pi \dfrac{x-\pi }{1!}+-\cos \pi \dfrac{{{\left( x-\pi \right)}^{2}}}{2!}+\sin \pi \dfrac{{{\left( x-\pi \right)}^{3}}}{3!}+\cos \pi \dfrac{{{\left( x-\pi \right)}^{4}}}{4!}+...
We know that sinπ=0\sin \pi =0 . Therefore, all the off terms will be 0.
cosx=cosπ+cosπ(xπ)22!+cosπ(xπ)44!+...\Rightarrow \cos x=\cos \pi +-\cos \pi \dfrac{{{\left( x-\pi \right)}^{2}}}{2!}+\cos \pi \dfrac{{{\left( x-\pi \right)}^{4}}}{4!}+...
We know that cosπ=1\cos \pi =-1 .
cosx=1+(xπ)22!(xπ)44!+...\Rightarrow \cos x=-1+\dfrac{{{\left( x-\pi \right)}^{2}}}{2!}-\dfrac{{{\left( x-\pi \right)}^{4}}}{4!}+...
Therefore, the Taylor series for f(x)=cosxf\left( x \right)=\cos x centered at a=πa=\pi is 1+(xπ)22!(xπ)44!+...-1+\dfrac{{{\left( x-\pi \right)}^{2}}}{2!}-\dfrac{{{\left( x-\pi \right)}^{4}}}{4!}+....

Note: Students must know the Taylor series and to expand them.They must note that Taylor series is a series which is the reason we did not get a finite result. They must know different functions. Students must be thorough with the values of trigonometric functions at basic angles.