# Write an equation based on data

by musicgold
Tags: based, data, equation, write
 Math Emeritus Sci Advisor Thanks PF Gold P: 39,682 There are, of course, an infinite number of functions whose graphs go through those points. The unique fifth degree polynomial that fits is the Lagrange polynomial: $$-32\frac{(x+ 2)(x+ 1)(x)(x- 1)(x- 2)}{(-3+2)(-3+ 1)(-3)(-3- 1)(-3-2)}+ 16\frac{(x+ 3)(x+ 1)(x)(x- 1)(x- 2)}{(-2+3)(-2+ 1)(-2)(-2- 1)(-2-2)}+ 8\frac{(x+ 3)(x+ 2)(x)(x- 1)(x- 2)}{(-1+3)(-1+ 2)(-3)(-1-1)(-1-2)}+ 4\frac{(x+ 3)(x+ 2)(x+1)(x- 1)(x- 2)}{(0+3)(0+2)(-0+ 1)(0- 1)(0-2)}+ 2\frac{(x+3)(x+ 2)(x+ 1)(x)(x- 2)}{(1+ 3)(1+2)(1+ 1)(1)(1-2)}+ \frac{(x+ 3)(x+ 2)(x+ 1)(x)(x- 1)}{(1+ 3)(1+2)(-3+ 1)(-3)(-3-2)}$$