Build a function from graph conditions
A parabola from a vertex and a point
The curve is \(f(x) = a(x - 3)^2 - 2\). Its vertex is the point \((3, -2)\), where the orange tangent is horizontal. The ring at \((1, 6)\) is a point that the curve must pass through.
Drag the slider for \(a\). The vertex stays in place, and the curve becomes narrower as \(a\) grows.
At \(a = 1\), the curve passes through \((1, 2)\), which is below the ring. At \(a = 3\), it passes through \((1, 10)\), which is above the ring.
At \(a = 2\), the curve passes through the ring, which turns green. The vertex fixed where the curve sits, and the point fixed the last number, \(a\).
One condition, one equation
A parabola is set by three numbers: \(h\), \(k\) and \(a\) in \(f(x) = a(x - h)^2 + k\). The orange label marks the vertex \((h, k)\).
Press the button to move the vertex. The curve moves with it, and the tangent at the vertex stays horizontal. The vertex sets \(h\) and \(k\).
Move the slider. The vertex stays in place while the curve becomes wider or narrower, and a negative \(a\) turns it upside down. This sets \(a\).
Each condition on the graph gives one equation. Three unknown numbers need three equations.
Notation
Write the parabola so that its vertex \((h, k)\) appears in the formula. The tangent at the vertex is horizontal, so \(f'(h) = 0\). The number \(a\) is not 0, because then the curve would be a line.
\[\begin{aligned} f(x) &= a(x - h)^2 + \cy{k} \\ f'(h) &= 0 \end{aligned}\]A point \((x_0, y_0)\) on the curve gives one equation.
\[f(x_0) = y_0\]The orange line through \((x_0, y_0)\) has slope \(m\). It also gives one equation, because the derivative \(2a(x - h)\) must equal \(m\) at \(x_0\).
\[\begin{aligned} f'(x_0) &= m \\ f'(x) &= 2a(x - h) \end{aligned}\]Substitute the known numbers, and solve for the unknown ones. Then check every condition on the finished curve.
When it fails
Press the first button. Faint parabolas appear that all share the vertex, so with only the vertex every value of \(a\) fits. One condition is too few.
Press the second button. At the vertex the tangent is horizontal, so \(f'(3) = 0\) and the red line of slope 2 cuts the curve instead of touching it. The condition \(f'(3) = 2\) cannot hold, so check that the conditions can hold together before you solve.
Example 1: the vertex and a point
Find the parabola with vertex \((1, 4)\) that passes through \((3, -4)\).
The vertex gives \(h = 1\) and \(k = 4\), so only \(a\) is unknown.
\[f(x) = a(x - 1)^2 + 4\]The point \((3, -4)\) gives the equation \(f(3) = -4\). Substitute and solve for \(a\).
\[\begin{aligned} a(3 - 1)^2 + 4 &= -4 \\ 4a &= -8 \\ a &= -2 \end{aligned}\]Because \(a\) is negative, the curve opens downward and the vertex is a peak.
\[f(x) = -2(x - 1)^2 + 4\]Check both conditions on the finished curve. The derivative \(-4(x - 1)\) is 0 at \(x = 1\), and the height at \(x = 3\) is \(-4\).
\[f'(1) = 0 \qquad f(3) = -4\]
Example 2: a point and two slopes
A parabola has \(f(0) = 5\), \(f'(1) = -2\) and \(f'(3) = 0\). Find \(f\).
Write \(f(x) = ax^2 + bx + c\), so \(f'(x) = 2ax + b\). Three unknown numbers need three conditions.
\[\begin{aligned} f(x) &= ax^2 + bx + c \\ f'(x) &= 2ax + b \end{aligned}\]The point at \(x = 0\) gives \(c\) directly, because the other two terms are 0 there.
\[f(0) = c = 5\]A tempting wrong move: The condition \(f'(1) = -2\) means that the curve passes through \((1, -2)\). Then \(a + b + 5 = -2\).
\[f(1) = -2\]The number \(-2\) is a slope, not a height. The red dot at \((1, -2)\) is far below the curve, while the orange line at \(x = 1\) shows the slope the condition asks for.
Substitute each slope into \(f'(x) = 2ax + b\). The two conditions give two equations in \(a\) and \(b\).
\[\begin{aligned} f'(1) = 2a + b &= -2 \\ f'(3) = 6a + b &= 0 \end{aligned}\]Subtract the first equation from the second, so \(b\) cancels and \(4a = 2\). Then substitute \(a = \tfrac{1}{2}\) into the first, so \(1 + b = -2\).
\[4a = 2 \ \Rightarrow\ a = \tfrac{1}{2} \qquad b = -3\]Write the parabola, and check the three conditions. The orange lines are now tangents, and the curve passes through the ring.
\[\begin{aligned} f(x) &= \tfrac{1}{2}x^2 - 3x + 5 \\ f(0) &= 5 \\ f'(1) &= -2 \\ f'(3) &= 0 \end{aligned}\]
Practice
The graph of \(f'\) is the line \(f'(x) = 6x - 12\). The graph of \(f\) is a parabola that passes through \((1, 7)\). Find \(f\).
The line crosses the axis at \(x = 2\), so the vertex of \(f\) is at \(x = 2\). Move the sliders until both rings turn green.
Solution
The derivative is 0 at \(x = 2\), so the vertex is at \(x = 2\). Write \(f(x) = a(x - 2)^2 + k\).
The derivative of this form is \(2a(x - 2)\), and the given line is \(6x - 12 = 6(x - 2)\). The two must match, so \(2a = 6\).
\[2a(x - 2) = 6(x - 2) \ \Rightarrow\ a = 3\]The point \((1, 7)\) gives \(k\).
\[3(1 - 2)^2 + k = 7 \ \Rightarrow\ k = 4\]The parabola is \(f(x) = 3(x - 2)^2 + 4\), which expands to the form below. Because \(a\) is positive, the vertex \((2, 4)\) is a valley.
\[f(x) = 3x^2 - 12x + 16\]
Questions
The graph shows a parabola with its vertex marked in orange. The curve also passes through the points \((-3, 1)\) and \((1, 1)\).
What is \(f'(-1)\), the slope at the vertex?
- 0
- 5
- \(-1\)
Answer
0
Which formula matches the curve?
- \(f(x) = -(x + 1)^2 + 5\)
- \(f(x) = (x + 1)^2 + 5\)
- \(f(x) = -(x - 1)^2 + 5\)
- \(f(x) = -(x + 1)^2 + 1\)
Answer
\(f(x) = -(x + 1)^2 + 5\)
The parabola \(f(x) = a(x - 4)^2 + 3\) passes through \((2, -5)\). What is \(a\)?
- \(-2\)
- 2
- 4
- \(-8\)
Answer
\(-2\)
Summary
You turn each condition on the graph into one equation: a point gives \(f(x_0) = y_0\), a slope gives \(f'(x_0) = m\), and a vertex gives \(f'(h) = 0\).
This works because a parabola has three unknown numbers, and three equations from the conditions fix all three.
You use it when a problem gives a vertex, a slope or a height and asks for the formula of a parabola.
This is one of five skills in topic 5.8 of Which & Why: AP Calculus.