And what we get, if you remember from earlier in the course,

is this cyclic pattern of cosines and sines, positive and negative.

Which takes us back to the cosine again after four steps.

If we now evaluate this derivative at point x = 0, we see that the cosine

terms are either 1 or -1, and the sine terms are all 0.

This must mean from a power series perspective,

that every other term will have a zero coefficient.

Notice that these 0s will occur whenever we differentiate an odd number of times.

Which means that all the odd powers of x like x to the one, x cubed,

x to the five, etc. will all be absent from the series.

The even powers of x are all what we call even functions, which means that

they're all symmetrical around the vertical axis, just like cosine is.

So, we can now bring back our general expression for the Maclaurin series and

just start writing out the terms.

The icing on the cake is that at this point,

we just noticed that we can build a neat summation notation

which fully describes this series without having to write out all the terms.

Notice that this expression doesn't even contain any reference to cosine,

as all that we need to know is captured by the minus one to the power of n,

which just keeps flipping from negative to positive and negative again.

Now that we've done all the hard work, we can simply ask our computer to plot

this sequence of increasingly accurate Macclaurin series.

Which hopefully, starting from a horizontal line of y = 1,

will line up with your expectations.

Notice that outside of the region fairly close to the point, x = 0.

The approximation explodes off and becomes useless.

By the time we get our 16th order approximation,

we've pretty much nailed the region shown in our graph here.

Although just outside of these axes,

the function would also be growing hugely positive.

So you must always be careful when handling series approximations

that you know the domain in which it's acceptable.

In the second example, we're going to take a look at the function f(x)

= 1/x which of course, looks like this.

It's a nice simple function but notice the discontinuity at x = 0.

This is absolutely not a well behaved function.

In fact, it's so badly behaved that when we even try and

build the zeroth order approximation, we immediately run into problems.

Because we have to perform the operation 1 divided by 0 which is not defined.

And if you try to ask you computer to do this,

it may give you back the answer NAN, which stands for, not a number.

So, we're going to need to try a different angle of attack.

Clearly, we aren't going to have much luck at the point x = 0.

So why not try going somewhere else, anywhere else.

Let's look at the point x = 1.

Certainly, it passes the first test of being able to evaluate the function at

this point.

However, moving away from x = 0 means that we're now going to need to

use the Taylor Series instead of the Maclaurin Series.

So we now need to find a few derivatives of the function and

see if we can spot a pattern.