Taylor series and extrema of a function

Hello everyone,

if I'm asked to prove that f(x) has a local maxima for x=a (a is a given real number and f: D->R), and if I know that if f has a maxima in a.Then I can use the taylor series of f evaluated in a to prove it. BUT how can I know till what degree of derivation I need to go. sure I could find the associate series of f(x) but it can be really annoying. So is there a way to find how many 2n times I need to expand me series to find what I want, because, for now if the second derivate is equal to zero I check the 4th and so on.

Here is an example:

prove that f(0) is maxima.

how can I know that the 4th derivate at o is not equal to 0.

Thanks in advance.