Sub topic 11
Writing an Equation from a Graph
Assume you can evaluate function notation, plot points, recognize the parent graphs \(x\), \(x^2\), \(|x|\), \(\sqrt{x}\), and \(x^3\), and identify domain and range. In this chapter, you will work backward from a transformed graph to its equation.
Identify the Parent Function
Start by asking which basic graph has the same overall shape.
- A V-shape suggests \(f(x)=|x|\).
- A U-shape or upside-down U suggests \(f(x)=x^2\).
- A square-root curve has an endpoint and extends in one direction.
- An S-shaped curve suggests \(f(x)=x^3\).
- A straight line may come from \(f(x)=x\).
Then choose a few features that are easy to read. These might include a vertex, endpoint, intercept, or another point whose coordinates are clear.
Use the Transformation Form
A useful form for a transformed function is
\[ g(x)=a f\bigl(b(x-h)\bigr)+k. \]
Each parameter has a graphical meaning.
| Parameter | Graph effect |
|---|---|
| \(h\) | Shift right by \(h\) when \(h>0\), or left when \(h<0\) |
| \(k\) | Shift up by \(k\) when \(k>0\), or down when \(k<0\) |
| \(a\) | Vertical stretch or compression; a negative value reflects across the x-axis |
| \(b\) | Horizontal compression or stretch; a negative value reflects across the y-axis |
The input change works opposite to the sign suggested by the expression. For example, \(f(x-3)\) shifts the graph right 3 units.
For many graphs, the easiest process is:
- Identify the parent function \(f\).
- Locate the transformed key feature.
- Use its coordinates to find \(h\) and \(k\).
- Compare the height or width of another point to determine \(a\) or \(b\).
- Check the equation against a second point.
For a parabola in vertex form,
\[ g(x)=a(x-h)^2+k, \]
the vertex is \((h,k)\). If the graph passes through \((h+1,k+a)\), then \(a\) is the vertical change one unit from the vertex.
Worked Example: A Quadratic Graph
Suppose a graph has vertex \((3,1)\), opens downward, and passes through \((4,-1)\).
Because the graph is a parabola, begin with
\[ g(x)=a(x-h)^2+k. \]
The vertex gives \(h=3\) and \(k=1\):
\[ g(x)=a(x-3)^2+1. \]
Substitute the point \((4,-1)\):
\[ -1=a(4-3)^2+1. \]
Therefore,
\[ -1=a+1,\qquad a=-2. \]
The equation is
\[ \boxed{g(x)=-2(x-3)^2+1}. \]
The negative value of \(a\) explains why the parabola opens downward. Its magnitude, \(2\), means it is vertically stretched compared with \(y=x^2\).
def g(x):
return -2 * (x - 3) ** 2 + 1
points = [(3, 1), (4, -1), (2, -1)]
for x, expected_y in points:
print(x, g(x), g(x) == expected_y)Common Errors and Verification
A frequent error is writing \(x+3\) for a graph shifted right 3 units. The correct expression is \(x-3\). Another error is finding the vertex correctly but ignoring the vertical scale. Use a second point to determine the scale.
A graph does not always provide exact coordinates. In that case, use its symmetry, endpoint, intercepts, or known parent points. After writing an equation, substitute at least two visible points. Also check the direction of opening, endpoint location, domain, and range.
Exercise
A graph is a V-shape with vertex (-2, 4) and passes through (-1, 6). Write its equation using the parent function f(x) = |x|.
Show answer
Use g(x) = a|x - h| + k. The vertex gives h = -2 and k = 4, so g(x) = a|x + 2| + 4. Substituting (-1, 6) gives 6 = a + 4, so a = 2. Therefore, g(x) = 2|x + 2| + 4.