MATHEMATICS EXTENSION 2 4 UNIT MATHEMATICS TOPIC 7: POLYNOMIALS 7.1 INTRODUCTION TO FUNCTIONS and POLYNOMIALS A polynomial is a function of the form y f ( x ) a0 a1 x a2 x 2 n an x ai x i n i 0 The degree of the polynomial is n (n integer n 0,1,2, ). Such a function is defined for all values of x and x is finite. A polynomial is a single valued, continuous and differentiable function of x. A linear function (n = 1) is a polynomial of degree 1. A polynomial of degree 2 (n = 2) is called a quadratic function y a0 a1 x a2 x 2 The quadratic function is mostly expressed as y a x2 b x c POLYNOMIALS ONLINE: 4 UNIT MATHS 1 The graph of a quadratic function is a parabola. If there are real values of x for which y = 0, the parabola will intersect the X-axis at real roots b b 2 4a c x 2a b 2 4a c 0 Polynomial functions are called single-valued functions because there is only one value of y for each value of x. The function y 2 x is a multi-valued function since there are two values of y for each value of x: x1 and x1 Functions can depend upon a number of variables. For example, the pressure p of a gas in a container depends upon the volume V of the container and the temperature T of the gas. p n RT V variabels p, T ,V constants n, R This is an example of an explicit function, since the equation can be rearranged to make the variables V or T the subject of the equation p n RT V V n RT p T pV nR explicit function This is not the case for the equation below in regard to the variable V. This is an example of an implicit function n2 a p 2 V n b n RT V POLYNOMIALS implicit function ONLINE: 4 UNIT MATHS 2 A useful classification of functions is into even and odd functions. An even function of x is one that remains unchanged when the sign of x is reversed f ( x) f ( x) even function whereas an odd function changes sign f ( x) f ( x) odd function Online activity: Graphing Polynomials Long Division of polynomials Let P( x) , A( x) , Q( x) and R( x) be polynomial functions in x. Then we can divide the P( x) by A( x) such that P( x ) A( x ) Q( x ) R( x ) where A( x) is the divisor Q( x) is the quotient R( x) is the remainder The degree of R( x) must be less than that of A( x) . The functions Q( x) and R( x) are unique when this condition is satisfied. POLYNOMIALS ONLINE: 4 UNIT MATHS 3 Example P( x ) 6 x 3 7 x 2 4 x 3 A( x ) 3x 1 find Q( x) and R( x) . Solution Make a table as shown below to do the long division to find Q( x) and R( x) (1) (2) (3) (4) (5) (6) (7) A(x) 3x+1 Q(x) 2x2 P(x) (1)-(2) 3x+1 -3x (3)-(4) 3x+1 7/3 (5)-(6) --> R(x) x3 6x3 6x3 x2 -7x2 2x2 x1 4x 0 x0 -3 0 0 0 0 0 0 -9x2 -9x2 0 0 0 4x -3x 7x 7x 0 -3 0 -3 7/3 -16/3 Q( x) 2 x 2 3x 7 / 3 R( x) 16/ 3 POLYNOMIALS ONLINE: 4 UNIT MATHS 4 Example P( x ) 6 x 3 7 x 2 4 x 3 A( x ) 3x 1 find Q( x) and R( x) . Solution Make a table as shown below to do the long division to find Q( x) and R( x) \ (1) (2) (3) (4) (5) A(x) x2-x+1 P(x) (1)-(2) x2-x+1 -7 (3)-(4) --> R(x) Q( x ) 2 x 7 POLYNOMIALS Q(x) 2x x3 2x3 2x3 x2 -9x2 -2x2 x1 0 2x x0 15 0 0 0 0 -7x2 -7x2 0 -2x 7x -9x 15 -7 22 R( x ) 9 x 22 ONLINE: 4 UNIT MATHS 5 Roots of polynomials Consider the polynomial equation of degree n y f ( x ) P( x ) a0 a1 x a2 x 2 n an x ai x i 0 n i 0 then real numbers x which satisfy this equation are called the real roots of the equation. For large values of x then y f ( x ) an x n A polynomial where n is odd (odd degree) always has at least one real root At least one maximum or minimum value of the polynomial f ( x) occurs between any two distinct real roots. y f ( x ) P( x ) a0 a1 x a2 x 2 n an x ai x i 0 n i 0 This equation can be expressed as P( x ) an x 1 x 2 n x n 1 x n an x i 0 i 1 The polynomial of degree n has n roots. Some of the roots maybe real and others may be imagery, also there may be multiple roots (eg 2 3 6 ) . POLYNOMIALS ONLINE: 4 UNIT MATHS 6 If i tis a real, then the term x i is a factor of P( x) Quadratic Equation Consider the quadratic equation P( x ) a x 2 b x c 0 Since the degree of the quadratic is n = 2, there are two roots which we designate as and . Hence we can express the polynomial as P( x ) a x x 0 We can find the relationships between the coefficients a, b and c and the two roots and . b c x2 x 0 a a x 2 x 0 POLYNOMIALS b a c a ONLINE: 4 UNIT MATHS 7 Cubic Equation Consider the cubic equation P( x ) a x 3 b x 2 c x d 0 Since the degree of the cubic is n = 3, there are three roots which we designate as , and . Hence we can express the polynomial as P( x ) a x x x 0 We can find the relationships between the coefficients a, b, c and d and the three roots , and . b c d x3 x2 x 0 a a a x 3 x 2 x 0 POLYNOMIALS b a c d a a ONLINE: 4 UNIT MATHS 8 Quartic Equation Consider the quartic equation P( x ) a x 4 b x 3 c x 2 dx e 0 Since the degree of the cubic is n = 4, there are four roots which we designate as , and Hence we can express the polynomial as . P( x ) a x x x x 0 We can find the relationships between the coefficients a, b, c and d and the three roots , and . b c d e x3 x2 x 0 a a a a x 4 x 3 x 2 x4 x 0 b a POLYNOMIALS d a ONLINE: 4 UNIT MATHS c a e a 9 Finding the real roots of a polynomial Halving the interval Suppose we have two values x1 and x2 such that P ( x1 ) P ( x2 ) 0 and since P( x) is a continuous function, there is a root of P( x) in the interval x1 x x2 . Now calculate the value of x3 the midpoint in the interval x1 to x2. x3 12 x1 x2 If P ( x3 ) 0 then x3 is the desired root. If P ( x3 ) P ( x2 ) 0 then replace x1 by x3 If P( x3 ) P( x1 ) 0 then replace x2 by x3 and repeat the process until you get a reasonable of the value for the root. This process is very tedious because you have to calculate P( x) many times. It is best to use a spreadsheet and not a calculator. The example below shows how to use a spreadsheet. POLYNOMIALS ONLINE: 4 UNIT MATHS 10 Example Find the roots of the equation P( x ) x 3 2 x 2 x 2 0 Enter values for x1 and x2 only x1 p(x1) start values 0.0000 2.0000 x3 --> x1 0.6500 0.7796 x3 --> x1 0.9750 0.0506 x3 --> x2 0.9750 0.0506 x3 --> x2 0.9750 0.0506 x3 --> x2 0.9750 0.0506 x3 --> x1 0.9953 0.0094 x3 --> x2 0.9953 0.0094 x3 --> x2 0.9953 0.0094 x3 --> x1 0.9979 0.0043 x3 --> x1 0.9991 0.0018 x2 1.3000 1.3000 1.3000 1.1375 1.0563 1.0156 1.0156 1.0055 1.0004 1.0004 1.0004 p(x2) -0.4830 -0.4830 -0.4830 -0.2535 -0.1092 -0.0310 -0.0310 -0.0109 -0.0008 -0.0008 -0.0008 p(x1)*p(x2) < 1 -0.9660 -0.3766 -0.0244 -0.0128 -0.0055 -0.0016 -0.0003 -0.0001 0.0000 0.0000 0.0000 x3 0.6500 0.9750 1.1375 1.0563 1.0156 0.9953 1.0055 1.0004 0.9979 0.9991 0.9998 x2 2.4000 2.0500 2.0500 2.0500 2.0063 2.0063 2.0063 2.0008 p(x2) 1.9040 0.1601 0.1601 0.1601 0.0189 0.0189 0.0189 0.0023 p(x1)*p(x2) < 1 -1.0796 -0.0908 -0.0504 -0.0171 -0.0020 -0.0009 -0.0003 0.0000 x3 2.0500 1.8750 1.9625 2.0063 1.9844 1.9953 2.0008 1.9980 First root is x = +1. Enter values for x1 and x2 only x1 p(x1) start values 1.7000 -0.5670 x3 --> x2 1.7000 -0.5670 x3 --> x1 1.8750 -0.3145 x3 --> x1 1.9625 -0.1069 x3 --> x2 1.9625 -0.1069 x3 --> x1 1.9844 -0.0459 x3 --> x1 1.9953 -0.0140 x3 --> x2 1.9953 -0.0140 Second root is x = 2 POLYNOMIALS ONLINE: 4 UNIT MATHS 11 Enter values for x1 and x2 only x1 p(x1) start values -2.0000 -12.0000 x3 --> x1 -1.2500 -1.8281 x3 --> x2 -1.2500 -1.8281 x3 --> x1 -1.0625 -1.0625 x3 --> x2 -1.0625 -0.3948 x3 --> x1 -1.0156 -0.0950 x3 --> x2 -1.0156 -0.0950 x3 --> x1 -1.0039 -0.0235 x3 --> x2 -1.0039 -0.0235 x3 --> x1 -1.0010 -0.0059 x3 --> x2 -1.0010 -0.0059 x2 -0.5000 -0.5000 -0.8750 -0.8750 -0.9688 -0.9688 -0.9922 -0.9922 -0.9980 -0.9980 -0.9995 p(x2) 1.8750 1.8750 0.6738 0.6738 0.1826 0.1826 0.0466 0.0466 0.0117 0.0117 0.0029 p(x1)*p(x2) < 1 -22.5000 -3.4277 -1.2318 -0.7159 -0.0721 -0.0173 -0.0044 -0.0011 -0.0003 -0.0001 0.0000 x3 -1.2500 -0.8750 -1.0625 -0.9688 -1.0156 -0.9922 -1.0039 -0.9980 -1.0010 -0.9995 -1.0002 Third root is x = -1 The three roots are (-1, 1, 2) POLYNOMIALS ONLINE: 4 UNIT MATHS 12 Go to the online active: POLYNOMIALS http://www.physics.usyd.edu.au/teach_res/hsp/sim/sim_poly.htm ONLINE: 4 UNIT MATHS 13 Newton’s Method Suppose that xn is close to a root of f ( x) 0 . We can make an improved estimate of the root f ( x) 0 by Newton’s Method which involves f ( x) and f '( x ) as shown in the figure The tangent to the curve intersects the X-axis at xn 1 at a point which should be closer to the root than xn . The gradient f '( xn ) of the tangent to the curve is approximated by f '( xn ) 0 f ( xn ) xn 1 x0 Rearranging this equation, we can the new estimate xn 1 xn 1 xn f ( xn ) f '( xn ) This method may fail if the function has a point of inflection, or other bad behaviour near the root of the function. POLYNOMIALS ONLINE: 4 UNIT MATHS 14 Example Find the roots of the equation by Newton’s Method P( x ) x 3 2 x 2 x 2 0 Solution This method is much easier to estimate the roots than the half-interval method. Again, it is a simple matter to perform the repeated calculations in a spreadsheet. Starting value x = -2 Root x = -1 Starting value x = 0.5 Root x = 1 Starting value x = 3 Root x = 2 POLYNOMIALS Newton's Method n xn f(xn) f'(xn) xn+1 1 -2.0000 -12.0000 19 -1.36842 2 -1.36842 -2.9392 10.09141 -1.07716 3 -1.07716 -0.4932 6.789494 -1.00452 4 -1.00452 -0.0272 6.045263 -1.00002 5 -1.00002 -0.0001 6.000169 -1 6 -1 0.0000 6 -1 Newton's Method n xn 1 0.5000 2 1 3 1 4 1 5 1 6 1 f(xn) 1.1250 0.0000 0.0000 0.0000 0.0000 0.0000 Newton's Method n xn 1 3.0000 2 2.428571 3 2.12782 4 2.017076 5 2.000375 6 2 f(xn) f'(xn) xn+1 8.0000 14 2.428571 2.0991 6.979592 2.12782 0.4509 4.07157 2.017076 0.0524 3.137486 2.000375 0.0011 3.003 2 0.0000 3.000001 2 ONLINE: 4 UNIT MATHS f'(xn) -2.25 -2 -2 -2 -2 -2 xn+1 1 1 1 1 1 1 15