# Math Help - Numeric analysis and approximation

1. ## Numeric analysis and approximation

Hi, Im not sure wether this question is under right area.

I have a problem, in a field on numeric analysis. I'm trying to understand pragmatically interpolation and extrapolation and other techniques related to approximation.

Suppose my measure device has logged two data which are related each other, I call the data as x and y.

logged data:
x: {1,3,5,8,25,33}
y: {4,16,36,81,676,1156}

Ok, now I have to somehow approximate a function to calculate (approximate) values inside x-area and outside x-area.
For example, what is value of y when x = 4 and when x = 101.

How the interpolation and extrapolation works in this case and if there is a general function f(x). And how to get that function from measured points?

Could you math pros help me on this?

2. Originally Posted by tabularasa
Hi, Im not sure wether this question is under right area.

I have a problem, in a field on numeric analysis. I'm trying to understand pragmatically interpolation and extrapolation and other techniques related to approximation.

Suppose my measure device has logged two data which are related each other, I call the data as x and y.

logged data:
x: {1,3,5,8,25,33}
y: {4,16,36,81,676,1156}

Ok, now I have to somehow approximate a function to calculate (approximate) values inside x-area and outside x-area.
For example, what is value of y when x = 4 and when x = 101.

How the interpolation and extrapolation works in this case and if there is a general function f(x). And how to get that function from measured points?

Could you math pros help me on this?
The picture looks very much like a parabola $y = x^2 + b x + c$ (in the attached picture, I graphed $y = x^2$). Do you know the method of least squares?

3. Thanks for your answer but, yes I know the function, my question is actually how actually come to conclusion by math way. I'm looking for example for interpolating and extrapolating...revealing the function that makes those x and y values. Instead of using tools, using pure math to get the function, not drawing a graph and looking from it.

4. Originally Posted by tabularasa
Thanks for your answer but, yes I know the function, my question is actually how actually come to conclusion by math way. I'm looking for example for interpolating and extrapolating...revealing the function that makes those x and y values. Instead of using tools, using pure math to get the function, not drawing a graph and looking from it.
One thing you can do is consider

$(1)\;\;\;y = ax^2 + bx + c$

and pick three pairs of numbers near $x = 4$, say

$(1,4),\; (3,16),\; (5,36)$ and substitute them into (1). This gives three equations for $a, b \; \text{and} \;c$, i.e.

$a + b + c = 4,$
$9a + 3b + c = 16,$
$25a + 5b + c = 36,$

Solving gives $a = 1,\; b = 2,\; c = 1$

so

$y = x^2 + 2x + 1 = (x+1)^2$

Notice that all of the numbers fit perfectly. Then let $x = 4$.

5. Ah, nice! Linear polynominal approximation. Thanks. That's im looking for.