math.wiki
Functions › Polynomial functions › Cubic, quartic and higher degree functions
Open on the map
Algebra 2

Cubic, quartic and higher degree functions

The graph of y = x^3 is one curve. What shapes can the graph of any degree three function take, and what in its formula decides which one you get?

Where you are 6 in Polynomial functions

Why this exists

The cubing function y = x^3 levels off for an instant at the origin, and shifting or stretching it, as in Graphing by transforming a parent graph, never adds a hill or a valley. Yet y = x^3 - 3x has both. So the cubics are not all copies of one curve, but they are close: every cubic has one of exactly three shapes, one number made from its coefficients says which, and each is balanced about a single point where its bend changes direction.

Definition

A cubic function is a polynomial function of degree 3:

f(x) = ax^3 + bx^2 + cx + d, \qquad a \neq 0.

Degree 4 gives a quartic and degree 5 a quintic. As in Degree, end behavior and the shape of a polynomial graph, a turning point is a peak or a valley.

A chord joins two points of a graph. A graph bends upward on an interval if the midpoint of every chord there lies above the graph, like a bowl, and bends downward if it lies below. A point of inflection is where the graph switches from one bend to the other.

Every cubic has one of three shapes:

  • no turn: it only rises, or only falls, and never levels off;
  • a flat point: it only rises or only falls, but levels off for an instant at one point;
  • two turns: a peak and a valley.

A cubic is in factored form when written f(x) = a(x - r_1)(x - r_2)(x - r_3). Its zeros, the x-intercepts, are then r_1, r_2 and r_3.

Intuition

y = x^3 + x
no turn
y = x^3
a flat point
y = x^3 - 3x
two turns
Figure 1The three shapes of a cubic. In each, the dot is the point of inflection, where the bend changes direction.

Look at y = x^3 + px. If p > 0, both x^3 and px increase as x does, so their sum does: no turn. If p = 0 it is y = x^3, with its flat point. If p < 0, the term px pulls the graph down right of 0 and up left of it. Near 0, where x^3 is tiny, that pull wins, making a hill on the left and a valley on the right. Far out x^3 wins again.

Every cubic is one of these three, slid, stretched, and turned over if a < 0. In each, the origin is the point of inflection, and a half-turn about it carries the graph onto itself.

Results

Completing the cube. With h = -\dfrac{b}{3a} and u = x - h, every cubic can be written

\begin{aligned} f(x) &= a\left(u^3 + pu\right) + q, \\ p &= \frac{3ac - b^2}{3a^2}, \quad q = f(h). \end{aligned}

The point of inflection. Every cubic has exactly one, at \left(h, f(h)\right). A half-turn about it carries the graph onto itself: f(h + u) + f(h - u) = 2f(h) for every u.

The shape is decided by the sign of b^2 - 3ac.

b^2 - 3acshape
negativeno turn
zeroa flat point, at the point of inflection
positivetwo turns, at \displaystyle x = \dfrac{-b \pm \sqrt{b^2 - 3ac}}{3a}

Factored form. For f(x) = a(x - r_1)(x - r_2)(x - r_3), the point of inflection has x = \dfrac{r_1 + r_2 + r_3}{3}, the mean of the zeros, and f(0) = -a\,r_1 r_2 r_3. With three different zeros there is one turn between each neighboring pair.

Higher degree. A polynomial of degree n has at most n - 1 turning points, an odd number when n is even and an even number when n is odd. A quartic turns once or three times; a quintic 0, 2 or 4 times.

y = x^4 + x
1 turn
y = \tfrac{1}{10}(x^4 - 4x^3)
1 turn, 1 flat point
y = 4x^4 - 5x^2 + 1
3 turns
y = x^5 + x
no turn
y = x^5 - 5x
2 turns
y = x^5 - 7x^3 + 6x
4 turns
Figure 2Quartics turn an odd number of times, quintics an even number.
Why it is true

Completing the cube. Put x = u + h and expand with the cube of a binomial from Special products:

\begin{aligned} f(u + h) = {} & au^3 + (3ah + b)u^2 \\ & + (3ah^2 + 2bh + c)u + f(h). \end{aligned}

The u^2 term vanishes exactly when \displaystyle h = -\frac{b}{3a}, the same move as completing the square, and then the u coefficient is \displaystyle c - \frac{b^2}{3a} = ap.

The half-turn. Let g(u) = u^3 + pu. Then g(-u) = -g(u), so f(h + u) + f(h - u) = 2q.

The bend. For inputs u_1 \neq u_2 the pu terms cancel, and

\begin{aligned} & \tfrac{1}{2}\left(g(u_1) + g(u_2)\right) - g\!\left(\tfrac{u_1 + u_2}{2}\right) \\ & \quad = \tfrac{3}{8}(u_1 + u_2)(u_1 - u_2)^2. \end{aligned}

This is positive when both inputs are right of 0 and negative when both are left of it, so the bend changes at u = 0 and nowhere else. A factor a < 0 swaps the sides.

The shape. Since 3a^2 > 0, p has the opposite sign to b^2 - 3ac. For u_1 < u_2,

\begin{aligned} & g(u_2) - g(u_1) \\ & \quad = (u_2 - u_1)(u_1^2 + u_1 u_2 + u_2^2 + p), \end{aligned}

and u_1^2 + u_1 u_2 + u_2^2 is half of u_1^2 + u_2^2 + (u_1 + u_2)^2, so it is never negative. If p > 0 the bracket is at least p, so g always rises and never levels off. If p = 0, g = u^3. If p < 0, write p = -3t^2 with t > 0, so the bracket is u_1^2 + u_1 u_2 + u_2^2 - 3t^2. When both inputs are at least t, or both at most -t, each of u_1^2, u_1 u_2 and u_2^2 is at least t^2, and not all three equal it (that would force u_1 = u_2), so the bracket is positive and g rises. When both lie between -t and t, each is at most t^2, again not all equal to it, so the bracket is negative and g falls. Rising, falling, rising: a peak at u = -t, a valley at u = t, and no other turn. Then h \pm t simplifies to \displaystyle \frac{-b \pm \sqrt{b^2 - 3ac}}{3a}.

Factored form. Multiplying out gives b = -a(r_1 + r_2 + r_3) and d = -a\,r_1 r_2 r_3. Between neighboring zeros the graph leaves the axis and comes back, so it turns at least once in each of the two gaps; a cubic turns at most twice, so exactly once in each.

Turn counts. With odd degree the ends point opposite ways, so the graph moves the same way (up or down) at start and finish: an even number of switches. With even degree, an odd number.

Worked examples

Example 1

A cubic that never turns

Show that f(x) = x^3 + 2x has no turning point, and find its zeros and its point of inflection.

Solution

Both x^3 and 2x increase as x increases, so their sum does: the graph only rises. The test agrees: a = 1, b = 0, c = 2 give b^2 - 3ac = -6 < 0.

Factor: x^3 + 2x = x(x^2 + 2). Since x^2 + 2 \geq 2 is never zero, the only real zero is x = 0. With b = 0, h = 0, so the point of inflection is (0, f(0)) = (0, 0).

Example 2

A cubic in factored form

For g(x) = (x + 1)(x - 2)(x - 4), find the zeros, the y-intercept, the sign of g between the zeros and the point of inflection.

Solution

A product is zero exactly when a factor is, so the zeros are -1, 2 and 4. The y-intercept is g(0) = (1)(-2)(-4) = 8. The leading term is x \cdot x \cdot x = x^3, so the graph falls to the left and rises to the right.

x + 1x - 2x - 4g(x)
x < -1----
-1 < x < 2+--+
2 < x < 4++--
x > 4++++

Above the axis between -1 and 2 means a peak there; below between 2 and 4, a valley. The point of inflection is at the mean of the zeros, \displaystyle x = \frac{-1 + 2 + 4}{3} = \frac{5}{3}, where

g\!\left(\tfrac{5}{3}\right) = \left(\tfrac{8}{3}\right)\left(-\tfrac{1}{3}\right)\left(-\tfrac{7}{3}\right) = \tfrac{56}{27}.
−1 1 2 3 4 5 −4 4 x y
Figure 3The graph of g(x) = (x + 1)(x - 2)(x - 4) in Example 2.
Example 3

Turning points by completing the cube

Find the point of inflection and the turning points of k(x) = -x^3 + 3x^2.

Solution

Here a = -1, b = 3, c = 0, so \displaystyle h = -\frac{3}{3(-1)} = 1 and k(1) = 2. Putting x = u + 1,

\begin{aligned} k &= -(u^3 + 3u^2 + 3u + 1) + 3(u^2 + 2u + 1) \\ &= -u^3 + 3u + 2. \end{aligned}

So p = -3 < 0: two turns, at \displaystyle x = \frac{-3 \pm 3}{-3}, that is x = 0 and x = 2, with k(0) = 0 and k(2) = -8 + 12 = 4. Since a < 0 the graph comes down from the top left, so (0, 0) is the valley and (2, 4) the peak. They balance about the point of inflection: \displaystyle \frac{0 + 4}{2} = 2 = k(1).

A check without the formula: k(x) = x^2(3 - x) \geq 0 whenever x \leq 3, and 4 - k(x) = (x - 2)^2(x + 1) \geq 0 whenever x \geq -1. At x = 0 the graph touches the axis instead of crossing; Zeros and multiplicity explains why.

−1 1 2 3 2 4 x y (2, 4) (1, 2)
Figure 4The graph of k(x) = -x^3 + 3x^2 in Example 3. Valley and peak sit at equal distances either side of the point of inflection.
Example 4

Which coefficient gives which shape

For which values of k does m(x) = x^3 + kx^2 + 12x have no turn, a flat point, or two turns?

Solution

With a = 1, b = k, c = 12, b^2 - 3ac = k^2 - 36.

  • No turn when k^2 < 36, that is -6 < k < 6.
  • A flat point when k = \pm 6. For k = 6, m(x) = (x + 2)^3 - 8, the cubing graph moved so its flat point is (-2, -8). For k = -6, m(x) = (x - 2)^3 + 8, flat at (2, 8).
  • Two turns when k < -6 or k > 6.
Example 5

A quartic with three turns

For q(x) = 4x^4 - 5x^2 + 1, find the zeros, the number of turns, the shape and the lowest value.

Solution

As a quadratic in x^2, factored completely: q(x) = (4x^2 - 1)(x^2 - 1), which is (2x - 1)(2x + 1)(x - 1)(x + 1), with zeros \displaystyle \pm \frac{1}{2} and \pm 1.

Four zeros leave three gaps, each holding a turn, and degree 4 allows at most three. Both ends rise, so the turns go valley, peak, valley: a W. Since q(-x) = q(x) the graph is symmetric about the y-axis, and the peak is (0, 1).

Completing the square in x^2, \displaystyle q(x) = 4\left(x^2 - \frac{5}{8}\right)^2 - \frac{9}{16}, so the lowest value is \displaystyle -\frac{9}{16}, at \displaystyle x = \pm \frac{\sqrt{10}}{4} \approx \pm 0.79.

Example 6

Haukur’s baking tin

Haukur cuts a square of side x cm from each corner of a 20 cm by 14 cm sheet of tin and folds up the sides into an open baking tin for the bakery oven. Its volume is V(x) = x(20 - 2x)(14 - 2x) cubic centimeters. Find the domain and the cut that gives the largest volume.

Solution

The tin is a box of height x on a base 20 - 2x by 14 - 2x, so this is the volume of a box. Every length must be positive, so 0 < x < 7.

On all real numbers the cubic has zeros 0, 7 and 10. Expanding, V(x) = 4x^3 - 68x^2 + 280x, and b^2 - 3ac = 4624 - 3360 = 1264 = 16 \cdot 79. The turns are at

x = \frac{68 \pm 4\sqrt{79}}{12} = \frac{17 \pm \sqrt{79}}{3}.

The plus sign gives x \approx 8.63, outside the domain. Since a > 0 the graph rises first, so the smaller turn, x \approx 2.70 from the minus sign, is the peak, and it is the only turn in 0 < x < 7. A table agrees:

x122.734
V(x)216320339.012336288

Cutting squares of side about 2.70 cm gives the largest tin, about 339 cubic centimeters.

1 2 3 4 5 6 7 100 200 300 x V (2.70, 339)
Figure 5Haukur’s baking tin in Example 6. Only the part of the cubic with 0 < x < 7 describes a real tin.

Boundaries

  • Everything here needs a \neq 0; otherwise the function is quadratic or less.
  • Factored form with three real factors exists only when the cubic has three real zeros, counting repeats. x^3 + 2x has one, and the best it allows is x(x^2 + 2).
  • The inflection and turn formulas are for cubics only. A quartic need not have exactly one point of inflection: y = x^4 has none, and 4x^4 - 5x^2 + 1 has two.
  • A flat point is not a turn; the turn counts count only switches between rising and falling.
  • In a context the cubic holds only on its domain: Haukur’s formula gives a positive “volume” for x > 10.

Where this goes next

Zeros and multiplicity explains why Example 3 touched the axis, and Graphing polynomial functions combines zeros, their repeats and the ends to sketch any factored polynomial. When factors are not given, Polynomial long division, The remainder and factor theorems and The rational root theorem find them. Building a polynomial from its zeros runs factored form backwards, Modeling with polynomial functions fits cubics to data like Haukur’s, and The fundamental theorem of algebra counts the zeros. In calculus the bend becomes concavity.

Exercises

Shapes of cubics

  1. Explain why h(x) = x^3 + 5x has no turning point, and find its real zeros.
  2. For f(x) = x^3 - 6x^2 + 9x + 1, find the point of inflection and the turning points, and check that they balance about it.
  3. Decide the shape of each cubic. (a) x^3 + x^2 + x (b) 2x^3 - 6x^2 + 6x - 1 (c) -x^3 + 4x^2 - 5x
  4. Write g(x) = x^3 + 3x^2 - 9x + 2 as (x + 1)^3 + p(x + 1) + q, then find its turning points.
  5. For which k does y = 2x^3 + 6x^2 + kx have no turning point? For which k does it have a flat point, and where is it?

Factored form

  1. For f(x) = (x + 3)(x - 1)(x - 5), find the zeros, the y-intercept, the sign of f between the zeros, and the point of inflection.
  2. For g(x) = -2(x + 2)(x - 1)(x - 3), find the end behavior, the y-intercept, the sign of g between the zeros, and the point of inflection.
  3. Expand f from exercise 6 and find the x-coordinates of its turning points.

Quartics and beyond

  1. For p(x) = x^4 - 13x^2 + 36, find the zeros, the number of turns, the shape and the lowest value.
  2. How many turning points can a polynomial of degree 6 have? Of degree 7?
  3. A graph comes in from the top left, leaves at the bottom right, and turns exactly twice. Could it be a quartic? What is its least possible degree?
  4. Can a quartic have no turning point? Explain.

Volumes

  1. Achieng cuts a square of side x cm from each corner of a 12 cm by 12 cm sheet and folds an open tray, so V(x) = x(12 - 2x)^2. Find the domain, the turning points of the cubic, and the largest volume.
  2. Itzel folds an open tin the same way from a 30 cm by 16 cm sheet: V(x) = x(30 - 2x)(16 - 2x). Find the domain and the exact cut that gives the largest volume, and that volume.
  3. Bolat’s loaf tin is x cm wide, x + 4 cm long and x - 2 cm deep. Explain why its volume V(x) = x(x + 4)(x - 2) increases on its domain, and find the width that gives 64 cubic centimeters.

Explaining

  1. Show that a cubic whose three zeros are equally spaced, m - s, m and m + s, has its point of inflection on the x-axis.
  2. Explain why a cubic with three different real zeros must have two turns.
  3. Desislava graphs \displaystyle y = x^3 - \frac{x}{100} zoomed out and sees what looks like y = x^3. Explain why it has two turns, find where, and say why she cannot see them.
  4. Explain why every quartic with a positive leading coefficient has a lowest point, but no cubic has one.
Answers
  1. x^3 and 5x both increase with x, so their sum does (b^2 - 3ac = -15 < 0). x^3 + 5x = x(x^2 + 5) with x^2 + 5 \geq 5, so the only real zero is x = 0.
  2. h = 2, f(2) = 3: inflection (2, 3). b^2 - 3ac = 9, so turns at \displaystyle x = \frac{6 \pm 3}{3}: peak (1, 5), valley (3, 1), and \displaystyle \frac{5 + 1}{2} = 3.
  3. (a) 1 - 3 = -2 < 0: no turn. (b) 36 - 36 = 0: flat point; it is 2(x - 1)^3 + 1, flat at (1, 1). (c) 16 - 15 = 1 > 0: two turns, at x = 1 and \displaystyle x = \frac{5}{3}.
  4. g(x) - (x + 1)^3 = -12x + 1, so g(x) = (x + 1)^3 - 12(x + 1) + 13. With p = -12, t = 2, so turns where x + 1 = \pm 2: peak (-3, 29), valley (1, -3).
  5. b^2 - 3ac = 36 - 6k. No turn when k > 6. At k = 6, 2x^3 + 6x^2 + 6x = 2(x + 1)^3 - 2, flat at (-1, -2). Two turns when k < 6.
  6. Zeros -3, 1, 5; f(0) = (3)(-1)(-5) = 15. Negative, positive, negative, positive across the four intervals from left to right. Inflection at \displaystyle x = \frac{-3 + 1 + 5}{3} = 1, so (1, 0).
  7. Leading term -2x^3: as x \to -\infty, g(x) \to \infty; as x \to \infty, g(x) \to -\infty. g(0) = -2(2)(-1)(-3) = -12. Positive, negative, positive, negative from left to right. Inflection at \displaystyle x = \frac{2}{3}, value \displaystyle -\frac{112}{27}.
  8. f(x) = x^3 - 3x^2 - 13x + 15, b^2 - 3ac = 48, turns at \displaystyle x = 1 \pm \frac{4\sqrt{3}}{3}, about -1.31 (peak) and 3.31 (valley).
  9. (x^2 - 4)(x^2 - 9): zeros \pm 2, \pm 3; three turns, a W, peak (0, 36). \displaystyle p(x) = \left(x^2 - \frac{13}{2}\right)^2 - \frac{25}{4}, so the lowest value is \displaystyle -\frac{25}{4}, at x \approx \pm 2.55.
  10. Degree 6: 1, 3 or 5. Degree 7: 0, 2, 4 or 6.
  11. The ends point opposite ways, so the degree is odd: not a quartic. -x^3 + 3x^2 from Example 3 fits, so the least degree is 3.
  12. No. Both ends of a quartic point the same way, so the graph must switch between falling and rising at least once.
  13. 0 < x < 6. V(x) = 4x^3 - 48x^2 + 144x, b^2 - 3ac = 576, turns at \displaystyle x = \frac{48 \pm 24}{12}, so x = 2 and x = 6, the end of the domain. Largest volume V(2) = 2 \cdot 8 \cdot 8 = 128 cubic centimeters.
  14. 0 < x < 8. V(x) = 4x^3 - 92x^2 + 480x, b^2 - 3ac = 2704 = 52^2, turns at x = 12 (outside) and \displaystyle x = \frac{10}{3}. \displaystyle V\left(\frac{10}{3}\right) = \frac{19600}{27} \approx 725.9 cubic centimeters.
  15. The depth is positive, so x > 2. There all three factors are positive and grow with x, so their product grows. V(4) = 4 \cdot 8 \cdot 2 = 64, so the width is 4 cm.
  16. The mean of the zeros is m, itself a zero, so the point of inflection is (m, 0). In exercise 6, m = 1, giving (1, 0).
  17. A cubic with no turn or a flat point only rises or only falls, so it meets the axis at most once. Three zeros rule both out.
  18. \displaystyle x\left(x - \frac{1}{10}\right)\left(x + \frac{1}{10}\right) has three zeros, so two turns, at \displaystyle x = \pm\frac{\sqrt{3}}{30} \approx \pm 0.058 since \displaystyle b^2 - 3ac = \frac{3}{100}. The peak’s height is only \displaystyle \frac{\sqrt{3}}{4500} \approx 0.0004.
  19. A quartic with a > 0 rises at both ends, so outside some interval its values exceed its value at 0, and on that interval a graph with no breaks has a lowest value. A cubic has one end falling without bound.
kg1128 · updated 2026-10-14 · CC-BY-SA-4.0