Quadratic Equations and Functions
Quadratic Equations and Functions
Definition: A quadratic function is a polynomial function of degree 2, written in standard form as f(x) = ax² + bx + c (with a ≠ 0), whose graph is always a symmetric U-shaped curve called a parabola.
How It Works
- The coefficient a controls how wide or narrow the parabola is, and its sign controls which way it opens: positive a opens upward (a minimum point), negative a opens downward (a maximum point).
- The vertex is the parabola’s turning point, its minimum or maximum, located at x = -b/(2a); substituting that x back into f(x) gives the vertex’s y-coordinate.
- The axis of symmetry is the vertical line x = -b/(2a) passing through the vertex. The parabola is a mirror image of itself across this line.
- The roots (or zeros, or x-intercepts) are the x-values where f(x) = 0, found using the quadratic formula: x = (-b ± √(b² - 4ac)) / (2a).
- The expression under the square root, b² - 4ac, is called the discriminant. Its sign alone tells you how many real roots the equation has, without needing to finish solving.
- A positive discriminant means two distinct real roots (the parabola crosses the x-axis twice); zero means exactly one repeated real root (the parabola’s vertex touches the x-axis); negative means no real roots at all (the parabola never crosses the x-axis).
- Factoring solves a quadratic by rewriting it as a product of two linear terms, (x - r1)(x - r2) = 0, then using the fact that a product is zero only if one of its factors is zero. This only works cleanly when the roots are rational.
- Completing the square rewrites ax² + bx + c into the form a(x - h)² + k, directly exposing the vertex (h, k) without needing calculus or the quadratic formula.
- Quadratics model any situation with constant acceleration or a single interior maximum/minimum: projectile height over time, the shape of a satellite dish, revenue as a function of price.
- The quadratic formula itself is simply completing the square done once, in general, on ax² + bx + c = 0, then solved for x, which is why it always works for every quadratic.
Illustration
var aIn = document.getElementById(‘quad-a’); var bIn = document.getElementById(‘quad-b’); var cIn = document.getElementById(‘quad-c’); var aOut = document.getElementById(‘quad-a-out’); var bOut = document.getElementById(‘quad-b-out’); var cOut = document.getElementById(‘quad-c-out’); var resetBtn = document.getElementById(‘quad-reset’);
function fmt(n) { return (Math.round(n * 100) / 100).toFixed(2).replace(/.00$/, ‘.0’); }
function update() { var a = parseFloat(aIn.value); var b = parseFloat(bIn.value); var c = parseFloat(cIn.value); aOut.textContent = fmt(a); bOut.textContent = fmt(b); cOut.textContent = fmt(c);
// Sample the curve across the visible x range, clamping y so a steep
// parabola still draws a sensible path instead of shooting far off-chart.
var pts = [];
for (var x = -10; x <= 10.001; x += 0.25) {
var y = a * x * x + b * x + c;
if (y > 12) y = 12;
if (y < -12) y = -12;
var p = toPx(x, y);
pts.push((pts.length === 0 ? 'M' : 'L') + p[0].toFixed(1) + ',' + p[1].toFixed(1));
}
curve.setAttribute('d', pts.join(' '));
if (Math.abs(a) < 0.0001) {
// Degenerates to a line; keep the widget from dividing by zero.
vertexDot.setAttribute('visibility', 'hidden');
axisLine.setAttribute('visibility', 'hidden');
root1.setAttribute('visibility', 'hidden');
root2.setAttribute('visibility', 'hidden');
eqTxt.textContent = 'y = ' + fmt(b) + 'x + ' + fmt(c) + ' (a = 0, not quadratic)';
vertexTxt.textContent = 'Vertex: none (linear)';
discTxt.textContent = 'Discriminant: n/a';
rootsTxt.textContent = b !== 0 ? ('Root: x = ' + fmt(-c / b)) : 'No unique root';
return;
}
vertexDot.setAttribute('visibility', 'visible');
axisLine.setAttribute('visibility', 'visible');
var vx = -b / (2 * a);
var vy = a * vx * vx + b * vx + c;
var vpx = toPx(vx, Math.max(-12, Math.min(12, vy)));
vertexDot.setAttribute('cx', vpx[0]);
vertexDot.setAttribute('cy', vpx[1]);
var axpx1 = toPx(vx, 12), axpx2 = toPx(vx, -12);
axisLine.setAttribute('x1', axpx1[0]); axisLine.setAttribute('y1', axpx1[1]);
axisLine.setAttribute('x2', axpx2[0]); axisLine.setAttribute('y2', axpx2[1]);
var disc = b * b - 4 * a * c;
eqTxt.textContent = 'y = ' + fmt(a) + 'x² + ' + fmt(b) + 'x + ' + fmt(c);
vertexTxt.textContent = 'Vertex: (' + fmt(vx) + ', ' + fmt(vy) + ')';
discTxt.textContent = 'Discriminant: ' + fmt(disc);
if (disc > 0.0001) {
var r1 = (-b + Math.sqrt(disc)) / (2 * a);
var r2 = (-b - Math.sqrt(disc)) / (2 * a);
rootsTxt.textContent = 'Roots: x = ' + fmt(r1) + ', x = ' + fmt(r2);
var p1 = toPx(r1, 0), p2 = toPx(r2, 0);
root1.setAttribute('cx', p1[0]); root1.setAttribute('cy', p1[1]); root1.setAttribute('visibility', 'visible');
root2.setAttribute('cx', p2[0]); root2.setAttribute('cy', p2[1]); root2.setAttribute('visibility', 'visible');
} else if (disc > -0.0001) {
rootsTxt.textContent = 'Roots: x = ' + fmt(vx) + ' (repeated)';
var p = toPx(vx, 0);
root1.setAttribute('cx', p[0]); root1.setAttribute('cy', p[1]); root1.setAttribute('visibility', 'visible');
root2.setAttribute('visibility', 'hidden');
} else {
rootsTxt.textContent = 'Roots: none real (discriminant < 0)';
root1.setAttribute('visibility', 'hidden');
root2.setAttribute('visibility', 'hidden');
}
}
[aIn, bIn, cIn].forEach(function (el) { el.addEventListener(‘input’, update); }); resetBtn.addEventListener(‘click’, function () { aIn.value = 1; bIn.value = 0; cIn.value = 0; update(); });
update(); })();
Under the Hood
Deriving the quadratic formula by completing the square, starting from ax² + bx + c = 0:
ax² + bx + c = 0
x² + (b/a)x = -c/a divide by a
x² + (b/a)x + (b/2a)² = (b/2a)² - c/a add (b/2a)² to both sides to complete the square
(x + b/2a)² = (b² - 4ac) / 4a² factor the left side, combine the right
x + b/2a = ±√(b² - 4ac) / 2a take the square root of both sides
x = (-b ± √(b² - 4ac)) / 2a solve for x
- Every step is reversible and works for any a, b, c with a ≠ 0, which is exactly why the resulting formula is universal.
Worked Example 1: Two real roots. Given: x² - 5x + 6 = 0 (a=1, b=-5, c=6). Step 1: discriminant = (-5)² - 4(1)(6) = 25 - 24 = 1. Step 2: x = (5 ± √1) / 2 = (5 ± 1) / 2. Answer: x = 3 or x = 2 (confirm by factoring: (x-3)(x-2) = 0).
Worked Example 2: Repeated root. Given: x² - 6x + 9 = 0 (a=1, b=-6, c=9). Step 1: discriminant = 36 - 36 = 0. Step 2: x = 6 / 2 = 3. Answer: x = 3 (a double root; the parabola’s vertex sits exactly on the x-axis).
Worked Example 3: No real roots. Given: x² + 2x + 5 = 0 (a=1, b=2, c=5). Step 1: discriminant = 4 - 20 = -16. Answer: no real solutions; the parabola stays entirely above the x-axis (since a > 0 and the vertex’s y-value is positive).
History
- Babylonian mathematicians were solving specific quadratic-style problems with geometric methods as early as 2000 BCE, though without any symbolic algebra.
- The Persian mathematician Al-Khwarizmi systematized general methods for solving quadratics around 820 CE in his book “Al-Jabr,” the work that gave algebra its name.
- Early solutions were entirely geometric (literally completing a physical square), since negative numbers were not yet widely accepted, which is where the technique’s name “completing the square” comes from.
- Negative and complex roots were only gradually accepted starting in the 16th and 17th centuries, as symbolic algebra matured through mathematicians like Descartes and Euler.
- The compact “x = (-b ± √(b²-4ac))/2a” notation used today is a relatively modern convenience, the underlying method is over a thousand years older than the symbol-heavy formula.
Why It Matters
- Projectile motion in physics is quadratic: height over time under constant gravity is exactly a parabola, so the quadratic formula directly gives when a thrown object lands.
- Businesses use quadratic revenue models (price × quantity, where raising price lowers quantity sold) to find the exact price that maximizes revenue, at the vertex.
- Engineers shape satellite dishes, telescope mirrors, and headlight reflectors as parabolas specifically because of a reflective property: every ray parallel to the axis reflects through a single focus point.
- The discriminant’s sign is a fast diagnostic used constantly in engineering and physics to check whether a system has real, physically meaningful solutions before doing any further work.
- Optimization problems across economics, biology, and computer science frequently reduce to finding a quadratic function’s vertex, its single guaranteed maximum or minimum.
Common Pitfalls
- Forgetting the ± in the quadratic formula, and reporting only one root when two exist.
- Assuming every quadratic factors into nice integers. Most real-world quadratics need the formula or completing the square instead.
- Mixing up the vertex formula’s sign: it is x = -b/(2a), not b/(2a); dropping the negative sign silently flips the parabola’s turning point to the wrong side.
- Confusing “no real roots” with “no solution at all.” A negative discriminant means no real roots, but the equation still has two complex roots.
- Misreading a downward-opening parabola’s vertex as a minimum. When a is negative, the vertex is the maximum, not the minimum.
Comparison
| Method | Best When | Gives Directly |
|---|---|---|
| Factoring | Roots are rational, equation factors cleanly | Roots |
| Completing the square | You need the vertex form | Vertex (h, k) |
| Quadratic formula | Always works, any a/b/c | Roots (real or complex) |
| Graphing | Visual estimate, checking work | Approximate roots and vertex |
FAQ
Why does a negative discriminant mean no real roots? The quadratic formula requires taking the square root of the discriminant. A negative number has no real square root, only an imaginary one, so the formula only produces real answers when the discriminant is zero or positive.
Is there a “cubic formula” for degree-3 equations the same way? Yes, though it is far more complicated, involving nested cube roots and complex intermediate steps even when the final answer is a real number. Formulas exist through degree 4; Abel and Galois proved in the 1820s-30s that no general algebraic formula exists for degree 5 and higher.
Example
A ball thrown upward at 20 m/s from a 5 m platform has height h(t) = -4.9t² + 20t + 5. Setting h(t) = 0 and applying the quadratic formula gives the time it lands, about 4.3 seconds, directly from the same formula used above.
Related Terms
Referenced by