1.3. Cardano equation
Equation from Philip Ording's book "99 variations on a proof"
Show that the cubic equation
x^3-6x^2+11x-6=2x-2has solutions 1 and 4.
The following is yet another proof that
-
1 and 4 are solutions, and
-
there is no other solution.
section Cardano
/-- Prove that 1 and 4 satisfy Cardano's equation
-/
theorem cardano1 {x:ℝ}: x=1 ∨ x=4
→ x^3-6*x^2+11*x-6=2*x-2 := x:ℝ⊢ x = 1 ∨ x = 4 → x ^ 3 - 6 * x ^ 2 + 11 * x - 6 = 2 * x - 2
x:ℝh:x = 1 ∨ x = 4⊢ x ^ 3 - 6 * x ^ 2 + 11 * x - 6 = 2 * x - 2
x:ℝh1:x = 1⊢ x ^ 3 - 6 * x ^ 2 + 11 * x - 6 = 2 * x - 2x:ℝh4:x = 4⊢ x ^ 3 - 6 * x ^ 2 + 11 * x - 6 = 2 * x - 2
x:ℝh1:x = 1⊢ x ^ 3 - 6 * x ^ 2 + 11 * x - 6 = 2 * x - 2 -- assume x=1
x:ℝh1:x = 1⊢ 1 ^ 3 - 6 * 1 ^ 2 + 11 * 1 - 6 = 2 * 1 - 2 ; All goals completed! 🐙
x:ℝh4:x = 4⊢ x ^ 3 - 6 * x ^ 2 + 11 * x - 6 = 2 * x - 2 -- assume x=4
x:ℝh4:x = 4⊢ 4 ^ 3 - 6 * 4 ^ 2 + 11 * 4 - 6 = 2 * 4 - 2 ; All goals completed! 🐙
/-- Prove that if x satisfies the equation,
then x is either 1 or 4
-/
theorem cardano2 {x:ℝ}: x^3-6*x^2+11*x-6=2*x-2
→ x=1 ∨ x=4 := x:ℝ⊢ x ^ 3 - 6 * x ^ 2 + 11 * x - 6 = 2 * x - 2 → x = 1 ∨ x = 4
x:ℝh:x ^ 3 - 6 * x ^ 2 + 11 * x - 6 = 2 * x - 2⊢ x = 1 ∨ x = 4
-- factorize the polynomial
have h1 : (x-4)*((x-1)*(x-1)) = 0 :=
calc
(x-4)*((x-1)*(x-1))
= (x^3-6*x^2+11*x-6) - (2*x-2) := x:ℝh:x ^ 3 - 6 * x ^ 2 + 11 * x - 6 = 2 * x - 2⊢ (x - 4) * ((x - 1) * (x - 1)) = x ^ 3 - 6 * x ^ 2 + 11 * x - 6 - (2 * x - 2) All goals completed! 🐙
_ = (2*x-2) - (2*x-2) := x:ℝh:x ^ 3 - 6 * x ^ 2 + 11 * x - 6 = 2 * x - 2⊢ x ^ 3 - 6 * x ^ 2 + 11 * x - 6 - (2 * x - 2) = 2 * x - 2 - (2 * x - 2) All goals completed! 🐙
_ = 0 := x:ℝh:x ^ 3 - 6 * x ^ 2 + 11 * x - 6 = 2 * x - 2⊢ 2 * x - 2 - (2 * x - 2) = 0 All goals completed! 🐙
-- deduce x=4 ∨ x=1 from hypothesis h1
x:ℝh:x ^ 3 - 6 * x ^ 2 + 11 * x - 6 = 2 * x - 2h1:(x - 4) * ((x - 1) * (x - 1)) = 0ha:x - 4 = 0⊢ x = 1 ∨ x = 4x:ℝh:x ^ 3 - 6 * x ^ 2 + 11 * x - 6 = 2 * x - 2h1:(x - 4) * ((x - 1) * (x - 1)) = 0hb:(x - 1) * (x - 1) = 0⊢ x = 1 ∨ x = 4
x:ℝh:x ^ 3 - 6 * x ^ 2 + 11 * x - 6 = 2 * x - 2h1:(x - 4) * ((x - 1) * (x - 1)) = 0ha:x - 4 = 0⊢ x = 1 ∨ x = 4 All goals completed! 🐙
x:ℝh:x ^ 3 - 6 * x ^ 2 + 11 * x - 6 = 2 * x - 2h1:(x - 4) * ((x - 1) * (x - 1)) = 0hb:(x - 1) * (x - 1) = 0⊢ x = 1 ∨ x = 4 x:ℝh:x ^ 3 - 6 * x ^ 2 + 11 * x - 6 = 2 * x - 2h1:(x - 4) * ((x - 1) * (x - 1)) = 0hb:(x - 1) * (x - 1) = 0h3:x - 1 = 0 ∨ x - 1 = 0⊢ x = 1 ∨ x = 4
x:ℝh:x ^ 3 - 6 * x ^ 2 + 11 * x - 6 = 2 * x - 2h1:(x - 4) * ((x - 1) * (x - 1)) = 0hb:(x - 1) * (x - 1) = 0h4:x - 1 = 0⊢ x = 1 ∨ x = 4x:ℝh:x ^ 3 - 6 * x ^ 2 + 11 * x - 6 = 2 * x - 2h1:(x - 4) * ((x - 1) * (x - 1)) = 0hb:(x - 1) * (x - 1) = 0h4:x - 1 = 0⊢ x = 1 ∨ x = 4
repeat All goals completed! 🐙
Combining thw above two, we obtain
/-- The solutions of Cardano's equation are
precisely 1 and 4
-/
theorem cardano {x:ℝ}:
x^3-6*x^2+11*x-6=2*x-2 ↔ x=1 ∨ x=4 := x:ℝ⊢ x ^ 3 - 6 * x ^ 2 + 11 * x - 6 = 2 * x - 2 ↔ x = 1 ∨ x = 4
x:ℝ⊢ x ^ 3 - 6 * x ^ 2 + 11 * x - 6 = 2 * x - 2 → x = 1 ∨ x = 4x:ℝ⊢ x = 1 ∨ x = 4 → x ^ 3 - 6 * x ^ 2 + 11 * x - 6 = 2 * x - 2
x:ℝ⊢ x ^ 3 - 6 * x ^ 2 + 11 * x - 6 = 2 * x - 2 → x = 1 ∨ x = 4 All goals completed! 🐙
x:ℝ⊢ x = 1 ∨ x = 4 → x ^ 3 - 6 * x ^ 2 + 11 * x - 6 = 2 * x - 2 All goals completed! 🐙
end Cardano