Two points in the plane determine a line, and therefore in coordinate geometry, the coordinates for two points determine the equation of a line. If we consider the case where the two points have different first coordinates, we can find a linear function the graph of which is the line determined by the two points. The method of Joseph Louis Lagrange, (1736-1813), called LaGrange interpolation resolves a comparable problem for determining a polynomial function of degree n the graph of which passes through n+1 points in the plane when no two of these points have the same first coordinate.
In this excursion we'll look at the simplest cases when n = 1 and 2 to get a sense of how this method works, and leave the more general examples for the exercises. With a small number of points, this method is sometimes used to find a polynomial of low degree for estimating other information about a less well-known function
Example 1. We'll find the linear function that has its graph pass through two given points as an example of Lagrange's method. [Of course there are many methods you have studied for solving this problem. We are interested here on a method that will generalize for more points and polynomial functions of higher degree.] For this example, suppose the line passes through (2,3) and (-3,5). See Figures 1 and 2.
For Lagrange's method we suppose the linear function has the form
f (X) = Y = R (X-2) + S (X+3).
Then using the coordinate information we replace the X and Y in the equation with X=2 and Y=3, giving us the equation 3= R(2-2) + S(2+3) or 3 = 5S, so S = 3/5. Similarly we can use X=-3, and Y=5, so 5 = -5R and thus R = -1. So the equation
f (X) =Y = -1(X-2) + 3/5 (X+3)
should work. You can check without much trouble that both the given
points lie on the line this function determines. Notice how using factors
of (X-2) and (X+3) in the form of the linear function made it easy to find
the values for R and S.
Example 2. We'll find the quadratic function describing a parabola that passes through three given points using Lagrange's method. For this example, suppose the parabola passes through (2,3), (-3,5), and (1,-7). See Figure 3. For Lagrange's method we suppose the quadratic function has the form
p(X) = Y = R (X-2)(X-1) + S (X+3)(X-1) + T (X-2)(X+3).
Using the coordinate information from the three given points we can determine R, S, and T. First we use X=2 andY=3 to see that 3 = 5S, so S = 3/5. Similarly using X = -3 and Y = 5 we have 5 = 20 R, so R = 1/4 and with X = 1 and Y = -7 we find that -7 = -4T, so T = 7/4. So the equation for the quadratic function is
p(X)=Y = 1/4 (X-2)(X-1) + 3/5 (X+3)(X-1) + 7/4(X-2)(X+3).
You can check this quadratic function does determine a parabola through the three given points. Notice how using factors of (X-2)(X-1), (X+3)(X-1), and (X-2)(X+3) in the form of the quadratic functions made it easy to find the values for R, S, and T.