This is Words and Buttons Online — a collection of interactive #tutorials, #demos, and #quizzes about #mathematics, #algorithms and #programming.

Trippy polynomials in arctangent scale

This is a cubic parabola.

x3 + x2 - 4x + 2

You can see that it intersects the x-axis at least two times, and it has at least one local minimum. However, this is not the whole truth. It intersects the x-axis exactly three times, and it has exactly one minimum and one maximum. The plot fails to show that. You can drag-scroll it to the left or zoom out with shift + mouse wheel to find the missing intersection. The plot is interactive, but it can only show a small piece of 2 space at a time.

Let's try something different. Instead of a linear scale, let's use the arctangent scale, which displays everything from -∞ to +∞ on a limited square. Now the same plot looks like this.

Try drag, double click, and shift+mouse wheel if you're browsing from a PC.

Yes, it looks a little unconventional, but you can now see everything.

You can clearly see that the function's domain (all the possible x values) and range (all the possible y values) are both the whole . You can see that it has three intersections with the x-axis, one local maximum, and one local minimum. It starts from -∞ and goes to +∞. Arctangent scale leaves no mystery behind, it shows all the juicy stuff about this function right away.

So let's look at the polynomials using arctangent scale plots.

X-axis intersections and roots

When a function plot intersects the x-axis, it is the same as.

ax3 + bx2 + cx + d = 0

In other words, each intersection is a root of a polynomial equation with the right side being 0.

Now let's make our cubic parabola bounce up and down by oscillating its last coefficient.

x3 + x2 - 4x + d
d ∈ (0, 4)

The same plot in the arctangent scale looks like this.

What can you tell about cubic equations by observing this plot?

Now let's oscillate all the coefficiens.

ax3 + bx2 + cx + d
a ∈ (-1, 1)
b ∈ (-1, 1)
c ∈ (-1, 1)
d ∈ (-1, 1)

What new do you see?

Symmetric polynomials

This function is symmetric.

P(x) = x2

Of course, squaring a number “eats” up its sign so x2 = (-x)2. Also, ax2 = a(-x)2. And also (axi)2 = (a(-x)i)2. So every member with an even coefficient is symmetric. The polynomials made up of only the even degree members are symmetric.

What can you tell about symmetric polynomials by observing this plot?

Anti-symmetric polynomials

This function is anti-symmetric.

P(x) = x1

In this context, anti-symmetry means that P(x) = -P(-x). This is, of course, true for ax1 and ax2i+1.

Polynomials made of only the anti-symmetric members are anti-symmetric.

Which is true about anti-symmetric polynomials?

Derivatives

You only need to know three things about polynomial derivatives.

d xn = nxn-1
dx
d (f(x) + g(x)) = d f(x) + d g(x)
dx dx dx
d k f(x) = k d f(x)
dx dx

Now let's get back to our cubic parabola and put its derivative on the same plot.

What is true about the derivative of a polynomial?

Now let's differentiate it all the way. From a cubic parabola a constant.

I know, the plot is captivating but this time please concentrate on the coefficients. What do you see?

Maclaurin series and Taylor series

We can mimic some other function by measuring some of its derivatives in 0 and building a polynomial from that.

This is the exponential function in the arctangent scale.

I choose it as an example since it's the easiest thing to differentiate.

d ex = ex
dxn

In 0, the exponential function equals 1, and since it differentiates to itself, all its derivatives in 0 are 1s. How cool is that!

Ok, so the coefficient before x is the same as the first derivative in 0. Which is 1. That gives us this.

P(x) = x + 1

Well, it doesn't mimic the function well but we're just starting.

The coefficient before x2 is 1 ÷ 2.

P(x) = 1 x2 + x + 1
2

Getting closer. The coefficient before x3 is 1 ÷ (2×3).

P(x) = 1 x3 + 1 x2 + x + 1
6 2

The next one is before x4 and it's 1 ÷ (2×3×4).

P(x) = 1 x4 + 1 x3 + 1 x2 + x + 1
24 6 2

Let's do one more just to see that it still works.

P(x) = 1 x5 + 1 x4 + 1 x3 + 1 x2 + x + 1
120 24 6 2

We can go on forever but we wouldn't. Because, while the approximation or mimicking gets better with every step, it has its limitation. And knowing what we know about polynomials, we should see what it is. A polynomial always starts from ±∞. An exponent starts at 0.

We can approximate it locally with good precision. But due to completely different global behavior, a polynomial will never mimic an exponent completely.

This way of mimicking functions with polynomials is called the Maclaurin series. We can approximate other functions like this, too. A sine, a cosine, a logarithm. Well, no. We can't do the last one just yet. It isn't defined in 0.

And that's why we need the Taylor series. It's the same idea conceptually but with the Taylor series, we can build our target polynomial from the source function derivatives at any point on . Think of it as a clever hack. We move the source function so the specified point is now 0, do the Maclaurin series there, and then shift the target polynomial back.

This is especially useful given that the series approximation only works well locally. Again, we can't change the global properties of polynomials. But with the Taylor series, we can choose the locality in which we want to mimic a source function the best.

Conclusion

This page is experimental. I only show the plots and you get to deduce facts all by yourself. So, in a way, it's you who should write a conclusion here.

From my side, I only hope that the arctangent scale works well as a didactic tool. I hope, since it shows functions as a whole, it shows global polynomial properties good enough. But I haven't had it when I got to learn all of this so I'm not sure if my hopes are valid.

If you think that the whole thing could be improved, please write me a note at ok@wordsandbuttons.online.