# Find function which contains two points

A certain function contains points $(-3,5)$ and $(5,2)$. We are asked to find this function,of course this will be simplest if we consider slope form equation

$$y-y_1=m(x-x_1)$$

but could we find for general form of equation? for example quadratic? cubic?

-
18 minutes.  – Did Nov 13 '11 at 9:28
Note that a function $f$ does not contain any point $(a,b)$. Rather, $f(a)=b$, or equivalently, $(a,b)$ belongs to the graph of $f$. – Did Nov 13 '11 at 9:30

If you want a quadratic equation $y= ax^2 + bx + c$, then you need at least three points to completely determine the quadratic; plugging in just two points gives you two equations in three unknowns: \begin{align*} 5 &= a(-3)^2 + b(-3) + c\\ 2 &= a(5)^2 + b(2) + c. \end{align*} This gives you the equations \begin{align*} 9a -3 b + c &= 5\\ 25a + 2b + c &= 2. \end{align*} There are infinitely many solutions to these equations. Similarly, with a cubic, you need 4 points to completely determine it; with just two, you get two equations in four unknowns, after setting it up as $y=ax^3 + bx^2 + cx+ d$.

When you have $n$ different points, then the method of Lagrange interpolation will produce a polynomial of degree $n-1$ whose graph goes through the given points.

-

You could do this, but there would be many solutions. For a quadratic, you start with the general form

$$y=ax^2+bx+c.$$

Then substitute the $x$, $y$ values given by the points.

\eqalign{ 5&=9a-3b+c \cr 2&= 25a+5b +c\cr }

Solve this for $a,b$, and $c$ (There will be infintley many solutions. To get the solution, give $c$ a value, then solve for $a$ and $b$)

-