Construction of polynomials

Let us now consider how to construct polynomials which must have given zeros (or xx-axis intercepts).

For example, consider the following graphs of polynomials. In the polynomial on the left, the xx-axis crosses every hills and every valley. In the polynomial on the right, this is not the case. The xx-axis crosses only the last valley.

For the left polynomial, the function equation can indeed be found quite easily. But we need to know all the zeros and another point AA. For the right polynomial, the function equation can also be found, but it is a little more complicated. We need the coordinates of 55 points that lie on the graph, and then we have to solve a system of equations with 55 equations.

We first discuss the simpler case on the left, then the more complicated case on the right. In general, we are interested in finding polynomials that are as simple as possible, i.e. polynomials with the smallest possible degree.

The xx-axis crosses all valleys and hills

In the example above (left), the xx-axis crosses all hills and valleys. From the graph we also see that the zeros or xx-intercepts are:

1,0,1,3-1, 0, 1, 3

It is quite easy to write down a function equation which has exactly these zeros: we simply multiply factors of the form

(xxintercept)(x-x_{intercept})

with each other. So in the example above:

f(x)=a(x(1))(x0)(x1)(x3)=a(x+1)x(x1)(x3)\begin{array}{lll} f(x)&=& a\cdot (x-(-1))\cdot (x-0)\cdot (x-1)\cdot (x-3)\\ &=& a(x+1) x (x-1) (x-3) \end{array}

We also multiply these function by some value aa (stretching of the graph in yy-direction), whose value we will determine later. Let us verify that the function ff has the correct xx-intercepts. Indeed:

f(1)=a(0)(1)(2)(4)=0f(0)=a(1)(0)(1)(3)=0f(1)=a(2)(1)(0)(2)=0f(3)=a(4)(3)(2)(0)=0\begin{array}{lll} f(-1) &=& a(0)(-1)(-2)(-4)=0\quad \checkmark\\ f(0)&=& a(-1)(0)(-1)(-3)=0\quad \checkmark\\ f(1)&=& a(2)(1)(0)(-2)=0\quad \checkmark\\ f(3)&=& a(4)(3)(2)(0)=0\quad \checkmark \end{array}

Let us also verify, that the function ff is a polynomial. This is done in the exercise below.

Exercise 1

Check that ff is a polynomial by multiplying it out. What is the degree?

Solution

It is a polynomial of degree 44 because 44 factors of the form (xxintercept)(x-x_{intercept}) are multiplied.

f(x)=a(x+1)x(x1)(x3)=ax(x3)(x+1)(x1)x21=ax(x3)(x21)x33x2x+3=ax(x33x2x+3)=ax43ax3ax2+3ax\begin {array}{lll} f(x) & = & a(x+1) x (x-1) (x-3)\\ &=& a x (x-3) \underbrace{(x+1) (x-1)}_{x^2-1} \\ &=& a x \underbrace{(x-3) (x^2-1)}_{x^3-3x^2-x+3} \\ &=& a x (x^3-3x^2-x+3)\\ &=& ax^4-3ax^3-ax^2+3ax\\ \end{array}

Now let us return to finding the correct value aa. The value of aa stretches the function in yy-direction. Every different value of aa defines a function with the xx-intercepts 1,0,1-1, 0, 1 and 33, but it should be clear that only one of these graphs will pass through the point A(23)A(2|-3).

To find aa, we use the fact that

f(2)=3f(2)=-3

because the graph of ff passes through the point A(23)A(2|-3). Replacing in

f(x)=a(x(1))(x0)(x1)(x3)f(x)=a\cdot (x-(-1))\cdot (x-0)\cdot (x-1)\cdot (x-3)

the xx by 22, we get

a(3)(2)(1)(1)=36a=3a=0.5a(3)(2)(1)(-1)=-3 \rightarrow -6a=-3 \rightarrow a=0.5

Thus, the function equation of ff is

f(x)=0.5(x+1)x(x1)(x3)f(x)=0.5(x+1)x(x-1)(x-3)

Let's summarise as a theorem:

Theorem 1

Let the graph of a polynomial ff be given such that the xx-axis crosses all hills and valleys. Furthermore, assume we know all the zeros or xx-intercepts of ff

x1,x2,...xnx_1, x_2, ... x_n

and also another point A(AxAy)A(A_x|A_y) on the graph. Then the function equation of ff is given by

f(x)=a(xx1)(xx2)....(xxn)f(x)=a(x-x_1)(x-x_2)....(x-x_n)

where aa must be chosen such that

f(Ax)=Ayf(A_x)=A_y

Furthermore, the polynomial has the degree nn.

Exercise 2

Determine the function equations of the polynomials ff and gg shown below.

Solution

function ff:

f(x)=a(x(2))(x2)(x3)(x4)f(x)=a(x-(-2))(x-2)(x-3)(x-4)

and because

f(1)=1.8a(3)(1)(2)(3)=18a=1.8f(1)=1.8 \rightarrow a(3)(-1)(-2)(-3)=-18a =1.8

we get a=0.1a=-0.1. Thus

f(x)=0.1(x+2)(x2)(x3)(x4)f(x)=\underline{-0.1(x+2)(x-2)(x-3)(x-4)}

function gg:

g(x)=a(x0.5)(x1.5)(x2)g(x)=a(x-0.5)(x-1.5)(x-2)

and because

g(0)=3a(0.5)(1.5)(2)=1.5a=3g(0)=-3 \rightarrow a(-0.5)(-1.5)(-2)=-1.5a =-3

follows a=2a=2. It is

g(x)=2(x0.5)(x1.5)(x2)g(x)=\underline{2(x-0.5)(x-1.5)(x-2)}

There is one special case to consider. What if the xx-axis does not cross a hill or a valley, but only touches the top of the hill or the bottom of the valley? Then it becomes more difficult. In the simplest case, we can imagine that the point of contact simply consists of two zeros which are almost on top of each other (see below, right):

Each xx-intercept xbx_b then gives rise to two factors

(xxb)(xxb)=(xxb)2(x-x_b)(x-x_b)=(x-x_b)^2

For example, if a polynomial has the zeros 1,2,3,4-1,2,3,4, where 22 is a touch point, we get the function equation

f(x)=a(x+1)(x2)2(x3)(x4)f(x)=a(x+1)(x-2)^2 (x-3)(x-4)

If 44 is also a touch point, then the function equation results

f(x)=a(x+1)(x2)2(x3)(x4)2f(x)=a(x+1)(x-2)^2 (x-3)(x-4)^2
Exercise 3

Determine the function equation of the polynomials ff and gg shown below.

Solution

function ff: Since the graph has a touch point at xb=2x_b=2, the following holds:

f(x)=a(x(1))(x2)2f(x)=a(x-(-1))(x-2)^2

and because of

f(3)=2a(4)(1)2=4a=2f(3)=-2 \rightarrow a(4)(1)^2=4a=-2

it follows that a=0.5a=-0.5. It is therefore

f(x)=0.5(x+1)(x2)2f(x)=\underline{-0.5(x+1)(x-2)^2}

function gg: Since the graph has touch points at xb=1x_b=-1 and xb=1x_b=1, the following holds.

g(x)=a(x(1))2(x1)2=a(x+1)2(x1)2g(x)=a(x-(-1))^2(x-1)^2=a(x+1)^2(x-1)^2

and because of

g(0)=2a(1)(1)2=a=2g(0)=2 \rightarrow a(1)(-1)^2=a=2

it follows

g(x)=2(x+1)2(x1)2g(x)=\underline{2(x+1)^2(x-1)^2}

The xx-axis does not cross all valleys and hills

If the xx-axis does not cross all valleys or hills, of even if it does but we do not know all the xx-intercepts, then we cannot use the method described above for finding the function equation. We have to use another method, we assume that we know enough points through which the graph passes. This method also works in the situation where we could apply the first method. So it is more general, but also more time intensive.

Given mm different points A1A_1,..., AmA_m, we want to find a minimal polynomial that should go through these points (see figure below):

Given we know these points, how can we find the coefficients of the polynomial? This is illustrated in the examples below.

Example 1

Find a polynomial of minimum degree that passes through the following points: A(320),B(10),C(0.54.5)A(-3\vert 20), B(-1\vert 0), C(0.5\vert -4.5).

Solution

Three points are given, so we can use a polynomial of degree 22:

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

Since all points lie on the graph of ff, it must hold:

f(3)=209a3b+c=20(I)f(1)=0ab+c=0(II)f(0.5)=4.50.25a+0.5b+c=4.5(III)\begin{array}{lllc} f(-3) = 20 &\rightarrow& 9a-3b+c=20 & \text{(I)}\\ f(-1) = 0 &\rightarrow& a-b+c=0 & \text{(II)}\\ f(0.5) = -4.5 &\rightarrow& 0.25a+0.5 b+c=-4.5 & \text{(III)}\\ \end{array}

So we have to solve a system of three linear equations each of which as three three unknowns. We know how to do this. From the middle equation (II) it follows

a=bca=b-c

and if we replace aa with bcb-c in the other two equations (I, III), we get two equations with two unknowns:

9(bc)3b+c=206b8c=20(i)0.25(bc)+0.5b+c=4.50.75b+0.75c=4.5(ii)\begin{array}{lllc} 9(b-c)-3b+c=20 &\rightarrow& 6b-8c=20 & (i)\\ 0.25(b-c)+0.5b+c=-4.5 &\rightarrow& 0.75b+0.75c=-4.5 & (ii) \end{array}

From the lower equation (ii)(ii) follows

0.75b=4.50.75c0.75b=-4.5-0.75c

and dividing both sides by 0.750.75 we get

b=6cb=-6-c

Substituting this into the upper equation (i)(i) we get

6(6c)8c=2014c=56c=46(-6-c)-8c=20 \rightarrow -14c=56 \rightarrow c=-4

We can now calculate the value of bb using (i)(i):

6b+84=20b=26b+8\cdot 4=20 \rightarrow b=-2

And with

a=bc=2(4)=2a=b-c=-2-(-4)=2

it follows that

f(x)=2x22x4f(x)=\underline{2x^2-2x-4}
Exercise 4

Find a polynomial of minimum degree that passes through the following points: A(26),B(10),C(00),D(26)A(-2\vert -6), B(-1\vert 0), C(0\vert 0), D(2\vert 6).

Solution

We need a polynomial of degree 33, so

f(x)=ax3+bx2+cx+df(x)=ax^3+bx^2+cx+d

So we have to solve the following system of equations:

f(2)=68a+4b2c+d=6f(1)=0a+bc+d=0f(0)=0d=0f(2)=68a+4b+2c+d=6\begin{array}{lllc} f(-2) = -6 &\rightarrow& -8a+4b-2c+d = -6 &\\ f(-1) = 0 &\rightarrow& -a+b-c+d = 0 & \\ f(0) = 0 &\rightarrow& d=0 & \\ f(2) = 6 &\rightarrow& 8a+4b+2c+d = 6 & \\ \end{array}

If we substitute d=0d=0 in all equations, we get the three equations:

f(2)=68a+4b2c=6(I)f(1)=0a+bc=0(II)f(2)=68a+4b+2c=6(III)\begin{array}{lllc} f(-2) = -6 &\rightarrow& -8a+4b-2c = -6 & \text{(I)}\\ f(-1) = 0 &\rightarrow& -a+b-c = 0 & \text{(II)}\\ f(2) = 6 &\rightarrow& 8a+4b+2c = 6 & \text{(III)}\\ \end{array}

From (II) follows

b=a+cb=a+c

and substituting this into (I, III) we get the two equations

8a+4(a+c)2c=64a+2c=6(i)8a+4(a+c)+2c=612a+6c=6(ii)\begin{array}{lllc} -8a+4(a+c)-2c = -6 &\rightarrow& -4a+2c=-6 & (i)\\ 8a+4(a+c)+2c = 6 &\rightarrow& 12a+6c = 6 & (ii) \end{array}

From (ii) follows

6c=612a6c=6-12a

and if we divide both sides by 66, we get

c=12ac=1-2a

Substituting in (i) we have

4a+2(12a)=68a=8a=1-4a+2(1-2a)=-6\rightarrow -8a=-8\rightarrow a=1

and with

c=12a=12=1c=1-2a=1-2=-1

and

b=a+c=1+(1)=0b=a+c=1+(-1)=0

we get

f(x)=x3xf(x)=\underline{x^3-x}