Difference between revisions of "Cubic Equation"
Vincentwant (talk | contribs) |
Vincentwant (talk | contribs) |
||
Line 3: | Line 3: | ||
<math>ax^3 + bx^2 + cx + d = 0</math>. | <math>ax^3 + bx^2 + cx + d = 0</math>. | ||
− | A cubic equation has 3 roots, either all real OR one real, two complex. | + | A cubic equation has 3 [[roots]], either all [[real number|real]] OR one real, two [[complex number|complex]]. |
==Solving Cubic Equations== | ==Solving Cubic Equations== | ||
Line 9: | Line 9: | ||
If you're too lazy to follow, look at subsection "TLDR" for each section. | If you're too lazy to follow, look at subsection "TLDR" for each section. | ||
===Converting to a Depressed Equation=== | ===Converting to a Depressed Equation=== | ||
− | You start with the equation <math>ax^3 + bx^2 + cx + d = 0</math>. | + | You start with the [[equation]] <math>ax^3 + bx^2 + cx + d = 0</math>. |
Divide both sides by a: <math>x^3 + \frac{b}{a}x^2 + \frac{c}{a}x + \frac{d}{a}</math>. | Divide both sides by a: <math>x^3 + \frac{b}{a}x^2 + \frac{c}{a}x + \frac{d}{a}</math>. | ||
− | Now we change the coefficient of <math>x^2</math> to <math>0</math> (e.g. change it to a depressed cubic). We do this by substituting <math>y = x + \frac{b}{3a}</math> or <math>y - \frac{b}{3a} = x</math>, giving: | + | Now we change the [[coefficient]] of <math>x^2</math> to <math>0</math> (e.g. change it to a depressed cubic). We do this by [[substitution|substituting]] <math>y = x + \frac{b}{3a}</math> or <math>y - \frac{b}{3a} = x</math>, giving: |
<math>\left(y - \frac{b}{3a}\right)^3 + \frac{b}{a}\left(y - \frac{b}{3a}\right)^2 + \frac{c}{a}\left(y - \frac{b}{3a}\right) + \frac{d}{a} = 0</math> | <math>\left(y - \frac{b}{3a}\right)^3 + \frac{b}{a}\left(y - \frac{b}{3a}\right)^2 + \frac{c}{a}\left(y - \frac{b}{3a}\right) + \frac{d}{a} = 0</math> | ||
Line 41: | Line 41: | ||
<math>\begin{cases} uv = \frac{p^3}{27} \\ v - u = q \end{cases}</math>. | <math>\begin{cases} uv = \frac{p^3}{27} \\ v - u = q \end{cases}</math>. | ||
− | We can solve this via the [[quadratic formula]]. After <math>u</math> and <math>v</math> are obtained, we have <math>y = \sqrt[3]{u} - \sqrt[3]{v}</math> and <math>x = \sqrt[3]{u} - \sqrt[3]{v} - \frac{b}{3a}</math> | + | We can solve this via the [[quadratic formula]]. After <math>u</math> and <math>v</math> are obtained, we have <math>y = \sqrt[3]{u} - \sqrt[3]{v}</math> and <math>x = \sqrt[3]{u} - \sqrt[3]{v} - \frac{b}{3a}</math>. |
====TLDR?==== | ====TLDR?==== | ||
Line 51: | Line 51: | ||
The depressed cubic is of the form <math>y^3 + \left(\frac{3ac - b^2}{3a^2}\right)y + \left(\frac{2b^3 - 9abc + 27a^2d}{27a^3}\right) = 0</math>. | The depressed cubic is of the form <math>y^3 + \left(\frac{3ac - b^2}{3a^2}\right)y + \left(\frac{2b^3 - 9abc + 27a^2d}{27a^3}\right) = 0</math>. | ||
− | <math>u</math> and <math>v</math> are the roots of the system of equations <math>\begin{cases} uv = \frac{p^3}{27} \\ v - u = q \end{cases}</math>. We can solve this by substitution: | + | <math>u</math> and <math>v</math> are the roots of the [[system of equations]] <math>\begin{cases} uv = \frac{p^3}{27} \\ v - u = q \end{cases}</math>. We can solve this by substitution: |
<math>v = q + u</math> (We are still using p and q because they might get a little messy if we use p and q in terms of a, b, c, and d.) | <math>v = q + u</math> (We are still using p and q because they might get a little messy if we use p and q in terms of a, b, c, and d.) | ||
Line 71: | Line 71: | ||
<math>- \sqrt[3]{\frac{\left(\frac{2b^3 - 9abc + 27a^2d}{27a^3}\right) \pm \sqrt{\frac{3\left(\frac{2b^3 - 9abc + 27a^2d}{9a^3}\right)^2 - 4\left(\frac{3ac - b^2}{3a^2}\right)^3\left(\frac{2b^3 - 9abc + 27a^2d}{27a^3}\right)}{27}}}{2}} - \frac{b}{3a}</math> | <math>- \sqrt[3]{\frac{\left(\frac{2b^3 - 9abc + 27a^2d}{27a^3}\right) \pm \sqrt{\frac{3\left(\frac{2b^3 - 9abc + 27a^2d}{9a^3}\right)^2 - 4\left(\frac{3ac - b^2}{3a^2}\right)^3\left(\frac{2b^3 - 9abc + 27a^2d}{27a^3}\right)}{27}}}{2}} - \frac{b}{3a}</math> | ||
− | (See? I told you it would be messy.) | + | (See? I told you it would be messy.) I'm not going to simplify all that squaring and cubing right now: maybe soon! |
+ | |||
+ | <math>x = \sqrt[3]{\frac{-\left(\frac{2b^3 - 9abc + 27a^2d}{27a^3}\right) \pm \sqrt{\frac{3\left(\frac{2b^3 - 9abc + 27a^2d}{9a^3}\right)^2 - 4\left(\frac{3ac - b^2}{3a^2}\right)^3\left(\frac{2b^3 - 9abc + 27a^2d}{27a^3}\right)}{27}}}{2}}</math> | ||
+ | |||
+ | <math>- \sqrt[3]{\frac{\left(\frac{2b^3 - 9abc + 27a^2d}{27a^3}\right) \pm \sqrt{\frac{3\left(\frac{2b^3 - 9abc + 27a^2d}{9a^3}\right)^2 - 4\left(\frac{3ac - b^2}{3a^2}\right)^3\left(\frac{2b^3 - 9abc + 27a^2d}{27a^3}\right)}{27}}}{2}} - \frac{b}{3a}</math> | ||
===If you're just asking for the formula for a monic cubic...=== | ===If you're just asking for the formula for a monic cubic...=== |
Revision as of 21:23, 9 December 2020
A cubic equation is an equation of the form:
.
A cubic equation has 3 roots, either all real OR one real, two complex.
Contents
Solving Cubic Equations
If you're too lazy to follow, look at subsection "TLDR" for each section.
Converting to a Depressed Equation
You start with the equation .
Divide both sides by a: .
Now we change the coefficient of to (e.g. change it to a depressed cubic). We do this by substituting or , giving:
.
is and is , so now we have .
TLDR?
The equation is where and .
Solving the Depressed Equation
Now here comes the smart part. Substitute .
The equation becomes . Simplification:
We want that last term to equal , so we can set . (We can't use , because then , which is not necessarily true.) Solving this equation gives us . If , then . We now have a system of equations:
.
We can solve this via the quadratic formula. After and are obtained, we have and .
TLDR?
where u and v are roots of the system .
The Cubic Formula
The cubic formula can be obtained by using the above method. These are the steps:
The depressed cubic is of the form .
and are the roots of the system of equations . We can solve this by substitution:
(We are still using p and q because they might get a little messy if we use p and q in terms of a, b, c, and d.)
(comes from )
(See? I told you it would be messy.) I'm not going to simplify all that squaring and cubing right now: maybe soon!
If you're just asking for the formula for a monic cubic...
Here is the formula: