## 4.3.1 Introduction

A quadratic is an equation in the form

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

$y=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=1$, then $y=1$, when $x=4$ then $y=4\cdot 4=16$ and when $x=3.123$ then $y=3.123\cdot 3.123=9.753129$.

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

## 4.3.2 Factorising

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

$x\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\times(4+3)=2\times 7=14$ (4.11)

but it is also equal to

$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\times 31$, we could do this by applying the distributive property and noting that $31=30+1$, so therefore

 $\displaystyle 12\times 31$ $\displaystyle=12\times(30+1)$ (4.13) $\displaystyle=12\times 30+12\times 1$ Because of distributivity (4.14) $\displaystyle=12\times 30+12$ (4.15) $\displaystyle=360+12$ (4.16) $\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+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=x$ (confusing, I know), $b=1$ and $c=x$, from which we deduce that

 $\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(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)$ 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(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 $yz^{2}$ term, we can try

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

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

$(y+\_)(z-y)(z-x)$ (4.24)

Why $-y$ and $-x$ rather than $+y$ and $+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 $x^{2}z$ term we need

$(y-x)(z-y)(z-x)$ (4.25)

By expanding the brackets, we can check that this means

$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,y\in\mathbb{R}$, in which case

$\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).

 $\displaystyle\Big{(}x+y\Big{)}\Big{(}x+(-y)\Big{)}$ $\displaystyle=(x+y)\times(x)+(x+y)\times(-y)$ (4.28) $\displaystyle=x\times x+y\times x+-(y\times x)-(y\times y)$ (4.29) $\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

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

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

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=2$ and $d=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}+c$ (4.33)

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

 $\displaystyle a(x+b)^{2}+c=0$ (4.34) $\displaystyle(x+b^{2})^{2}=-\frac{c}{a}$ (4.35) $\displaystyle x+b^{2}=\sqrt{-\frac{c}{a}}$ (4.36) $\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}+c$, which allows us to deduce that

$y=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=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

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

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

$2\cdot 3\cdot b=36$ (4.41)

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

$3\cdot 36+c=42$ (4.42)

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

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

Solve the equation

$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 $x$ we are interested in are those which satisfy

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

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

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

Then we divide by $3$, which gives

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

Therefore,

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

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

Thus the values of $x$ which solve the equation are

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

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

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

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

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

If $b^{2}-4ac=0$ (which also means that $\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).

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

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