{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# n7 - CS 70 Spring 2012 Polynomials Discrete Mathematics and...

This preview shows pages 1–3. Sign up to view the full content.

CS 70 Discrete Mathematics and Probability Theory Spring 2012 Alistair Sinclair Note 7 Polynomials Recall from your high school math that a polynomial in a single variable is of the form p ( x ) = a d x d + a d - 1 x d - 1 + ... + a 0 . Here the variable x and the coefficients a i are usually real numbers. For example, p ( x ) = 5 x 3 + 2 x + 1, is a polynomial of degree d = 3. Its coefficients are a 3 = 5, a 2 = 0, a 1 = 2, and a 0 = 1. Polynomials have some remarkably simple, elegant and powerful properties, which we will explore in this note. First, a definition: we say that a is a root of the polynomial p ( x ) if p ( a ) = 0. For example, the degree 2 polynomial p ( x ) = x 2 - 4 has two roots, namely 2 and - 2, since p ( 2 ) = p ( - 2 ) = 0. If we plot the polynomial p ( x ) in the x - y plane, then the roots of the polynomial are just the places where the curve crosses the x axis: We now state two fundamental properties of polynomials that we will prove in due course. Property 1: A non-zero polynomial of degree d has at most d roots. Property 2: Given d + 1 pairs ( x 1 , y 1 ) ,..., ( x d + 1 , y d + 1 ) , with all the x i distinct, there is a unique polynomial p ( x ) of degree (at most) d such that p ( x i ) = y i for 1 i d + 1. Let us consider what these two properties say in the case that d = 1. A graph of a linear (degree 1) polynomial y = a 1 x + a 0 is a line. Property 1 says that if a line is not the x -axis (i.e. if the polynomial is not y = 0), then it can intersect the x -axis in at most one point. CS 70, Spring 2012, Note 7 1

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Property 2 says that two points uniquely determine a line. Polynomial Interpolation Property 2 says that two points uniquely determine a degree 1 polynomial (a line), three points uniquely determine a degree 2 polynomial, four points uniquely determine a degree 3 polynomial, and so on. Given d + 1 pairs ( x 1 , y 1 ) ,..., ( x d + 1 , y d + 1 ) , how do we determine the polynomial p ( x ) = a d x d + ... + a 1 x + a 0 such that p ( x i ) = y i for i = 1 to d + 1? We will give two different efficient algorithms for reconstructing the coefficients a 0 ,..., a d , and therefore the polynomial p ( x ) . In the first method, we write a system of d + 1 linear equations in d + 1 variables: the coefficients of the polynomial a 0 ,..., a d . The i - th equation is: a d x d i + a d - 1 x d - 1 i + ... + a 0 = y i . Since x i and y i are constants, this is a linear equation in the d + 1 unknowns a 0 ,..., a d . Now solving these equations gives the coefficients of the polynomial p ( x ) . For example, given the 3 pairs ( - 1 , 2 ) , ( 0 , 1 ) , and ( 2 , 5 ) , we will construct the degree 2 polynomial p ( x ) which goes through these points. The first equation says a 2 ( - 1 ) 2 + a 1 ( - 1 )+ a 0 = 2. Simplifying, we get a 2 - a 1 + a 0 = 2. Applying the same technique to the second and third equations, we get the following system of equations: a 2 - a 1 + a 0 = 2 a 0 = 1 4 a 2 + 2 a 1 + a 0 = 5 Substituting for a 0 and multiplying the first equation by 2 we get: 2 a 2 - 2 a 1 = 2 4 a 2 + 2 a 1 = 4 Then, adding down we find that 6 a 2 = 6, so a 2 = 1, and plugging back in we find that a 1 = 0. Thus, we have determined the polynomial p ( x ) = x 2 + 1. To justify this method more carefully, we must show that the equations always have a solution and that it is unique. This involves showing that a certain determinant is non-zero. We will leave that as an exercise, and turn to the second method.
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern