Quantcast Function from points Text - Physics Forums Library

PDA

View Full Version : Function from points


Juan Pablo
Sep30-08, 07:06 PM
Just out of curiosity, is it possible to get a function from, say 5 points? If so how?
I don't want a full explanation just someone to point me to the right direction.

Thanks!

Borek
Sep30-08, 07:40 PM
You can put a straight line through every 5 points, it just have to be thick enough.

Question is so vague that it is impossible to answer. Are points known exactly, or are their values only approximate? Are you allowed to use any function, or only functions from some set (like polynomials)?

Juan Pablo
Sep30-08, 07:49 PM
The points are exact, I can use any function

HallsofIvy
Sep30-08, 07:52 PM
Given any finite number of points, there exist an infinite number of functions whose graph passes thorough them. (As long as all points have different x values, of course.) Given n+1 points, there exist a unique polynomial of degree n whose graph passes through them. You could for example write the polynomial as
y= a_nx^n+ a_{n-1}x^{n-2}+ \cdot\cdot\cdot+ a_2x^2+ a_1x+ a_0
Replacing x and y with the n+ 1 x and y values from the n+ 1 points gives you n+1 equations for the n+1 coefficients an, ..., a1, a0.