for a project I'm working on I need to make a equation that passes through 15 different points on a graph. To keep it simple if someone can show me how to do it with 4 ordered pairs I can probably figure out the rest. Thank you!!!
Asked
Active
Viewed 33 times
0
-
If ur more curious about the points I need the points starting at 1 threw 15 all whole real numbers as my X values, and the decimal ascii for "Hello, world!!!" As my F(x) values. I have the values for each letter already but just yea.... – Pie Pie Jan 24 '20 at 09:25
-
So correct me if I'm wrong, but you're looking for a function that has $$ f(1) = 72, \quad f(2) = 101, \quad f(3) = 108, \quad f(4) = 108, \ldots $$ ? Have you tried to find such a function, yourself? The most straightforward way is to use a polynomial ... – Matti P. Jan 24 '20 at 09:29
-
Here's an example: https://math.stackexchange.com/questions/947730/a-polynomial-that-passes-through-the-following-four-points – Matti P. Jan 24 '20 at 09:31
-
Our correct as to that's what I'm losing for but I need to generate a precise equation to do that, and I'm not gonna guess and check until I have the answer, I'm asking if anyone knows logical steps or some math formula that gives me my equation. Now for all I know there might be an event answer but not one that I have found. – Pie Pie Jan 24 '20 at 09:32
-
If you have $n$ points, in order to generate a polynomial that goes through those points, essentially you will need to solve a system of linear equations of $n$ variables. See the example link. – Matti P. Jan 24 '20 at 09:33
-
I think I understand, if I got the right idea it was very simple a I should go back to middle school. I'll work it out on paper. Thank you sm matti p. – Pie Pie Jan 24 '20 at 09:40
1 Answers
2
Suppose the points are $(x_i,y_i)$ for $i=1,\dots,15$. The simplest approach is to define $p_i(x)=(x-x_1)(x-x_2)\dots(x-x_{i-1})(x-x_{i+1})\dots(x-x_{15})$. Then $p(x_j)=0$ for $j\ne i$ and $p(x_i)\ne0$.
So now you just take $$P(x)=\sum_{i=1}^{15}\frac{y_i}{p_i(x_i)}p_i(x)$$
almagest
- 18,380