English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

3 answers

Solving cubic equations - Cardano's method:

A cubic equation has the form ax³ + bx² + cx + d = 0. Now a must be nonzero, or else this is in fact a quadratic equation and can be solved using the methods for that. So divide by a, to get:

x³ + b/a x² + c/a x + d/a = 0

Now, we make a change of variables. Let y=x+b/(3a). Then x=y-b/(3a), so we have:

(y-b/(3a))³ + b/a (y-b/(3a))² + c/a (y-b/(3a)) + d/a = 0

Expanding:

y³ - b/a y² + b²/(3a²) y - b³/(27a³) + b/a y² - 2b²/(3a²) y + b³/(9a³) + c/a y - cb/(3a²) + d/a

Simplifying:

y³ + (c/a - b²/(3a²)) y + (2b³/(27a³) - cb/(3a²) + d/a)

Let's look at what we have done here: we have taken the general cubic equation and, through our change of variables, transformed it into a cubic equation with no quadratic coefficient. This type of cubic equation is known as a depressed cubic. If we can find solutions for the depressed cubic, we can then reverse the substitution we just made and thereby solve the general cubic. So let us solve the depressed cubic. But first, we introduce some new variables to keep the notation from becoming unwieldy. Let α=c/a - b²/(3a²) and β=2b³/(27a³) - cb/(3a²) + d/a. So we have:

y³ + αy + β = 0

Now, if α=0, then we have y³+β=0, which means that y³=-β, so this equation has solutions y=∛(-β), y=(i√3-1)/2 ∛(-β), and y=(-i√3-1)/2 ∛(-β) (this comes from the fact that the cube roots of unity are 1, (i√3-1)/2, and (-i√3-1)/2)). Similarly, if α=0, then we can easily factor this cubic as y(y²+α) and it will have solutions y=0, y=√(-α), and y=-√(-α). So in either case if we are fortunate enough to have either α or β equal to zero the cubic can be easily solved, so we can direct our attention to the case where both are nonzero.

In order to solve the cubic in this case, we make the assumption that the solution, whatever it is, can be written as the sum of two other numbers p and q (this will actually help us). Now, making the substitution y=p+q:

(p+q)³ + α(p+q) + β = 0

We partially expand the product:

p³ + 3pq(p+q) + q³ + α(p+q) + β = 0

Regrouping:

p³ + q³ + β + (3pq+α)(p+q) = 0

Now, clearly if we can choose p and q such that p³ + q³ + β = 0 and 3pq+α = 0, then p+q will be a solution to the original equation. So this gives us the system of two equations:

3pq+α = 0
p³ + q³ + β = 0

Solve the first equation for q:

q=-α/(3p)

Substitute into the second equation:

p³ - α³/(27p³) + β = 0

Multiply by p³:

p⁶ + βp³ - α³/27 = 0

Now, at this point you may wonder what we're doing: we started with an equation of degree 3, and transformed it into an equation of degree six! But note that there are only two terms with a variable, and one is the square of the other. So now we can make the substitution z=p³ to obtain:

z² + βz - α³/27 = 0

And this is a quadratic equation. We know how to solve quadratic equations, so let's do that:

z = (-β ± √(β²+4α³/27))/2

Now, p³=z, so the possible solutions for p are p=∛z, p=(i√3-1)/2 ∛z, and p=(-i√3-1)/2 ∛z. Now we must find the values of q. The naive solution would be to substitute these values for p into the equation 3pq+α = 0 and solve, which produces a correct (but very ugly) solution of the cubic. Fortunately, there is a much nicer method: notice that the original system of equations we set up were symmetric polynomials in p and q -- in other words, any solution for p can also be a solution for q, and vice versa. There are six solutions for p, each solution having a partner which is the corresponding value of q for that p. So we actually already have the corresponding values of q, and all we need do is figure out which solution gets paired with which. If we designate the solutions to the quadratic equation z₁ = (-β + √(β²+4α³/27))/2 and z₂ = (-β - √(β²+4α³/27))/2, the z₁, z₂, and α are all real, and that the real-valued cube root is taken in all cases, then the proper pairings are:

p₁ = ∛z₁, q₁=∛z₂
p₂ = (i√3-1)/2 ∛z₁, q₂ = (-i√3-1)/2 ∛z₂
p₃ = (-i√3-1)/2 ∛z₁, q₃ = (i√3-1)/2 ∛z₂

This can be verified by substituting the values into the system of equations, writing out the z₁ and z₂ terms, and simplifying. I'll demonstrate for the case of p₂ and q₂ -- the other cases are handled similarly:

p₂³ + q₂³ + β ≟ 0
((i√3-1)/2)³ (∛z₁)³ + ((-i√3-1)/2)³ (∛z₂)³ + β ≟ 0
z₁ + z₂ + β ≟ 0
(-β + √(β²+4α³/27))/2 + (-β - √(β²+4α³/27))/2 + β ≟ 0
-2β/2 + β ≟ 0
0 = 0 ✓

3p₂q₂+α ≟ 0
3 (i√3-1)/2 ∛z₁ * (-i√3-1)/2 ∛z₂ + α ≟ 0
3 ∛z₁ ∛z₂ ≟ 0 (since (i√3-1)/2 * (-i√3-1)/2 = 1)
3∛(z₁z₂) ≟ 0
3∛((-β + √(β²+4α³/27))/2 * (-β - √(β²+4α³/27))/2)) + α ≟ 0
3∛((β² - (β²+4α³/27))/4) + α ≟ 0
3∛((-4α³/27))/4) + α ≟ 0
3∛(-α³/27) + α ≟ 0
-3α/3 + α ≟ 0
0 = 0 ✓

Note that if the assumptions that the z₁, z₂, and α are all real, and that the real-valued cube root is taken in all cases are false, then two of the steps in the above proof (namely, that ∛z₁∛z₂ = ∛(z₁z₂) and ∛(-α³/27) = -α/3) may be incorrect. However, they will only be incorrect up to a cube root of unity. Therefore, if we let p₁ be an arbitrary cube root of z₁, then one of the cube roots of z₂ will have the property that the product of it and p₁ is -α/3. Thus, in all cases, we may choose q₁ to be that root, in which case the other two pairs are p₂ = (i√3-1)/2 p₁, q₂ = (-i√3-1)/2 q₁ and p₃ = (-i√3-1)/2 p₁, q₃ = (i√3-1)/2 q₁.

Finally, now that we have the values of p and q, the solutions of the depressed cubic are y₁=p₁+q₁, y₂=p₂+q₂, and y₃=p₃+q₃, and the solutions of the original cubic equation are x₁=y₁-b/(3a), x₂=y₂-b/(3a), and x₃=y₃-b/(3a).

Solving quartic equations:

This is very hard. There are two main methods for solving the quartic -- one is Ferrari's method, which I could never remember, because the required substitutions seem to come out of nowhere. The other one, which I shall cover, is to factor the quartic into two quadratics, which you may then solve individually using the quadratic formula, thereby extracting the four solutions to the quartic. This method works as follows:

You start with an equation of the form ax⁴ + bx³ + cx² + dx + e = 0. a is nonzero (else this would be a cubic), so divide by a to get x⁴ + b/a x³ + c/a x² + d/a x + e/a = 0. Now make the substitution x=y-b/(4a) and expand to get an equation of the form:

y⁴ + αy² + βy + γ = 0 for some constants α, β, and γ (I'll let you verify for yourself that the y³ term really does cancel). This equation is known as a depressed quartic. Now, if either γ or β are equal to zero, this equation will be easy to solve -- in the first case by factoring out y, and in the second by making the substitution z=y², solving the resulting quadratic in z, and then the solutions will be given by y=±√z. However, let us suppose that we are not fortunate enough to have either of these things happen. Then we must proceed with the general solution.

We are going to factor this quartic. Write it as the product (y²+py+q)(y²+ry+s) for as-yet-undetermined coefficients p, q, r, and s. Then expanding this product, we obtain:

y⁴ + αy² + βy + γ = y⁴ + (p+r)y³ + (q+pr+s)y² + (ps+qr)y + qs

Equating coefficients we obtain the system of equations:

p+r = 0
q+pr+s = α
ps+qr = β
qs = γ

Now we need to solve this system of equations. This is actually a lot harder than the simplicity of the equations would indicate -- no matter what we do we are going to end up solving a polynomial of degree six. However, if we tread carefully, we will end up with a bicubic equation in p, which we can then solve using Cardano's method. First, note that since p+r=0, r=-p, so we make that substitution:

q-p²+s = α
ps-pq = β
qs = γ

Isolating q and s on one side:

q+s = α+p²
s-q = β/p
qs=γ

(the division by p is justified by noting that if p were equal to zero, then so is β, the quartic would actually be a bicubic, and we wouldn't be using the general solution). Now comes the tricky part. At this point most people would add the first and second equations together to isolate s. DO NOT DO THIS. You will end up with an equation that is (probably) not possible to solve algebraically. Instead, square both the first and second equations to obtain:

q²+2qs+s² = α² + 2αp² + p⁴
q²-2qs+s² = β²/p²
qs=γ

Now, subtract the second equation from the first to obtain:

4qs = α² + 2αp² + p⁴ - β²/p²
qs=γ

Now, using the last equation:

4γ = α² + 2αp² + p⁴ - β²/p²

Multiplying by p²:

4γp² = α²p² + 2αp⁴ + p⁶ - β²

This equation is a polynomial of degree six. However, it only contains multiples of p². Therefore, make the substitution z=p² to obtain:

4γz = α²z + 2αz² + z³ - β²

This is a cubic equation in z. We know how to solve cubic equations. Do so -- find any solution of this equation (it really doesn't matter which one -- we will obtain a different factorization of the quartic depending on which root we choose, but the resulting roots of the quartic will all be the same). Then p=±√z. Choose one of these roots (again, it doesn't matter which one, just take whichever is the most convenient, although in most cases they'll all be equally ugly). Now, with our solution for p in hand, we can easily obtain the corresponding values of the other coefficients. r is very easy, since r=-p. For q and s, recall that:

q+s = α+p²
s-q = β/p

NOW, you may add these equations to isolate s, and then subtract to isolate q. Then simply substitute the coefficients into the factorization:

(y²+py+q)(y²+ry+s) = 0

And solve each of the equations separately using the quadratic formula.

And that's it. Using this you can obtain closed-form solutions to any equation up to degree four. After typing all that out, I'm actually glad there's no closed-form solution to the general quintic. I mean, can you imagine how ugly it would be?

2007-05-09 19:47:42 · answer #1 · answered by Pascal 7 · 0 2

Quartic Equation Solver

2016-11-02 01:23:39 · answer #2 · answered by ? 4 · 0 0

They are long and messy. Try looking at mathworld.com, in particular

http://mathworld.wolfram.com/CubicFormula.html

and

http://mathworld.wolfram.com/QuarticEquation.html

2007-05-09 14:15:48 · answer #3 · answered by TurkeyGobbler 2 · 0 0

fedest.com, questions and answers