audio read-through Discussion: Graphing Polynomials with Technology

This section is optional. There are no web exercises for this section.

The prior section, Multiplicity of Zeroes and Graphical Consequences, mentioned that it's often difficult (or impossible) to get a single to-scale graph of a polynomial that clearly shows the interesting behavior near all the zeroes at the same time.

Also, some graphing software can exhibit puzzling behavior when graphing polynomials, which can leave you scratching your head!

The example of the previous section is re-visited, to more deeply explore the issues that can arise.

Example: Multiplicity of Zeroes

Let $\ P(x) = (x+2)x^5(x-1)^3(x-4)^2\,.$ Then:

$-2\,$ is a simple zero: from the factor
$(x+2) = (x - (-2))$
$0\,$ is a zero of multiplicity $\,5\,$: from the factor
$x^5 = (x - 0)^5$
$1\,$ is a zero of multiplicity $\,3\,$: from the factor
$(x-1)^3$
$4\,$ is a zero of multiplicity $\,2\,$: from the factor
$(x - 4)^2$

Study the graphs of the polynomial $\,P\,$ below, paying close attention to the scales on the $y$-axis. The scales on the $x$-axis are identical in all six graphs.

(A) the graph of a complicated polynomial showing all its zeroes

In (A):

(B) scale from -10000 to 10000

In (B):

(C) scale from -1000 to 1000

In (C):

(D) scale from -100 to 100

In (D):

(E) scale from -10 to 10

In (E):

(F) scale from -1 to 1

In (F):

Why Does Part of the Graph Disappear Between (B) and (C), and Another Part Between (D) and (E)?

Roughly, the problem is this:  near $\,4\,$ and $\,-2\,,$ the function is getting big way too fast.

Here are some details. Note that JSXGraph is the JavaScript-based software that I use for graphing.

The JSXGraph display boxes used for graphs (A) through (F) are $\,200\,$ pixels by $\,200\,$ pixels. (You can view the HTML source for this page, and search for (say) ‘box10’.)

Horizontally, each graph must display from $\,-3\,$ (the left-hand edge) to $\,6\,$ (the right-hand edge) in $\,200\,$ pixels.

Thus, there are $$\frac{6 - (-3)}{200} = \frac{9}{200} = 0.045$$ units per pixel, horizontally.

Here are some function values (and the corresponding points) near $\,4\,$:

$P(4 - 6*0.045) = 6136.41$ $(3.730,6136.41)$
$P(4 - 5*0.045) = 4789.51$ $(3.775,4789.51)$
$P(4 - 4*0.045) = 3439.79$ $(3.820,3439.79)$
$P(4 - 3*0.045) = 2167.99$ $(3.865,2167.99)$
$P(4 - 2*0.045) = 1078.24$ $(3.910,1078.24)$
$P(4 - 1*0.045) = 301.10$ $(3.955,301.10)$
$P(4) = 0$ $(4,0)$
$P(4 + 1*0.045) = 374.26$ $(4.045,374.26)$
$P(4 + 2*0.045) = 1665.69$ $(4.090,1665.69)$
$P(4 + 3*0.045) = 4164.59$ $(4.135,4164.59)$
$P(4 + 4*0.045) = 8216.68$ $(4.18,8216.68)$
$P(4 + 5*0.045) = 14,230.70$ $(4.23,14,230.70)$
$P(4 + 6*0.045) = 22,687.00$ $(4.27,22,687.00)$

From experimentation, it was determined that JSXGraph shows the graph near $\,4\,$ when the vertical scale is $\,[-5543,5543]\,,$ but does not show the graph near $\,4\,$ when the vertical scale is $\,[-5542,5542]\,.$ See (G) and (H) below.

All nine points above with $y$-values less than $\,5543\,$ are plotted in red in both (G) and (H).

Why does JSXGraph ‘connect the dots’ in (G), but not in (H)? In other words, why is the graph near $\,x = 4\,$ shown in (G), but not in (H)?

Evidently JSXGraph uses some method to decide when it is possible to display a meaningful graph. Perhaps the interested reader can study the code to see precisely what is happening here!

(G)
Viewing window for $y$:
$[-5543,5543]$ scale from -5543 to 5543
(H)
Viewing window for $y$:
$[-5542,5542]$ scale from -5542 to 5542
(I)
Viewing window for $y$:
$[-27,27]$ scale from -27 to 27
(J)
Viewing window for $y$:
$[-26,26]$ scale from -26 to 26

The last two viewing windows above illustrate the graph ‘starting’ to disappear near $\,x = -2\,$ (I), and then disappearing completely (J).

In both cases, points $\,(-2.045,-1660.48)\,$ and $\,(-1.955,1175.93)\,$ are far, far below and above the current viewing windows.

The point of this optional section is to illustrate how difficult it can be to get a meaningful viewing window for a graph, and also to illustrate some of the misleading things that can occur when you use technology to produce graphs.