Unit 8, lesson 95

Shifted Conics and Completing the Square

How moving a conic changes its equation, how completing the square turns an expanded equation back into a shifted standard form, and how vertices, foci and asymptotes move with the curve.

  • Theory part 189
  • Practice part 190
  • Conic Sections

An elliptical window on a building plan sits wherever the architect put it, not at the origin of the grid. Moving a conic changes its equation, and once that equation is multiplied out it can look like a jumble such as 9x2+4y2−36x+8y+4=09x^2 + 4y^2 - 36x + 8y + 4 = 0. Completing the square turns the jumble back into a form that shows at a glance where the curve sits and what shape it has.

Key terms

Translated conics

Definition Let hh and kk be real numbers. Moving every point of the plane hh units horizontally and kk units vertically sends (x,y)(x, y) to (x+h,y+k)(x + h, y + k). If a curve is the solution set of an equation G(x,y)=0G(x, y) = 0, the moved curve is the solution set of

G(x−h,y−k)=0,G(x - h, y - k) = 0,

because (x,y)(x, y) lies on the moved curve exactly when (x−h,y−k)(x - h, y - k) lies on the original one. A translation keeps all distances, so a translated conic has the same type, size, shape and eccentricity as the original.

In plain words To move a curve hh units to the right, replace xx by x−hx - h. The minus sign looks backwards, but the new curve at xx does what the old curve did at x−hx - h.

Example Move the ellipse x24+y2=1\frac{x^2}{4} + y^2 = 1 three units right and two units down, so h=3h = 3 and k=−2k = -2. The new equation is

(x−3)24+(y+2)2=1.\frac{(x - 3)^2}{4} + (y + 2)^2 = 1.

The vertex (2,0)(2, 0) of the original moves to (5,−2)(5, -2), and indeed (5−3)24+(−2+2)2=1\frac{(5 - 3)^2}{4} + (-2 + 2)^2 = 1.

Shifted parabolas

Definition Let p≠0p \ne 0. The parabola with vertex (h,k)(h, k), focus (h+p,k)(h + p, k) and directrix x=h−px = h - p has the equation

(y−k)2=4p(x−h).(y - k)^2 = 4p(x - h).

Its axis is the horizontal line y=ky = k, and it opens to the right when p>0p > 0 and to the left when p<0p < 0. The parabola with vertex (h,k)(h, k), focus (h,k+p)(h, k + p) and directrix y=k−py = k - p has the equation

(x−h)2=4p(y−k).(x - h)^2 = 4p(y - k).

Its axis is the vertical line x=hx = h, and it opens upward when p>0p > 0 and downward when p<0p < 0.

In plain words The number pp is the signed distance from the vertex to the focus. Moving the vertex to (h,k)(h, k) carries the focus and the directrix along with it.

Example The parabola with vertex (−1,3)(-1, 3) that opens to the right with p=2p = 2 is

(y−3)2=8(x+1).(y - 3)^2 = 8(x + 1).

Its focus is (1,3)(1, 3) and its directrix is x=−3x = -3. At x=1x = 1 the equation gives (y−3)2=16(y - 3)^2 = 16, so y=7y = 7 or y=−1y = -1. The point (1,7)(1, 7) is 44 units from the focus and 44 units from the directrix, as a point of a parabola should be.

Shifted ellipses

Definition Let a>b>0a > b > 0 and c=a2−b2c = \sqrt{a^2 - b^2}. The ellipse with center (h,k)(h, k) and a horizontal major axis is

(x−h)2a2+(y−k)2b2=1.\frac{(x - h)^2}{a^2} + \frac{(y - k)^2}{b^2} = 1.

Its vertices are (h±a,k)(h \pm a, k), its covertices are (h,k±b)(h, k \pm b) and its foci are (h±c,k)(h \pm c, k). When a2a^2 stands under (y−k)2(y - k)^2 instead, the major axis is vertical, the vertices are (h,k±a)(h, k \pm a), the covertices are (h±b,k)(h \pm b, k) and the foci are (h,k±c)(h, k \pm c). If both denominators equal a2a^2, the equation describes the circle of radius aa about (h,k)(h, k) instead.

In plain words The center replaces the origin. Every other point is found by stepping aa, bb or cc units from the center along the axes.

Example The ellipse with center (−1,2)(-1, 2), a=5a = 5 along the horizontal and b=3b = 3 is

(x+1)225+(y−2)29=1.\frac{(x + 1)^2}{25} + \frac{(y - 2)^2}{9} = 1.

Here c=25−9=4c = \sqrt{25 - 9} = 4, so the foci are (−5,2)(-5, 2) and (3,2)(3, 2), and the vertices are (−6,2)(-6, 2) and (4,2)(4, 2). The covertex (−1,5)(-1, 5) is 16+9=5\sqrt{16 + 9} = 5 units from each focus, and 5+5=10=2a5 + 5 = 10 = 2a.

Shifted hyperbolas

Definition Let a>0a > 0, b>0b > 0 and c=a2+b2c = \sqrt{a^2 + b^2}. The hyperbola with center (h,k)(h, k) and a horizontal transverse axis is

(x−h)2a2−(y−k)2b2=1,\frac{(x - h)^2}{a^2} - \frac{(y - k)^2}{b^2} = 1,

with vertices (h±a,k)(h \pm a, k), foci (h±c,k)(h \pm c, k) and asymptotes y−k=±ba(x−h)y - k = \pm \frac{b}{a}(x - h). The hyperbola with center (h,k)(h, k) and a vertical transverse axis is

(y−k)2a2−(x−h)2b2=1,\frac{(y - k)^2}{a^2} - \frac{(x - h)^2}{b^2} = 1,

with vertices (h,k±a)(h, k \pm a), foci (h,k±c)(h, k \pm c) and asymptotes y−k=±ab(x−h)y - k = \pm \frac{a}{b}(x - h).

In plain words The asymptotes move with the curve. They still cross at the center, and their slopes do not change.

Example Take

(y+1)29−(x−2)216=1.\frac{(y + 1)^2}{9} - \frac{(x - 2)^2}{16} = 1.

The center is (2,−1)(2, -1), with a=3a = 3, b=4b = 4 and c=9+16=5c = \sqrt{9 + 16} = 5. The transverse axis is vertical, so the vertices are (2,2)(2, 2) and (2,−4)(2, -4), the foci are (2,4)(2, 4) and (2,−6)(2, -6), and the asymptotes are y+1=±34(x−2)y + 1 = \pm \frac{3}{4}(x - 2). As a check, the vertex (2,2)(2, 2) is 22 units from (2,4)(2, 4) and 88 units from (2,−6)(2, -6), a difference of 6=2a6 = 2a.

Completing the square

Definition For real numbers A≠0A \ne 0 and DD,

Ax2+Dx=A(x+D2A)2−D24A.Ax^2 + Dx = A\left(x + \frac{D}{2A}\right)^2 - \frac{D^2}{4A}.

An equation Ax2+Cy2+Dx+Ey+F=0Ax^2 + Cy^2 + Dx + Ey + F = 0 with no xyxy term, where AA and CC are not both zero, is rewritten in shifted form this way. Group the xx terms and the yy terms, and factor out the coefficient of each squared variable. Complete the square inside each group that has a square, and add to the other side exactly what this adds to the left side. If both variables are squared and the new right side is not zero, divide by it so that the right side is 11. If only one variable is squared and the other appears to the first power, move the remaining terms to the right side and factor out the coefficient of that variable, as in the parabola forms above. Some outcomes are degenerate, and the last section shows how to recognize them.

In plain words Turn each group of terms into a perfect square plus a constant, and keep track of what you added. The most common slip is forgetting that a number added inside a group gets multiplied by the coefficient in front of it.

Example Return to 9x2+4y2−36x+8y+4=09x^2 + 4y^2 - 36x + 8y + 4 = 0. Grouping and factoring gives

9(x2−4x)+4(y2+2y)=−4.9(x^2 - 4x) + 4(y^2 + 2y) = -4.

Adding 44 inside the first group adds 9⋅4=369 \cdot 4 = 36 to the left side, and adding 11 inside the second adds 4⋅1=44 \cdot 1 = 4, so

9(x2−4x+4)+4(y2+2y+1)=−4+36+4.\begin{aligned} &9(x^2 - 4x + 4) + 4(y^2 + 2y + 1) \\[0.4em] &\quad = -4 + 36 + 4. \end{aligned}

That is 9(x−2)2+4(y+1)2=369(x - 2)^2 + 4(y + 1)^2 = 36, and dividing by 3636 gives

(x−2)24+(y+1)29=1.\frac{(x - 2)^2}{4} + \frac{(y + 1)^2}{9} = 1.

It is an ellipse with center (2,−1)(2, -1), a vertical major axis, a=3a = 3, b=2b = 2 and c=5c = \sqrt{5}. Its vertices are (2,2)(2, 2) and (2,−4)(2, -4) and its foci are (2,−1±5)(2, -1 \pm \sqrt{5}). The vertex (2,2)(2, 2) satisfies the original equation, since 36+16−72+16+4=036 + 16 - 72 + 16 + 4 = 0.

Shifting vertices

Definition The translation by hh horizontally and kk vertically moves every feature of a conic by the same amount. The center, the vertices, the covertices and the foci move from (x,y)(x, y) to (x+h,y+k)(x + h, y + k), and the axes, directrices and asymptotes move to parallel lines through the moved points. The numbers aa, bb, cc, pp and ee do not change. So each point feature of a shifted conic is the matching point of the unshifted conic plus (h,k)(h, k). In the other direction, the equation of an ellipse or a hyperbola can be found from shifted features by locating the center first, as the midpoint of the vertices or of the foci, and then reading aa, bb and cc as distances from it.

In plain words A shift moves the whole picture at once. Distances inside the picture stay the same, so you only have to find where the center went.

Example An ellipse has vertices (−2,1)(-2, 1) and (8,1)(8, 1) and foci (0,1)(0, 1) and (6,1)(6, 1). The center is the midpoint (3,1)(3, 1). The vertices are 1010 apart, so a=5a = 5, and the foci are 66 apart, so c=3c = 3. Then b=25−9=4b = \sqrt{25 - 9} = 4 and the equation is

(x−3)225+(y−1)216=1.\frac{(x - 3)^2}{25} + \frac{(y - 1)^2}{16} = 1.

It is the ellipse x225+y216=1\frac{x^2}{25} + \frac{y^2}{16} = 1 moved 33 units right and 11 unit up, so its covertices are (3,5)(3, 5) and (3,−3)(3, -3).

Recognizing the type and degenerate cases

Definition Consider Ax2+Cy2+Dx+Ey+F=0Ax^2 + Cy^2 + Dx + Ey + F = 0 with AA and CC not both zero.

  • If AC>0AC > 0, the graph is an ellipse (a circle when A=CA = C), a single point, or empty.
  • If AC<0AC < 0, the graph is a hyperbola or a pair of lines crossing at one point.
  • If exactly one of AA and CC is zero, the graph is a parabola, a pair of parallel lines, a single line, or empty.

Completing the square decides which case happens. When AC≠0AC \ne 0 the result has the form A(x−h)2+C(y−k)2=KA(x - h)^2 + C(y - k)^2 = K, and the graph is an ellipse or a hyperbola exactly when K≠0K \ne 0 and, in the case AC>0AC > 0, KK has the same sign as AA.

In plain words The signs of the two squared terms tell you what the curve can be. Only after completing the square do you know whether it really is that curve or something that collapsed.

Example Completing the square in 4x2+y2−8x+2y+5=04x^2 + y^2 - 8x + 2y + 5 = 0 gives

4(x−1)2+(y+1)2=0.4(x - 1)^2 + (y + 1)^2 = 0.

A sum of squares is zero only when both are zero, so the graph is the single point (1,−1)(1, -1). With the constant 66 in place of 55 the right side becomes −1-1 and no point fits. In the same way x2−y2−2x+1=0x^2 - y^2 - 2x + 1 = 0 becomes (x−1)2−y2=0(x - 1)^2 - y^2 = 0, which is the pair of lines y=x−1y = x - 1 and y=1−xy = 1 - x crossing at (1,0)(1, 0).

Check yourself

  1. Identify the conic 4x2−9y2+16x+54y−101=04x^2 - 9y^2 + 16x + 54y - 101 = 0 and find its center, vertices, foci and asymptotes.
Show the answer

Grouping gives 4(x2+4x)−9(y2−6y)=1014(x^2 + 4x) - 9(y^2 - 6y) = 101. Completing both squares adds 1616 and subtracts 8181 on the left, so

4(x+2)2−9(y−3)2=101+16−81=36,\begin{aligned} &4(x + 2)^2 - 9(y - 3)^2 \\[0.4em] &\quad = 101 + 16 - 81 = 36, \end{aligned}

that is

(x+2)29−(y−3)24=1.\frac{(x + 2)^2}{9} - \frac{(y - 3)^2}{4} = 1.

It is a hyperbola with center (−2,3)(-2, 3), a=3a = 3, b=2b = 2 and c=13c = \sqrt{13}. The vertices are (−5,3)(-5, 3) and (1,3)(1, 3), the foci are (−2±13,3)(-2 \pm \sqrt{13}, 3) and the asymptotes are y−3=±23(x+2)y - 3 = \pm \frac{2}{3}(x + 2).

  1. Find the vertex, focus and directrix of the parabola x2+6x+4y+1=0x^2 + 6x + 4y + 1 = 0.
Show the answer

Completing the square gives (x+3)2−9+4y+1=0(x + 3)^2 - 9 + 4y + 1 = 0, so

(x+3)2=−4(y−2).(x + 3)^2 = -4(y - 2).

The vertex is (−3,2)(-3, 2) and 4p=−44p = -4, so p=−1p = -1 and the parabola opens downward. The focus is (−3,1)(-3, 1) and the directrix is y=3y = 3.

  1. A hyperbola has vertices (1,−2)(1, -2) and (1,6)(1, 6) and foci (1,−3)(1, -3) and (1,7)(1, 7). Write its equation.
Show the answer

The center is the midpoint (1,2)(1, 2) and the transverse axis is vertical. The vertices are 88 apart, so a=4a = 4, and the foci are 1010 apart, so c=5c = 5. Then b2=25−16=9b^2 = 25 - 16 = 9 and the equation is

(y−2)216−(x−1)29=1.\frac{(y - 2)^2}{16} - \frac{(x - 1)^2}{9} = 1.

How this lesson connects

Used later in