Quadratic equations and functions
Warm-upHumanCompute the discriminant of .
Compute the discriminant of .
Solve . Enter the solutions as a set, for example {1, 2}.
How many different real roots does have?
Kofi solves by dividing both sides by and gets . What is wrong?
A goat pen is built against a straight wall using m of fencing for the other three sides. What is the largest possible area of the pen, in square metres?
Without solving, find the sum and the product of the roots of .
Find the positive number for which has exactly one real root.
In Mathlib, Real.sqrt of a negative number is defined to be 0. The theorem Lumenary.Quadratics.quadratic_formula has the hypothesis hΔ : 0 ≤ b ^ 2 - 4 * a * c. What would happen if we deleted it?
Write real_roots(a, b, c) that returns the sorted list of the different real roots of (with ): two roots if , one if , and the empty list if . Use math.sqrt.