The quadratic function

The quadratic function can be thought of as a linear linear function f(x)=bx+cf(x)=bx+c plus a quadratic term x2x^2:

Definition 1

A function of the form

f(x)=ax2+bx+cf(x)=ax^2+bx+c

is called a quadratic function. To be more precise, it is the standard form of the quadratic function. The letters aa, bb and cc are the coefficients of the standard form.

They stand for numbers, where a0a\neq 0 (otherwise it would be a linear function). Note that the convention is to start with the x2x^2-term, followed by the xx-term, and then the constant term.

Example 1
  • f(x)=3x2+2x+1a=3,b=2,c=1f(x)=3x^2+2x+1 \rightarrow a=3, b=2, c=1
  • g(x)=x21a=1,b=0,c=1g(x)=x^2-1 \rightarrow a=1, b=0, c=-1
  • h(x)=1.5x212xa=1.5,b12,c=0h(x)=-1.5x^2-\frac{1}{2}x \rightarrow a=-1.5, b-\frac{1}{2}, c=0
  • k(x)=3(x2)25k(x)=3(x-2)^2-5

To find the coefficients, we must first expand: f(x)=3x212x+7f(x)=3x^2-12x+7, also a=3,b=12,c=7a=3, b=-12, c=7.

We already know that by completing the square we can also write any quadratic term in the following form A(xv)2+bA\cdot (x-v)^2+b. Thus, we can write any quadratic function in the form f(x)=A(xv)2+bf(x)=A\cdot (x-v)^2+b. This is the standard form.

Definition 2

A quadratic function of the form

f(x)=A(xv)2+Bf(x)=A\cdot (x-v)^2+B

is called the vertex form.

Again, AA, vv and bb are fixed numbers that are now called parameters. In the next chapter we will see that these parameters have a clear geometrical meaning.

If you are not sure how completing the square works, read again the chapter in precalc 1, or check out the primer by clicking right.

Show

A primer in completing the square

Consider the term

x2+bxx^2{\color{red}+}bx

We can write this term as follows

(x+b2)2(b2)2\left(x{\color{red}+}\frac{b}{2}\right)^2-\left(\frac{b}{2}\right)^2

This conversion is called completion the square of the term x2+bxx^2+bx. It is simple enough to see that this is correct. Just expand the lower term to see that we get the upper term. Similar, we have

x2bxx^2{\color{red}-}bx

We can write this term as follows

(xb2)2(b2)2\left(x{\color{red}-}\frac{b}{2}\right)^2-\left(\frac{b}{2}\right)^2

Here are two examples:

  1. x2+9x=(x4.5)24.52=(x4.5)220.25x^2+9x = (x-4.5)^2-4.5^2 = (x-4.5)^2-20.25(To see that this is correct, let's expand. Indeed, we have (x4.5)220.25=x29x+4.524.52=x29x(x-4.5)^2-20.25=x^2-9x+4.5^2-4.5^2=x^2-9x).

  2. x21=(x0.5)20.52=(x1)20.25x^2-1 = (x-0.5)^2-0.5^2=(x-1)^2-0.25.

Often, the term we want to complete has a factor in front of the x2x^2, e.g.

4x28x4x^2-8x

To complete the square, we first have to factor out the 44, and then complete the square afterwards:

4x28x=4(x22x=(x1)212)=4((x1)21)=4(x1)24\begin{array}{lll} 4x^2-8x&=&4(\underbrace{x^2-2x}_{=(x-1)^2-1^2})\\ &=&4((x-1)^2-1)\\ &=&4(x-1)^2-4 \end{array}

The same strategy is used if there is a constant added to the term, e.g.

5x2+15x+25x^2+15x+2

We factor out the 55, and the complete the square, as follows:

5x2+15x+2=5(x2+3x=(x+1.5)21.52)+2=5((x+1.5)22.25)+2=5(x+1.5)211.25+2=5(x+1.5)29.25=5(x(1.5))29.25=5(x(1.5))2+(9.25)\begin{array}{lll} 5x^2+15x+2&=&5(\underbrace{x^2+3x}_{=(x+1.5)^2-1.5^2})+2\\ &=&5((x+1.5)^2-2.25)+2\\ &=&5(x+1.5)^2-11.25+2\\ &=&5(x+1.5)^2-9.25\\ &=&5(x-(-1.5))^2-9.25\\ &=&5(x-(-1.5))^2+(-9.25) \end{array}

Depending on the context, it is easier to work with either the standard form or the vertex form. It is therefore important that we can switch back and forth between these two forms.

Example 2: Vertex form \rightarrow standard form
Solution

We simply expand:

f(x)=3(x22x+1)+4=3x26x+7\begin{array}{ll} f(x) & = & 3(x^2-2x+1)+4\\ & = & 3x^2-6x+7 \end{array}

and thus we have a=3,b=6a=3, b=-6 and c=7c=7

Find the standard form of the quadratic equation f(x)=3(x1)2+4f(x)=3(x-1)^2+4 and determine its coefficients aa, bb and cc.

Example 3: Standard form \rightarrow vertex form
Solution

We complete the square:

f(x)=5(x22x(x1)212)+2f(x)=5(\underbrace{x^2-2x}_{(x-1)^2-1^2})+2

where we completed the square of x22xx^2-2x. We get

f(x)=5(x22x(x1)212)+2=5((x1)21)+2=5(x1)25+2=5(x1)23=5(x1)2+(3)\begin{array}{ll} f(x)&=&5(\underbrace{x^2-2x}_{(x-1)^2-1^2})+2\\ & = & 5((x-1)^2-1)+2\\ & = & 5(x-1)^2-5+2\\ & = & 5(x-1)^2-3\\ & = & 5(x-1)^2+(-3)\\ \end{array}

Thus, we have A=5,v=1A=5, v=1 und b=3b=-3.

Find the vertex form of the quadratic function f(x)=5x210x+2f(x)=5x^2-10x+2 and determine its parameters AA, vv, and bb.

Example 4: Standard form \rightarrow vertex form \rightarrow standard form
Solution

Standard form \rightarrow vertex form:

f(x)=2x24x2=2(x22x)2=2((x1)212)2=2(x1)24=2(x1)2+(4)\begin{array}{lll} f(x) & = & 2x^2-4x-2 \\ & = & 2(x^2-2x)-2 \\ & = & 2((x-1)^2-1^2)-2\\ & = & 2(x-1)^2-4\\ & = & 2(x-1)^2+(-4)\\ \end{array}

Vertex form \rightarrow standard form:

f(x)=2(x1)24=2(x22x+1)4=2x24x+24=2x24x2\begin{array}{lll} f(x) & = & 2(x-1)^2-4 \\ & = & 2(x^2-2x+1)-4 \\ & = & 2x^2-4x+2-4\\ & = & 2x^2-4x-2\\ \end{array}

Find the vertex form of the quadratic function f(x)=2x24x2f(x)=2x^2-4x-2, and expand this form to find the standard form again.

A word about the xx-intercepts of quadratic functions ff. If in standard form,

f(x)=ax2+bx+cf(x)=ax^2+bx+c

the xx-intercept can be found by solving the quadratic equation

ax2+bx+c=0ax^2+bx+c=0

which can be done using the midnight formula

x1,2=b±b24ac2ax_{1,2}=\frac{-b\pm\sqrt{b^2-4ac}}{2a}

If in vertex form

f(x)=A(xv)2+bf(x)=A(x-v)^2+b

you can either expand into standard form and use the midnight formula, but it is much easier to solve the equation

A(xv)2+b=0A(x-v)^2+b=0

directly. Here is an example: Consider the following quadratic function

f(x)=4(x2)2+10f(x)=-4(x-2)^2+10

It is in vertex form. To find the xx-intercepts, we solve the equation

4(x2)2+10=0104(x2)2=10:(4)(x2)2=2.5(.)x2=±2.5+2x=±2.5+2\begin{array}{lll} -4(x-2)^2+10&=&0\quad | -10\\ -4(x-2)^2&=&-10\quad | :(-4)\\ (x-2)^2&=&2.5\quad | \sqrt{(.)}\\ x-2&=&\pm\sqrt{2.5}\quad| +2\\ x&=& \pm\sqrt{2.5}+2 \end{array}

and thus x1=3.58x_1=3.58 and x2=0.42x_2=0.42.

Exercise 1

Bring the following quadratic functions into the other form. Also, determine the xx- and yy-intercepts.

  1. f(x)=2(x+3)24f(x)=-2(x+3)^2-4

  2. f(x)=x22x+3f(x)=x^2-2x+3

  3. f(x)=2x2+8x2f(x)=2x^2+8x-2

  4. f(x)=3x2+27x+9f(x)=-3x^2+27x+9

  5. f(x)=4(x2)21f(x)=4(x-2)^2-1

  6. f(x)=x2x1f(x)=-x^2-x-1

  7. f(x)=x2+2f(x)=x^2+2

  8. f(x)=0.5x23xf(x)=0.5x^2-3x

Solution
  1. Is already in vertex form.
    1. Bring into standard form: f(x)=2(x2+6x+9)4=2x212x22\begin{array}{ll} f(x) &= & -2(x^2+6x+9)-4\\ &= & -2x^2-12x-22 \end{array}
    2. yy-axis: f(0)=22f(0)=\underline{-22}
    3. xx-axis: f(x)=0f(x)=0. Use the midnight formula, or simpler, use the vertex form: 2(x+3)24=0(x+3)2=2\begin{array}{ll} -2(x+3)^2-4 & = & 0 \\ (x+3)^2 & = & -2 \\ \end{array} No solution here! so no xx-intercept.
  2. Is already in standard form.
    1. Bring into vertex form: f(x)=x22x+3=(x1)212+3=(x1)2+2\begin{array}{ll} f(x)&=&x^2-2x+3\\ & = & (x-1)^2-1^2+3\\ &=&(x-1)^2+2 \end{array}
    2. yy-axis: f(0)=3f(0)=3
    3. xx-axis: f(x)=0f(x)=0 no solution, so no xx-intercept.
  3. Is already in standard form.
    1. Vertex form: f(x)=2x2+8x2=2(x2+4x)2=2((x+2)222)2=2(x+2)210\begin{array}{ll} f(x)&=&2x^2+8x-2\\ & = & 2(x^2+4x)-2\\ &=&2((x+2)^2-2^2)-2\\ &=&2(x+2)^2-10 \end{array}
    2. yy-axis: f(0)=2f(0)=\underline{-2}
    3. xx-axis: Aus f(x)=0f(x)=0 follows x1=25x_1=\underline{-2-\sqrt{5}}, x2=2+5x_2=\underline{-2+\sqrt{5}}
  4. Is already in standard form.
    1. Vertex form: f(x)=3(x4.5)2+69.75f(x)=-3(x-4.5)^2+69.75
    2. yy-axis: f(0)=9f(0)=9
    3. xx-axis: x1=9.322,x2=0.322x_1=9.322, x_2=-0.322
  5. Is already in vertex form.
    1. Normalform: f(x)=4x216x+15f(x)=4 x^2 - 16 x + 15
    2. yy-axis: f(0)=15f(0)=15
    3. xx-axis: x1=1.5,x2=2.5x_1=1.5, x_2=2.5
  6. Is already in standard form.
    1. Vertex form: f(x)=(x+0.5)20.75f(x)=-(x+0.5)^2-0.75
    2. yy-axis: f(0)=1f(0)=-1
    3. xx-axis: none
  7. Is in vertex and standard form.
    1. Vertex form: f(x)=(x0)2+2f(x)=(x-0)^2+2
    2. Normalform: f(x)=x2+0x+2f(x)=x^2+0\cdot x + 2
    3. yy-axis: f(0)=2f(0)=2
    4. xx-axis: none
  8. Is in standard form.
    1. Vertex form: f(x)=0.5(x3)24.5f(x)=0.5(x-3)^2-4.5
    2. Normalform: f(x)=0.5x23x+0f(x)=0.5x^2-3x+0
    3. yy-axis: f(0)=0f(0)=0
    4. xx-axis: Midnight formula, completing the square, or quickest method: to factor out the xx: f(x)=0.5x23x=0f(x)=0.5x^2-3x=0, thus x(0.5x3)=0x\cdot(0.5x-3)=0, thus x1=0x_1=0 and x2=6x_2=6.