Algebra 2

The squaring and cubing functions

Squaring a number forgets its sign and cubing keeps it. What does that one difference do to the two graphs?

Where you are 3 in Parent functions

Why this exists

The identity function draws a straight line, and any two of its points fix it. Many rules are not like that. A square deck panel of side s has area s^2, and a cube of concrete of side s has volume s^3; neither grows by the same amount for each step in s, so neither graph is a line.

Rather than plot every such rule from scratch, it pays to know two graphs by heart: the graph of squaring and the graph of cubing. Each is one of the Parent functions, the plainest member of a family. Every quadratic function is a moved and stretched copy of the first, and the second is where cubic functions start.

Definition

The squaring function and the cubing function are

f(x) = x^2 \qquad\text{and}\qquad g(x) = x^3

The first multiplies its input by itself once, the second twice: f(-2) = (-2)(-2) = 4 and g(-2) = (-2)(-2)(-2) = -8. Their graphs are all the points (x, x^2) and all the points (x, x^3). The graph of y = x^2 is a parabola.

The key points are the ones at x = -1, 0 and 1, where the outputs are small integers, with x = \pm 2 to show how fast each graph climbs:

x-2-1012
x^241014
x^3-8-1018

The points are joined by smooth curves, since every input in between has an output too.

x y −2 2 −8 −4 4 8
y = x^2
x y −2 2 −8 −4 4 8
y = x^3
Figure 1The two parents. Squaring never gives a negative output, so the U stays on or above the x-axis; cubing keeps the sign, so its graph runs from the lower left to the upper right.

The domain of a function is the set of inputs it accepts, and the range is the set of outputs it gives, both read off a graph as in domain and range from a graph. Any real number can be squared or cubed, so both domains are all real numbers. The ranges differ, and that difference is the main fact of this lesson.

Intuition

Squaring forgets the sign. A number and its opposite have the same square: (-a)^2 = a^2. So every point (a, a^2) has a partner (-a, a^2) at the same height, and the U is its own mirror image in the y-axis. No square is negative, so the U never dips below the x-axis. Why it bends into a smooth U rather than two straight arms is worked out in the shape of a parabola.

Cubing keeps the sign. Three negative factors give a negative product: (-a)^3 = -a^3. So negative inputs give negative outputs, and the graph runs from the lower left to the upper right. Turn the right half of the graph a half turn about the origin and it lands exactly on the left half; symmetry about the axis and the origin gives this a name.

Near 0, flat; far from 0, steep. Multiplying by a number between 0 and 1 makes a positive number smaller: 0.1^2 = 0.01 and 0.1^3 = 0.001. So close to the origin both graphs hug the x-axis, the cubic more tightly. Past 1 each extra factor makes the output larger: 10^2 = 100 and 10^3 = 1000. All three of y = x, y = x^2 and y = x^3 pass through (0, 0) and (1, 1), and they swap order at 1.

x y −1 1 −1 1
y = x
y = x^2
y = x^3
Figure 2Between 0 and 1, each extra factor of x makes the output smaller; beyond 1, each one makes it larger. The three graphs swap order at (1, 1).

Results

The squaring function y = x^2:

  • passes through (-1, 1), (0, 0), (1, 1), (-2, 4) and (2, 4);
  • has domain all real numbers and range y \ge 0;
  • falls for x \le 0 and rises for x \ge 0, so (0, 0), the vertex, is its lowest point;
  • reaches every height c > 0 twice, at \displaystyle x = \sqrt{c} and \displaystyle x = -\sqrt{c}, the height 0 once, and no negative height.

The cubing function y = x^3:

  • passes through (-1, -1), (0, 0), (1, 1), (-2, -8) and (2, 8);
  • has domain all real numbers and range all real numbers;
  • rises everywhere: if a < b then a^3 < b^3, so it has no lowest or highest point;
  • reaches every height c exactly once, at the cube root \displaystyle x = \sqrt[3]{c};
  • is level for an instant at the origin but does not turn there.

Comparing them. For 0 < x < 1, x^3 < x^2 < x. For x > 1, x < x^2 < x^3. The graphs of y = x^2 and y = x^3 meet only at (0, 0) and (1, 1).

Why it is true

The range of squaring. For x \ne 0, the product x \cdot x has two factors of the same sign, so it is positive; and 0^2 = 0. So no output is negative. Every c \ge 0 is an output, since \displaystyle (\sqrt{c})^2 = c. No other inputs give c, because x^2 = c means \displaystyle (x - \sqrt{c})(x + \sqrt{c}) = 0, so \displaystyle x = \sqrt{c} or \displaystyle x = -\sqrt{c}, which are two inputs when c > 0 and one when c = 0.

Squaring falls, then rises. For 0 \le a < b, b^2 - a^2 = (b - a)(b + a), a product of two positive numbers, so b^2 > a^2: the right half rises. The left half is its mirror image, so it falls.

Cubing always rises. Take a < b and factor:

b^3 - a^3 = (b - a)(a^2 + ab + b^2)

Multiplying out the right side gives back the left, which checks the factoring. The first factor is positive. Completing the square, a^2 + ab + b^2 = \left(a + \tfrac{b}{2}\right)^2 + \tfrac{3}{4}b^2, a sum of two terms that are never negative. It is 0 only when both terms are, that is when b = 0 and a = 0, impossible since a < b. So both factors are positive and b^3 > a^3. A graph that always rises meets each horizontal line at most once, and it meets every one, since every real c has a cube root, \displaystyle \sqrt[3]{c}, with \displaystyle \left(\sqrt[3]{c}\right)^3 = c. So the range is all real numbers.

Level at the origin. The segment from (0, 0) to (t, t^3) has slope \displaystyle \frac{t^3}{t} = t^2, which shrinks toward 0 as t shrinks. So the curve is flat at the origin, yet rises on both sides of it.

Comparing. x^3 - x^2 = x^2(x - 1) is 0 only at x = 0 and x = 1. For x > 0 its sign is the sign of x - 1, so x^3 < x^2 when 0 < x < 1 and x^3 > x^2 when x > 1. In the same way x^2 - x = x(x - 1) settles x^2 against x.

Worked examples

Example 1

Outputs at three inputs

Find f(x) = x^2 and g(x) = x^3 at x = -3, x = -1.5 and x = 2.5, and say on which graph each resulting point lies.

Solution

Square first, then multiply by the input once more to get the cube.

At -3: f(-3) = (-3)(-3) = 9, two negative factors giving a positive product, and g(-3) = 9 \cdot (-3) = -27.

At -1.5: f(-1.5) = 2.25 and g(-1.5) = 2.25 \cdot (-1.5) = -3.375.

At 2.5: f(2.5) = 6.25 and g(2.5) = 6.25 \cdot 2.5 = 15.625.

The points (-3, 9), (-1.5, 2.25) and (2.5, 6.25) lie on the parabola, all above the x-axis. The points (-3, -27), (-1.5, -3.375) and (2.5, 15.625) lie on the cubic, and the two with negative inputs are below the axis, because cubing kept the sign.

Example 2

On which graph?

Decide whether each point lies on y = x^2, on y = x^3, on both or on neither: (4, 64), (0.5, 0.25), (-1.5, 3.375), (0, 0).

Solution

A point (a, b) lies on y = x^2 exactly when b = a^2, and on y = x^3 exactly when b = a^3.

4^2 = 16 and 4^3 = 64, so (4, 64) is on the cubic only.

0.5^2 = 0.25 and 0.5^3 = 0.125, so (0.5, 0.25) is on the parabola only.

(-1.5)^2 = 2.25 and (-1.5)^3 = -3.375, so (-1.5, 3.375) is on neither. The height 3.375 belongs to the input 1.5; the given point is the mirror image of (1.5, 3.375) in the y-axis, and the cubic is not its own mirror image there.

0^2 = 0^3 = 0, so (0, 0) is on both.

Example 3

Reading heights

Find every x with x^2 = 6.25, with x^2 = 0 and with x^2 = -4. Then find every x with x^3 = 64 and with x^3 = -3.375.

Solution

Each question asks where a horizontal line meets a graph.

The line y = 6.25 meets the U twice, at x = 2.5 and x = -2.5, since (\pm 2.5)^2 = 6.25. The line y = 0 touches it only at the vertex, so x = 0. The line y = -4 lies wholly below the U: no square is negative, so there is no solution.

The cubic always rises, so it meets each horizontal line exactly once. Since 4^3 = 64, the only solution of x^3 = 64 is x = 4; the input -4 gives -64 instead. From Example 1, (-1.5)^3 = -3.375, so x = -1.5 is the only solution of x^3 = -3.375.

Example 4

Which is bigger?

Put x, x^2 and x^3 in order from least to greatest at x = 0.5 and at x = 4. Then find every point where the graphs of y = x^2 and y = x^3 meet.

Solution

At x = 0.5 the three values are 0.5, 0.25 and 0.125, so x^3 < x^2 < x. Each extra factor of 0.5 halves the value.

At x = 4 they are 4, 16 and 64, so x < x^2 < x^3. Each extra factor of 4 multiplies the value by 4.

The order of x^2 and x^3 flips between 0.5 and 4, so their graphs must cross. They meet where x^3 = x^2, that is x^3 - x^2 = x^2(x - 1) = 0, so x = 0 or x = 1. The meeting points are (0, 0) and (1, 1), as Figure 2 shows.

Example 5

Range on a stretch of inputs

Find the range of y = x^2 and of y = x^3 when the inputs are limited to -3 \le x \le 2.5.

Solution

For the parabola, the input 0 lies inside the stretch, so the lowest output is the vertex height 0. The highest output comes from the input farthest from 0. That is -3, not 2.5, since -3 is 3 from 0; its output is 9, more than 6.25. So the range is 0 \le y \le 9. The outputs at the two ends, 9 and 6.25, do not by themselves give the range.

The cubic always rises, so its least output is at the left end and its greatest at the right end: (-3)^3 = -27 and 2.5^3 = 15.625. The graph is unbroken, so every height in between is reached, and the range is -27 \le y \le 15.625.

Example 6

A suspension bridge

The cable of a suspension bridge carrying an evenly spread deck hangs in a parabola. On Celeste’s scale drawing, the deck lies along the x-axis, the cable follows y = x^2 and touches the deck at the middle, the towers stand at x = -3 and x = 3, and one grid unit is 10 meters. Vertical hangers join the cable to the deck. Find the hanger lengths at x = 0.5 and x = 2.5 in meters, find where the hangers are 40 meters long, and give the domain and range of the cable.

Solution

A hanger reaches from the deck, at height 0, up to the cable, so its length in units is the cable height x^2.

−3 −2 −1 0 1 2 3 3 6 9 tower cable x
Figure 3Celeste’s drawing. Each hanger is as long as the cable is high above the deck, so a hanger at x is x^2 units long.

At x = 0.5 it is 0.25 units, which is 0.25 \cdot 10 = 2.5 meters. At x = 2.5 it is 6.25 units, or 62.5 meters. The hanger at x = -2.5 is the same length, since squaring forgets the sign: hangers come in matching pairs.

40 meters is 4 units, and x^2 = 4 at x = 2 and x = -2.

The cable runs only between the towers, so its domain is -3 \le x \le 3, not all real numbers. Its lowest point is (0, 0) and its highest are the tower tops, 3^2 = 9 units up, so the range is 0 \le y \le 9: the cable meets each tower 90 meters above the deck.

Boundaries

The key points, domain and range here belong to the bare rules x^2 and x^3. Once a number is added, multiplied in or put inside, the graph moves: that is shifting, reflection and stretching, each of which carries its own key points along.

“All real numbers” is the domain only when nothing else limits the inputs. A cable that stops at its towers, or a side length that must be positive, cuts the domain down, and the range shrinks with it.

Squaring cannot be undone without a choice: x^2 = 9 has two answers, 3 and -3, and the square root sign \displaystyle \sqrt{9} names only the positive one. Cubing can be undone completely, since each output comes from exactly one input.

Where this goes next

The square root and reciprocal functions adds two more parents and sets all of them side by side. The moves in this unit, gathered in combining transformations, turn y = x^2 into any parabola, which is where vertex form comes from, and turn y = x^3 into the simplest cubic functions. The graph that undoes cubing is the cube root graph, the cubic reflected in the line y = x.

Exercises

Outputs and points

  1. Complete the table of y = x^2 and y = x^3 for x = -7, -0.6, 1.2 and 5.
  2. For f(x) = x^2 and g(x) = x^3, find \displaystyle f\left(-\frac{2}{3}\right) and \displaystyle g\left(-\frac{2}{3}\right).
  3. Decide whether each point lies on y = x^2, on y = x^3, or on neither: (-6, 36), (0.4, 0.064), (-0.2, 0.008), (10, 1000).
  4. The point (a, 81) lies on y = x^2. Find every possible a. The point (b, -512) lies on y = x^3. Find b.

Reading heights

  1. Find every x with x^2 = 0.81, and every x with x^2 = -16.
  2. Find every x with x^3 = 0.027, and every x with x^3 = -1000.
  3. How many points of y = x^2 are at height 7, at height 0 and at height -7? Answer the same for y = x^3.

Domain and range

  1. Is -0.001 an output of y = x^2? Of y = x^3? For each yes, give the input.
  2. Find the range of y = x^2 for -2 \le x \le 5.
  3. Find the range of y = x^3 for -2 \le x \le 5.
  4. Find the range of y = x^2 for 1 \le x \le 6.
  5. Find the range of y = x^2 for -5 \le x \le -2.

Comparing the parents

  1. Put x, x^2 and x^3 in order from least to greatest at x = 0.2, at x = -0.2 and at x = 6.
  2. For which x is x^3 > x^2?
  3. Find every point where the graphs of y = x and y = x^3 meet.

The bridge

  1. Gisele draws a longer bridge the same way: cable y = x^2, deck on the x-axis, one unit 10 meters, but towers at x = -3.5 and x = 3.5. Find the hanger lengths in meters at x = 1.2 and x = -1.8, and how high above the deck the cable meets the towers.
  2. Where are Gisele’s hangers 4.9 meters long? Give the domain and range of her cable.
  3. Hakan’s bridge anchors each cable in a cube of concrete. A cube of side s meters has volume V = s^3 cubic meters. Find V when s = 6 and s when V = 343. Which part of the graph of y = x^3 describes the block, and why?

Reasoning

  1. Without plotting any points, explain why the graph of y = x^2 has no point below the x-axis while the graph of y = x^3 does.
  2. Fallon says the graph of y = x^3 turns around at the origin, because it is flat there. Bashir says it does not turn. Who is right? Explain.
Answers
  1. Squares 49, 0.36, 1.44, 25; cubes -343, -0.216, 1.728, 125. For example (-0.6)^3 = 0.36 \cdot (-0.6) = -0.216.
  2. \displaystyle f\left(-\frac{2}{3}\right) = \frac{4}{9} and \displaystyle g\left(-\frac{2}{3}\right) = -\frac{8}{27}. Two negative factors give a positive product, three a negative one.
  3. (-6, 36) is on y = x^2; (0.4, 0.064) and (10, 1000) are on y = x^3; (-0.2, 0.008) is on neither, since (-0.2)^2 = 0.04 and (-0.2)^3 = -0.008.
  4. a = 9 or a = -9, since both square to 81. b = -8 only, since (-8)^3 = -512 and the cubic meets each height once.
  5. x = 0.9 or x = -0.9. x^2 = -16 has no solution: no square is negative.
  6. x = 0.3, since 0.3^3 = 0.027; and x = -10, since (-10)^3 = -1000. Each has one solution.
  7. y = x^2: two, one and none. y = x^3: one at each height, since its range is all real numbers and it always rises.
  8. Not an output of y = x^2, whose outputs are never negative. It is an output of y = x^3, at x = -0.1, since (-0.1)^3 = -0.001.
  9. 0 \le y \le 25. The input 0 is inside, giving the least output 0; the input farthest from 0 is 5, giving 25.
  10. -8 \le y \le 125. The cubic rises, so the ends give (-2)^3 = -8 and 5^3 = 125.
  11. 1 \le y \le 36. The vertex input 0 is not inside, and the parabola rises for x \ge 0, so the ends give the least and greatest outputs.
  12. 4 \le y \le 25. The parabola falls for x \le 0, so the least output is at -2, the end nearer 0, and the greatest at -5.
  13. At 0.2: 0.008 < 0.04 < 0.2, so x^3 < x^2 < x. At -0.2: -0.2 < -0.008 < 0.04, so x < x^3 < x^2. At 6: 6 < 36 < 216, so x < x^2 < x^3.
  14. x > 1. x^3 - x^2 = x^2(x - 1), and x^2 \ge 0, so the difference is positive exactly when x - 1 > 0 and x \ne 0.
  15. (-1, -1), (0, 0) and (1, 1). x^3 = x gives x(x - 1)(x + 1) = 0.
  16. 14.4 meters at x = 1.2 and 32.4 meters at x = -1.8, from 1.44 and 3.24 units. The towers: 3.5^2 = 12.25 units, so 122.5 meters.
  17. 4.9 meters is 0.49 units, so x = 0.7 or x = -0.7. Domain -3.5 \le x \le 3.5, range 0 \le y \le 12.25.
  18. V = 216 cubic meters; s = 7 meters, since 7^3 = 343. Only the part with s > 0, to the right of the origin: a side is a positive length, so the domain is s > 0 and the volumes are V > 0.
  19. For x \ne 0, x \cdot x has two factors of the same sign, so it is positive, and 0^2 = 0; no height is negative. A cube of a negative number has three negative factors, so it is negative: for example (-1)^3 = -1, so (-1, -1) lies below the axis.
  20. Bashir. The graph is flat at the origin, but flat is not turning: for a < b, b^3 - a^3 = (b - a)(a^2 + ab + b^2) > 0, so the outputs rise on both sides, from (-0.1)^3 = -0.001 through 0 to 0.1^3 = 0.001. A turning point needs the graph to rise on one side and fall on the other, as y = x^2 does at its vertex.
kg1128 · updated 2026-10-14 · CC-BY-SA-4.0