Monday, July 21, 2008

Formulas for third and forth degree polynomials

In a previous post, the hunt for the roots, I showed how to develop the formula for the second degree polynomial. In this post I want to develop the formulas for the third and forth degree. Unfortunately this means that this whole post will be algebra and nothing else. This formulas were originally developed in the 16 century - you can read more about this in the post linked above.
A little warning - in this post I don't solve numerical examples, so I use letters to denote numbers that would be known in a numerical example, but I freely move them around. This means that if in one line I wrote bx, in the next line I will also write bx even if I should write (b+4)x instead, and the same with the sign of b. To use the formulas you will need to follow the simplification process, and then to aplly the final formula to the result.

Lets start. The idea is to get the general formula for the equation of the form:

Firstly, lets get rid of as many parts as we can. By dividing it by a (it cannot be zero, because then we have a second degree equation) we will get a simpler equation. But it is possible to make it even simpler. To do this lets suppose that x=y-b/3 (b is not the original b, but the original b divided by a). After dividing by a, and writing y-b/3 instead of x we will get an equation of the form:

Writing this step fully requires too much typing, so it is skipped. You can easily verify it yourself. Now we will write this equation in a slightly different way:

Lets suppose that x=u-v (this step is called uglification):

We can choose u,v so that b-3uv=0. Now we get two equations:


But those are simple second degree equations, to see this just substitute u^3=t, v^3=s. It is easy to solve and get that:



Now all we need is to get the solution, x=u-v, is to take the third root. After this we get a rather unpleasing formula, which is however the solution. It might seems surprising that it took so much time to get to this formula (over 1000 years), but lets not forget that it seems relatively simple because of the modern notation. In the ancient world they were without symbols, all they had were words. For us the process is visual, but it wasn't so for them. Note that this formula should be used only after you did the previous steps - that is after you have simplified the equation to the form before the uglification step.

Now to the forth degree. We need to solve an equation of the form:

The first step is to use the same method I used in solving the third degree polynomial, to reduce the problem to:

This reduction can always be done, it is easy to check but requires a lot of typing in latex to show it here, so I am skipping this. Lets complete the equation to a square, and move the rest to the second side (since c,d are unknown numbers, we can ignore the sign):

Now, if only the left side was a square.... Well, it is again time for uglification. Lets look on:


Now, when this will be a perfect square? The answer is simple. We need the discriminant to be equal zero. This means that:

This is a third degree equation. Now, isn't it great that we have a way to solve a general third degree equation? Without knowing a solution to the third degree polynomial we wouldn't be able to solve this... Now, lets suppose that (t) is a solution. Than we can write the original equation as:

We can now take the root and get the simple equation:


This is second degree, so the solution is easy.

Now, this is the part where I apologize for the misleading title - as you can see, while I developed the general way of solving the third and forth degree equations, I didn't write down the formulas. This is because they are nether useful nor nice to write (the formula for the forth degree is huge). I once was told that solving second degree equation using the formula takes 5 minutes for the third degree it takes one day, and for the forth a week. This is not true but it is close. However, all you need to write the final formula is in the post, you just need to write it down. If you are interested in the formulas themselves here are links to them: Third degree, Forth degree.


Anonymous said...

Very helpful, thankyou for your effort..

Sjoerd said...

Very short and insightful explanation. Thanks.

I was wondering if I saw two little mistakes:
1) the formula for the third degree with u^3*v^3 = b/27 migth be u^3*v^3 = b^3/27

2) in the formula for the fourth degree you would get
(x^2+1+t)^2 = (x-u(t))^2
because on the left side you can replace 'y' with its solution 't', but on the right side you will have a perfect square but the solution is in general (x-u(t))^2 where u is a constant that is derivable from the solution t.

Al said...

Thank You !!!

Al said...

There is small misprint
there should be u^3 v^3= b^3/27.
now it is written b/27 - cub is forgotten.

Nicolai said...

Nice work, however it seems to me that there is an error in the 3'rd degree formula. It is assumed that
This implies
u³v³=b³/27 and not
which is repeated in the following formulas.

Anatoly said...

Thanks for noticing that it should be b^3. Sorry for taking so long to fix it, the program I used to make the formulas no longer works so I needed to find another way, and this took time.

Sjoerd, I don't think that in the formula for the fourth degree I should get u(t). Originally y is a constant which I need to determine. I get a third degree equation for y for which t is a solution. So from now on y=t. Basically on this step we choose y to be t. There is however a mistake on this step, it should not be x-t, because t is not a solution of the square on the right. I fixed this as well, thanks for noticing that this line was wrong.

Anonymous said...

I need one that shows the steps please. sorry about the symbols, but I wanted to make sure it was clear that I wanted a calculator for this, some people didn't understand that.

Actually, is a calculator to calculate simplest polynomial functions with given roots even possible?

Anatoly said...

I am not sure what you mean. If the roots are given you can get the corresponding polynomial by multiplying the correct factors.For example:
This is the simplest polynomial with the roots 2 and 3.

Leslie Lim said...

Wow. Awesome article. Please do more articles like this in the future. Very informational and knowledgeable. I will expect more from you in the future. For now i will just bookmark your page and surely I'm gonna come back later to read more. Thank you to the writer!