IB

View all Questions

Question

Mathematics

How can completing the square reveal graph transformations?

Answer

Mathematics

Expert Answer

Completing the square rewrites a quadratic as a(x−h)2+ka(x-h)^2+k. In this form you can read off the vertex (h,k)(h,k), the axis of symmetry x=hx=h and the vertical stretch factor aa, none of which are easy to see in the expanded form.

Rewrite without changing the function

Take f(x)=2x2−12x+11f(x)=2x^2-12x+11. Factor the 2 out of the x2x^2 and xx terms only, leaving the constant outside. Then halve the coefficient of xx inside the bracket: half of −6-6 is −3-3, so x2−6x=(x−3)2−9x^2-6x=(x-3)^2-9.

f(x)=2(x2−6x)+11=2((x−3)2−9)+11=2(x−3)2−18+11f(x)=2(x−3)2−7\begin{aligned}f(x)&=2(x^2-6x)+11\\ &=2\left((x-3)^2-9\right)+11\\ &=2(x-3)^2-18+11\\ f(x)&=\boxed{2(x-3)^2-7}\end{aligned}

The −9-9 sits inside the bracket, so it is multiplied by 2 and becomes −18-18. Subtracting only 9 gives 2(x−3)2+22(x-3)^2+2, which is a different function. To check, expand the answer: 2(x2−6x+9)−7=2x2−12x+112(x^2-6x+9)-7=2x^2-12x+11.

Read the transformations

Starting from y=x2y=x^2, one valid sequence is:

StepResult
Stretch vertically by scale factor 2y=2x2y=2x^2
Translate 3 units righty=2(x−3)2y=2(x-3)^2
Translate 7 units downy=2(x−3)2−7y=2(x-3)^2-7

The order matters for the vertical steps. Translating down 7 before the stretch would double the translation as well, giving y=2(x−3)2−14y=2(x-3)^2-14.

The vertex is (3,−7)(3,-7) and the axis of symmetry is x=3x=3. Since a=2>0a=2>0, the parabola opens upwards and its minimum value is −7-7. If aa were negative, as in y=−2(x−3)2−7y=-2(x-3)^2-7, the stretch would also reflect the graph in the xx-axis, so the parabola would open downwards with a maximum of −7-7.

The sign inside the bracket is opposite to the direction of the shift: (x−3)(x-3) moves the graph 3 units right, not left. A quick check is to substitute x=3x=3 into the original function: f(3)=18−36+11=−7f(3)=18-36+11=-7, which confirms the vertex. The formula h=−b2a=124=3h=-\dfrac{b}{2a}=\dfrac{12}{4}=3 gives the same axis.

Connect the form to an inverse

Over all real numbers, ff is not one-to-one because two inputs can give the same output: f(2)=f(4)=−5f(2)=f(4)=-5. To define an inverse, restrict the domain to one side of the vertex, for example x≥3x\ge3. The range of ff on this domain is f(x)≥−7f(x)\ge-7.

Rearrange y=2(x−3)2−7y=2(x-3)^2-7:

y+72=(x−3)2x=3+y+72\begin{aligned}\frac{y+7}{2}&=(x-3)^2\\ x&=3+\sqrt{\frac{y+7}{2}}\end{aligned}

Only the positive square root is used, because x≥3x\ge3 means x−3≥0x-3\ge0. Swapping xx and yy gives

f−1(x)=3+x+72,x≥−7f^{-1}(x)=3+\sqrt{\frac{x+7}{2}},\qquad x\ge-7

The domain of f−1f^{-1} is the range of the restricted ff, and the range of f−1f^{-1} is f−1(x)≥3f^{-1}(x)\ge3. To check, f(4)=−5f(4)=-5, so f−1(−5)f^{-1}(-5) should be 4. It is: 3+1=43+\sqrt{1}=4. On the graphs, the point (4,−5)(4,-5) on ff reflects in y=xy=x to (−5,4)(-5,4) on f−1f^{-1}.

With the other restriction, x≤3x\le3, take the negative square root instead: f−1(x)=3−x+72f^{-1}(x)=3-\sqrt{\dfrac{x+7}{2}}. Writing ±\pm would give two outputs for most inputs, which describes a relation, not a function.

Connect the algebra and graph shapes in the quadratic-and-inverse question in AA HL Mock Exam, Set 1, Paper 1. Use completed-square form to describe the transformations between the graphs, and keep the allowed inputs in mind when working with the inverse.

Answered by Revision Village IB Expert

Interested in diving deeper into this concept?

Explore More IB Mathematics Resources

Over 80% of IB students globally are experiencing the power of Revision Village