# Completing the square

1. Dec 28, 2008

### schlynn

1. The problem statement, all variables and given/known data
I need to know how to complete the square, I need to know how to do this to get
(this is to find the vertex of the quadratic function and the x intercept(s)
f(x)=aX2+bX+c to f(x)=a(x-h)2+k
It would be helpfull to see walkthroughs for when a=1 and when "a" does not equal 1.
questions:
-3x2+9x+(1/4)
and
x2-6x-2
2. Relevant equations
I dont think theres any, just that to get y set x=0 and to get x set y=0, for the intersepts that is.
h=horizontal shift in the graph
k=verticle shift in the graph

there is this shortcut too....
f(x)=a(x-h)2+k
and the vertex will be
((-b/2a),c-(b2/4a))
3. The attempt at a solution
Well, I'm learning this all out of school, and the book doesn't really explain how to do this very well, so I have no idea what do to. Could someone make walkthroughs on how to solve both of the question? This will help me tremendusly as I have been stuck on what to do now.

2. Dec 28, 2008

$$g(x) = x^2 + 6x -120$$

• Here $$b = 6$$. Start by calculating half it

$$\frac b 2 = 3$$
• Add and immediately subtract the square of 3, as shown here. (I've grouped the terms
together for easier reading.) This changes the look of the right-hand-side, but since 9-9=0,
no numerical change has occurred

$$g(x) = \left( x^2 + 6x + 3^2 \right) - 3^2 - 120$$
• The portion in parentheses is $$(x-3)^2$$, so we have

$$g(x) = (x-3)^2 - 129$$
• The vertex is the point $$(3,-129)$$. The final step is to find the intercepts.
\begin{align*} (x-3)^2 - 129 & = 0\\ (x-3)^2 & = 129 \\ x-3 & = \pm \sqrt{\, 129} \\ x & = 3 \pm \sqrt{\, 120} \end{align*}

The intercepts are $$(3 \pm \sqrt{\, 129}, 0 )$$.

For the second question

$$h(x) = 3x^2 + 12x - 111$$

Here is the work to complete the square.

\begin{align*} h(x) & = 3x^2 + 12x - 111 \\ & = 3 \left(x^2 + 4x \right) - 111\\ & = 3 \left( \left(x^2 + 4x + 2^2\right) - 2^2 \right) - 111 \\ & = 3 ((x+2)^2 - 4) - 111 \\ & = 3(x+2)^2 - 12 - 111 = 3(x+2)^2 - 123 \end{align*}

The vertex is the point $$(-2, -123)$$. To find the intercepts

\begin{align*} 3(x+2)^2 - 123 & = 0\\ 3(x+2)^2 & = 123\\ (x+2)^2 & = \frac{123} 3 = 41\\ x+2 & = \pm \sqrt{\, 41}\\ x & = -2 \pm \sqrt{\, 41} \end{align*}

The two intercepts are $$(-2 \pm \sqrt{\, 41}, 0)$$.

3. Dec 28, 2008

### Unco

Just a minor sign error there, Statdad.

4. Jan 3, 2009

### Gregg

$$ax^2 + bx + c = a(x^2 + \frac{b}{a} + \frac{c}{a})$$
$$ax^2 + bx + c = a((x + \frac{b}{2a})^2 +\frac{c}{a})- \left[\frac{b}{2a}\right]^2$$
$$ax^2 + bx + c =a(x + \frac{b}{2a})^2 - \left[\frac{b}{2a}\right]^2 + c$$

Vertex for any function like
$$(x+a)^2 + b= \left[\stackrel{-a}{ b}\right]$$

The reason for this is because for the function to be at its lowest value, given that the first part is squared it has to be equal to 0. The x value for this co-ordinate therefore has to be the negative of a. b is more obvious.

Intercepts

You can do this two ways (assuming that because you have completed the square therefore you cannot factorise) using the quadratic formula or an easier way, manipulating the completed square you have.

$$(x+a)^2 - b = 0$$
$$(x+a)^2 = b$$
$$(x+a) = \sqrt{b}$$
$$x = -a \pm \sqrt{b}$$

What if b is positive

$$(x+a)^2 + b = 0$$

If b is positive then there is no solution for the function = 0. This is because $$(x+a)^2$$ does not intersect the x axis but touches it at (-a,0). Any increment to such a function will not have real roots.

You can prove this using the discriminant of the quadratic $$b^2 - 4ac$$.

Edit:

$$-3x^2+9x+\frac{1}{4}$$

1. Take out the -3 for all the expressions
$$ax^2 + bx + c = a(x^2 + \frac{b}{a} + \frac{c}{a})$$

2. Now complete the square within the brackets remembering that the co-efficient of x, b is now actually $$\frac{b}{a}$$ and becomes $$\frac{b}{2a}$$.
$$ax^2 + bx + c = a((x + \frac{b}{2a})^2 +\frac{c}{a}) - \left[\frac{b}{2a}\right]^2$$

3. You can now muliply the constant out to get.
$$ax^2 + bx + c =a(x + \frac{b}{2a})^2 - \left[\frac{b}{2a}\right]^2 + c$$

$$x^2-6x-2$$ You will be able to do now.

Last edited: Jan 3, 2009