Okay, I was programming this game, when I discovered something probably obvious. I realized that I wrongly assumed that when f"(x)=0, it is a point of inflexion. I found that when doing the test for x^4, (at 0, it is the minima); the test came with 0. So is there any way of finding the nature of the extrema in situations such as this?
This is a common mistake, particularly with A-Level math students. The second derivative gives you information about the rate of change of the derivative, or the curvature of the curve. Now, if the second derivative at some point is positive this means that the curvature at this point is concave up, like the shape of y = x^{2}. Equally, if the second derivative is negative at some point, this means that the curvature is concave down, like the shape of y = - x^{2}. Now, a point of inflection means that the curvature of the curve has change, e.g. from concave up before the point, to concave down after the point. Now, if we have some value of x, say x = a such that f''(a)=0; then it is quite possible that this is a point of inflection. However, to be certain of this we need to look at the curvature either side of the point. I.e. we need to take [itex]f''(a - \delta)[/itex] and [itex]f''(a + \delta)[/itex] where [itex]\delta[/itex] is a small positive number. If the sign of the second derivative changes from before x=a to after x=a, then we have a point of inflection. I hope that made sense.
But this is just the same if I drew up a table of values and found the nature of the extremas. Is there a proper definitive test for this?
Well, that's the way it's done in my Calc class. You don't really need a table of values, just a numberline: Code (Text): <---|---> x where x is where the second derivative is 0. Just pick a random value greater than x and see if the second derivative ends up positive or negative, and do the same for a smaller number. If there's a sign change, then there's a point of inflection.
The sign of the function f''(x) in the neighborhood of the point is what determines weather it's a point of inflexion or not. For example, in the function x^2, x^2 stays positive on every value left and right of 0, so 0 is not a point of inflexion of the function x^4. For a point of inflexion to occur, the derivative has to change sign, by definition.