STATUS: Draft


Solving Polynomial Equations: 1

This video explores different ways of finding the roots of polynomials, and starts with examples of the more classical ways that polynomials can be solved (meaning via the work of del Ferro, Tataglia, Cardano). When we use these more classical methods, things start out simple enough, but we quickly find that finding roots of equations beyond the quadratic case (such as cubic, quartic etc.) can become difficult indeed.

This notebook will walk through the video and recreate it using standard Python libraries (such as Sympy, Numpy, etc.).

Let's start by creating some variables:

Now create a very simple equation

It's pretty straightforward to find a solution to something like this:

Now let's look at something slightly more complicated:

We can solve it using the quadratic formula. Sympy will do it for us:

Note though, that things have become a little complicated. these roots have complex numbers!

The issue of the complex numbers arises because of the nature of the discriminant in a quadratic equation. If it is negative, we will be dealing with negative square roots. Let's verify this on the quadratic equation above by using SymPy discriminant function:

We could of course avoid this complex roots issues by just ensuring we don't get a negative discriminant (although this will not get us very far!):

And then we get the following solution:

Even without the issue of complex numbers in play, we still see solutions in standard form involving surds, coming from the application of the quadratic formula. The problem with surds is that we often cannot get from them to a complete solution. Think of it this as the $ \sqrt{2} $ problem, where we have not really got an answer, but a label for an algorithm that can be run forever and will only ever provide an approximation.

Let's see this approximation in action, and generate a numerical solution that is an approximation to a limited number of places:

So it seems that, for many quadratics, we cannot solve them beyond getting a numerical approximation.

And things only get messier when we look at cubics:

We can solve it using a formula, and get a numerical approximation, but again, it doesn't give a precise answer:

Looking at the answer in terms of surds and complex numbers really starts to make things look complicated. This equation has 3 solutions, 2 complex and 1 real, and we can only know them approximately and find ourselves looking at this kind or representation:

Let's have a look at higher order equations:

Again, solve for approximate solutions:

And using surds:

This is an interesting example, because it suggests that perhaps when the leading coefficient term gets higher things do not get more complicated (although...the above example still has surds and complex numbers).

Here is another example:

Let's solve for a numerical solution, and then a solution with surds and complex numbers:

And now the surd and complex number representation:

Ouch! Turns out last time we just got lucky. As powers get higher, things tend to get more complicated. And therein lies the problem. Again, what we are seeing here is the classical story around the ways to obtain roots from polynomials. This approach aims to transform these types of equations so they be expressed with radicals, and and it tells us alot about the orientation of mathematicians such as of del Ferro, Tartaglia and Cardano who worked on these problems.

But is there another way to approach this problem, maybe a way in which we could avoid radicals altogether, to come to a more legitimate solution? Could we adopt another point of view?

Solving the quadratic another way

So let's start again, and see how we might solve these equations in a way that does not involve radicals.

Our overall strategy is going to be:

Start by creating variables we will need:

From there, create a general form of the quadratic equation:

Note that from the outset we will assume that:

Apart from that, assume nothing! We are not even assuming we know anything about the nature of each of the coefficients $c_0, c_1, c_2$. They are just some kind of mathematical object, maybe be a power series of some kind, maybe a polynumber. It doesn't matter to us

And from here, we want to solve for x in terms of $c_0, c_1$ and $c_2$ and get solution that do not involve radicals.


We are going to begin by utilising a power series. Regardless of problems that might arise when dealing with power series' (which can manifest themselves as some kind of infinite structure that is hard for us to gasp), using a subset of a power series terms might allow us to have some insight into solving this quadratic. More specifically, let's use a subset of terms only up to a power of 6. Why 6? No reason except it makes things managable and may shed some light for future investigation. Given the problem at hand, its a good place to start.

Generally, this is a really powerful strategy in mathematics exploration: letting one mathematical object stand in place of another one, and leveraging off that second object's properties to gain some insight and a different view of what is going on.

Being by creating some more variables that we are going to need:

Lets make a subsitution. Let $c_0 = t$:

Now let's make another substitution. We are going to use some terms from a power series that can take the place of $x$. Note that we are using a small number of terms, just 6 terms, and the number 6 has arbitrarily chosen to see if we can see some kind of pattern. Note also that because we are restricting the terms, anything above $t^5$ we will regard as 0. Hence the above supposition, that $t^6$ can be regarded as 0.

So here is our new value of $x$:

Let's subsitute this new value we have for $x$ into the original equation:

Now expand the equation:

Note that we can group the equation in terms of $t$:

Recall that because $t^6 = 0$, we can truncate this equation to ignore the higher powers of $t$ above 6:

The last couple of calculations have created an expression, so lets set things back to an equation set to 0. We will also put it back into the Sympy Poly form again, which has handy methods that will help us work through the calculations:

Now lets start with the very simple case that assumes that $t = 0$. This means that everything multiplied by $t$ becomes 0, and is leaves the constant term of this polynomial in $t$:

Let's set it to 0:

And now solve it:

So we end up with two solutions of what $a_0$. Lets focus on the first case:

Note the coeffients of this polynomial in $t$. One quick thing to do would be to substitute in 0 for $a_0$ wherever it appears:

Also, now that we have a value of $a_0$, we can work iteratively through all the other parts of the polynomical and solve for $a_0, a_1, a_2, a_3, a_4$ and $a_5$. Start by turning the polynomial into a system of equations:

Now solve the system:

So now we have values for $a_0, a_1, a_2, a_3, a_4$ and $a_5$ in terms of $c_1$ and $c_2$ for the case where $a_0$ is 0. Recall our original plan was to get a value for $x$. So we can now substitute back into get values for $x$

So we started with a general quadratic in the form of $t+c_1x+c2_x^2=0$ with a view to finding a value of $x$ that doesn't involve radicals. And we seem to have done it! Well, in a limited way at least.

So it looks like there may be some kind of algebraic way of getting around our usual answers involving square roots. And so what is this series of numbers that appears to be emerging? Specifically, these coefficents of $c_2$, the numbers: 1, 1, 2, 5, 14? Well, it turns out these numbers can be found in a sequence of numbers that is ubiquitous throughout various fields of mathematics: The Catalan Numbers!

Lots more to investigate! But that is the end of Part 1