4.3 Quadratics

4.3.1 Introduction

A quadratic is an equation in the form

y=ax2+bx+cy=ax^{2}+bx+c (4.8)

One example quadratic is

y=x2y=x^{2} (4.9)
11 1 Note that \say\cdot is the same as \say×\times.

We can find the value of this at different points - for example, when x=1x=1, then y=1y=1, when x=4x=4 then y=44=16y=4\cdot 4=16 and when x=3.123x=3.123 then y=3.1233.123=9.753129y=3.123\cdot 3.123=9.753129.

We can also plot them on a graph. For example, the quadratic y=x2y=x^{2} looks like

10-108-86-64-42-22244668810102020404060608080100100xxyyy=x2y=x^{2}

4.3.2 Factorising

The really key idea of factorising is this very useful rule, which is that

x×(y+z)=xy+xzx\times(y+z)=xy+xz (4.10)

this is known as \saydistributivity (which is not really an important word to know). We can consider some examples with mathematical structures which are familiar us to help build some intuition, for example

2×(4+3)=2×7=142\times(4+3)=2\times 7=14 (4.11)

but it is also equal to

2×4+2×3=8+6=14.2\times 4+2\times 3=8+6=14. (4.12)

Of course, this is not a proof (and proving that this is definitely true is possible, but involves too much maths to write here).

Example 4.3.1

This is quite useful when doing simple arithmetic, for example if we want to calculate 12×3112\times 31, we could do this by applying the distributive property and noting that 31=30+131=30+1, so therefore

12×31\displaystyle 12\times 31 =12×(30+1)\displaystyle=12\times(30+1) (4.13)
=12×30+12×1\displaystyle=12\times 30+12\times 1 Because of distributivity (4.14)
=12×30+12\displaystyle=12\times 30+12 (4.15)
=360+12\displaystyle=360+12 (4.16)
=372.\displaystyle=372. (4.17)

Of course, we can apply this when we do algebra (i.e. to unknown variables) not just to specific numbers. One thing that most people thing is good is to \saysimplify things, which makes them easier to understand. One way we can do this is to express things in terms of \sayirreducible parts - i.e. things which cannot be simplified further.

Example 4.3.2

Let us consider the expression

(x+x2)(x+x^{2}) (4.18)

and try to write it in terms of irreducible components.

We can apply the distributive law here. We take the identity from Equation 4.10 and apply it by setting a=xa=x (confusing, I know), b=1b=1 and c=xc=x, from which we deduce that

(x+x2)=x(1+x)\displaystyle(x+x^{2})=x(1+x) (4.19)

A useful factorising identity

This shows up in a number of places, especially in linear algebra.

Example 4.3.3

Factorise

yz(zy)+zx(xz)+xy(yx).yz(z-y)+zx(x-z)+xy(y-x). (4.20)

We start with an excellent German word, which unfortunately doesn’t seem to have a direct English translation, called an \sayAnsatz. Technically the noun shouldn’t be capitalised (in English), but I have enough problems remembering to spell nouns with capital letters in German that I don’t want to create any more for myself.

The word means something like an educated guess, or a hypothesis; essentially we guess that the answer has some kind of form, and then try to use our guess to end up with the desired result.

In our case, our "guess" will be that we can factorise this into three brackets. Why three? Well, if we have two brackets, then we will get four terms (expand (a+b)(c+d)(a+b)(c+d) by hand if you’re not convinced that this is true), and four is (we guess that the four terms won’t split apart to give the desired number) too few. Let’s expand the expression (it makes it easier, at least in my view), to obtain this

yz(zy)+zx(xz)+xy(yx)=yz2+xy2+x2zy2zxz2x2y.yz(z-y)+zx(x-z)+xy(y-x)=yz^{2}+xy^{2}+x^{2}z-y^{2}z-xz^{2}-x^{2}y. (4.21)

Then if we want to make three brackets, we can start by writing out our expected result as

(_+_)(_+_)(_+_)(\_+\_)(\_+\_)(\_+\_) (4.22)

Then, to get the yz2yz^{2} term, we can try

(y+_)(z+_)(z+_)(y+\_)(z+\_)(z+\_) (4.23)

Then, to get the xy2xy^{2} term, we can try something like

(y+_)(zy)(zx)(y+\_)(z-y)(z-x) (4.24)

Why y-y and x-x rather than +y+y and +x+x? Because we do have some negative terms later, and we’d be stuck if everything is positive! We can continue along these lines, and to fit the x2zx^{2}z term we need

(yx)(zy)(zx)(y-x)(z-y)(z-x) (4.25)

By expanding the brackets, we can check that this means

yz(zy)+zx(xz)+xy(yx)=yz2+xy2+x2zy2zxz2x2y=(yx)(zy)(zx).yz(z-y)+zx(x-z)+xy(y-x)=yz^{2}+xy^{2}+x^{2}z-y^{2}z-xz^{2}-x^{2}y=(y-x)(z-y)(z% -x). (4.26)

4.3.3 Difference of two squares

Theorem 4.3.1

Let x,yx,y\in\mathbb{R}, in which case

(x+y)(x+(y))x2y2\Big{(}x+y\Big{)}\Big{(}x+(-y)\Big{)}\equiv x^{2}-y^{2} (4.27)

I have also seen this referred to as the \saythird binomial law, but I believe this terminology is non-standard in English-speaking countries.

Proof: we use the standard method for proving identities (see Section 6.2).

(x+y)(x+(y))\displaystyle\Big{(}x+y\Big{)}\Big{(}x+(-y)\Big{)} =(x+y)×(x)+(x+y)×(y)\displaystyle=(x+y)\times(x)+(x+y)\times(-y) (4.28)
=x×x+y×x+(y×x)(y×y)\displaystyle=x\times x+y\times x+-(y\times x)-(y\times y) (4.29)
=x2y2\displaystyle=x^{2}-y^{2} (4.30)

This shows up often, and if you don’t spot it (as I have done a few times) it often makes life very painful.

4.3.4 Comparing coefficients

Would you like to know why this section went here? (I’m sure you wouldn’t, but I shall provide some context anyway). It goes here because it is useful for solving lots of problems that will occur later.

Example 4.3.4

Let us suppose that we have these two polynomials

f(x)=ax3+bx2+cx+d,\displaystyle f(x)=ax^{3}+bx^{2}+cx+d, (4.31)
p(x)=4x3+3x2+2x+8.\displaystyle p(x)=4x^{3}+3x^{2}+2x+8. (4.32)

And we know that f(x)=p(x)f(x)=p(x). How would you find a,b,ca,b,c and dd?

This is not the hardest problem in the metaphorical book (far from it), but it’s also not a bad place to start. Intuitively we know that a=4,b=3,c=2a=4,b=3,c=2 and d=8d=8.

The general principle here is that two polynomial functions are equal if and only if their coefficients are equal22 2 This seems obvious, but sometimes when we consider structures other than the real numbers two polynomials can be equal, but their functions different. This is very confusing because when we are initially taught polynomials we are told that they are functions, but really it is better to think of a polynomial of a list of coefficients, which can be interpreted as a function.. In non-mathematics speak, this means that we look at the values in front of the numbers and check if they are the same.

TODO: some examples

4.3.5 Completing the square

One core idea is that we can write any quadratic in the form

y=a(x+b)2+cy=a(x+b)^{2}+c (4.33)

This is very important, because it allows us to find xx given a value for yy, e.g. if y=0y=0, then

a(x+b)2+c=0\displaystyle a(x+b)^{2}+c=0 (4.34)
(x+b2)2=ca\displaystyle(x+b^{2})^{2}=-\frac{c}{a} (4.35)
x+b2=ca\displaystyle x+b^{2}=\sqrt{-\frac{c}{a}} (4.36)
x=b2+ca\displaystyle x=-b^{2}+\sqrt{-\frac{c}{a}} (4.37)

How do we write a quadratic in this form? There are a lot of ways to do this, and this is not the simplest approach, but I found it was the one which best allowed me to understand the general idea and this method can be applied to other problems. We start by working backwards - i.e. we will expand a(x+b)2+ca(x+b)^{2}+c, which allows us to deduce that

y=ax2+2abx+ab2+cy=ax^{2}+2abx+ab^{2}+c (4.38)

From here, we can \saycompare coefficients (see Section 4.3.4).

Example 4.3.5

Write this quadratic in completed-square form.

y=3x2+36x+42.y=3x^{2}+36x+42. (4.39)

We start by comparing the coefficients of this quadratic with those of the polynomial in Equation 4.38. From this we can deduce that

{a=32ab=36ab2+c=42\displaystyle\begin{cases}a=3\\ 2ab=36\\ ab^{2}+c=42\end{cases} (4.40)

We can solve this by first substituting a=3a=3 in the second equation, i.e. we have that

23b=362\cdot 3\cdot b=36 (4.41)

From which we have that b=366=6b=\frac{36}{6}=6. We can then substitute the value b=64b=64 into b2+c=42b^{2}+c=42, which gives that

336+c=423\cdot 36+c=42 (4.42)

And thus that c=42108=66c=42-108=-66. Therefore,

3x2+36x+42=3(x+3)2663x^{2}+36x+42=3(x+3)^{2}-66 (4.43)
Example 4.3.6

Solve the equation

3x2+36x+42=0.3x^{2}+36x+42=0. (4.44)

We use the completed-square form of the quadratic (which we found in the previous example). This means that the values of xx we are interested in are those which satisfy

3(x+3)266=0.3(x+3)^{2}-66=0. (4.45)

We then add 6666 to both sides, which gets us the equivalent result

3(x+3)2=66.3(x+3)^{2}=66. (4.46)

Then we divide by 33, which gives

(x+3)2\displaystyle(x+3)^{2} =663\displaystyle=\frac{66}{3} (4.47)
=22\displaystyle=22 (4.48)

Therefore,

x+3\displaystyle x+3 =±22.\displaystyle=\pm\sqrt{22}. (4.49)
Common mistake 4.3.1

Don’t forget the ±\pm! The expression x\sqrt{x} refers only to the positive square root of xx! However, the negative one solves the equation just as well.

Thus the values of xx which solve the equation are

x=3±22x=-3\pm\sqrt{22} (4.50)

4.3.6 The quadratic formula

The quadratic formula 33 3 This is the result of completing the square for ax2+bx+cax^{2}+bx+c and using it solve the equation ax2+bx+c=0ax^{2}+bx+c=0 for xx states that for a quadratic ax2+bx+c=0ax^{2}+bx+c=0,

x=b±b24ac2ax=\frac{-b\pm\sqrt{b^{2}-4ac}}{2a} (4.51)

The b24acb^{2}-4ac gives quite a bit of information away. It’s called the "discriminant", and sometimes written as Δ\Delta.

If b24ac>0b^{2}-4ac>0 then we have exactly two solutions to the quadratic.

If b24ac=0b^{2}-4ac=0 (which also means that b24ac=0\sqrt{b^{2}-4ac}=0), then there will only be one solution (because adding zero does nothing 44 4 This is often handy for algebraic manipulation. - see the equation directly below for details).

b±b24ac2a=b2a if b24ac=0\frac{-b\pm\sqrt{b^{2}-4ac}}{2a}=\frac{-b}{2a}\text{ if $b^{2}-4ac=0$}

If b24ac<0b^{2}-4ac<0 then there are no real solutions to the quadratic.