Ma · Mathematics

Can a Function Have First and Second Derivatives Equal to Zero?

Published By the 9to5Science editorial team

At a glance

  1. 1. Check the condition

    Both the first derivative and the second derivative must exist at the same input and equal zero there.

  2. 2. Try a simple example

    For f(x) = x cubed, both derivatives are zero at x = 0.

  3. 3. Interpret the result

    The point may be a flat inflection point or a local minimum; the two zero derivatives alone do not decide.

Yes. A function can have both its first derivative and its second derivative equal to zero at the same point. For example, take f(x)=x3f(x)=x^3. At x=0x=0, both derivatives are zero.

This condition says the tangent is horizontal at that point and that the slope is momentarily not changing there. It does not, by itself, tell you the full shape of the graph nearby.

A direct example

Differentiate f(x)=x3f(x)=x^3 once and then again:

f′(x)=3x2,f′′(x)=6x.\begin{aligned} f'(x)&=3x^2,\\ f''(x)&=6x. \end{aligned}

Evaluating at zero gives

f′(0)=0,f′′(0)=0.f'(0)=0, \qquad f''(0)=0.

The graph of x3x^3 has a horizontal tangent at the origin, but it continues increasing through the origin. Under the common definition of an inflection point as a point where concavity changes, the origin is an inflection point: the second derivative is negative for x<0x<0 and positive for x>0x>0.

So the conditions are entirely compatible. The first derivative being zero means the tangent line is horizontal; the second derivative being zero means the slope of the graph has derivative zero at that input.

The point does not have to be an inflection point

The same two derivative conditions can occur at a local minimum. Consider g(x)=x4g(x)=x^4:

g′(x)=4x3,g′′(x)=12x2.\begin{aligned} g'(x)&=4x^3,\\ g''(x)&=12x^2. \end{aligned}

Thus g′(0)=g′′(0)=0g'(0)=g''(0)=0. But x4≥0x^4\geq 0 for every real xx, so gg has a local (and global) minimum at zero. Its concavity does not switch from downward to upward across zero; the graph is concave upward on both sides.

These examples show why knowing that the first two derivatives vanish is not enough to classify the point. The function’s behavior may depend on higher powers or other terms. For sufficiently smooth functions, a Taylor expansion can make that dependence visible: after subtracting f(a)f(a), the constant term is zero; if the linear and quadratic terms also vanish, the first nonzero higher-order term, when one exists, often controls the nearby shape.

How to check a particular function

If you are given a function and want to know whether its first and second derivatives vanish at some point, use this procedure:

  1. Find f′(x)f'(x) and f′′(x)f''(x), checking that both derivatives exist where you will evaluate them.
  2. Solve f′(a)=0f'(a)=0 to find possible points aa.
  3. Test each candidate in the second derivative: retain only points for which f′′(a)=0f''(a)=0 as well.

For example, for f(x)=x3f(x)=x^3, solving f′(x)=3x2=0f'(x)=3x^2=0 gives x=0x=0. Substituting into f′′(x)=6xf''(x)=6x gives f′′(0)=0f''(0)=0, so zero satisfies both conditions.

The same approach works for a point other than zero. If h(x)=(x−2)3+5h(x)=(x-2)^3+5, then h′(x)=3(x−2)2h'(x)=3(x-2)^2 and h′′(x)=6(x−2)h''(x)=6(x-2). At x=2x=2, both derivatives are zero. The shift in the input and output changes the location of the point, not the underlying derivative behavior.

What the conditions do and do not imply

If f′(a)=0f'(a)=0, then, when the derivative exists, the graph has a horizontal tangent at x=ax=a. Such a point is called a stationary point. It could be a local maximum, a local minimum, or a stationary inflection point.

If additionally f′′(a)=0f''(a)=0, the usual second derivative test does not settle which possibility occurs. That test gives a local maximum when f′(a)=0f'(a)=0 and f′′(a)<0f''(a)<0, and a local minimum when f′(a)=0f'(a)=0 and f′′(a)>0f''(a)>0. When the second derivative is zero, the test is inconclusive—not evidence that there is no extremum.

Nor do the two equalities imply that the function is constant. The examples x3x^3 and x4x^4 are both nonconstant. They also do not guarantee an inflection point: x4x^4 has a minimum instead.

Common mistakes

  • Assuming a zero second derivative means an inflection point. Concavity may not change, as x4x^4 demonstrates.
  • Treating the second derivative test as a verdict when it equals zero. In that case, use another method, such as examining the function on either side of the point or checking higher derivatives.
  • Confusing a stationary point with an extremum. A horizontal tangent can occur while the function keeps increasing, as it does for x3x^3 at zero.
  • Forgetting that both derivatives must exist. A point where a derivative is undefined cannot satisfy the stated condition, even if a graph appears to have a flat-looking corner or cusp.

Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.