The Maclaurin series of f(x)=cosx is
f(x)=∑n=0∞(−1)n(2n)!x2n
Let us look at some details.
The Maclaurin series for f(x) in general can be found by
f(x)=∑n=0∞n!f(n)(0)xn
Let us find the Maclaurin series for f(x)=cosx.
By taking the derivatives,
f(x)=cosx⇒f(0)=cos(0)=1f′(x)=−sinx⇒f′(0)=−sin(0)=0f′′(x)=−cosx⇒f′′(0)=−cos(0)=−1f′′′(x)=sinx⇒f′′′(0)=sin(0)=0f(4)(x)=cosx⇒f(4)(0)=cos(0)=1
Since f(x)=f(4)(x), the cycle of {1,0,−1,0} repeats itself.
So, we have the series
f(x)=1−2!x2+4!x4−⋯=∑n=0∞(−1)n(2n)!x2n
Comments