Functions – How to Get Polynomial Function from 3 Points

binomial-coefficientsfunctionspolynomials

I need to understand how to define a polynomial function from 3 given points. Everything I found on the web so far is either too complicated or the reversed way around. (how to get points with a given function) It's over 12 years since I last used this at school, so please try to explain how to solve this.

I know that the funcion is like ax²+bx+c, that its centered on the x=0, and that its lowest point is at x=0/y=5000.

and i know 3 given points: x=0 y=5000 x=1 y=5026.5 x=3 y=5208.9

Knowing this data, how can I get the coefficients that generate the curve? Please try to keep it simple.

Best Answer

Let us suppose that you have this general problem when you need the quadratic function which goes through three points $[x_i,y_i]$ and let, as written by dinosaur, $$y=f(x)=ax^2+bx+c$$ So, the three equations are $$y_1 = a {x_1}^2+b {x_1}+c$$ $$y_2 = a {x_2}^2+b {x_2}+c$$ $$y_3 = a {x_3}^2+b {x_3}+c$$ Subtracting the first to the second and the second from the third already eliminates $c$ and your are left with two linear equations for two unknowns. You could even eliminate from the first difference $b$ and plug it in the second difference and solve a linear equation in $a$. When $a$ is obtained, go backwards for getting $b$ and then $c$.

If you do the above, you will end with $$a=\frac{{x_1} ({y_3}-{y_2})+{x_2} ({y_1}-{y_3})+{x_3} ({y_2}-{y_1})}{({x_1}-{x_2}) ({x_1}-{x_3}) ({x_2}-{x_3})}$$ $$b=\frac{y_2-y_1}{x_2-x_1}-a (x_1+x_2)$$ $$c = y_1-a {x_1}^2-b {x_1}$$ Simple, isn't ?

Related Question