Question #24760

Hi! I have got 35 coordinates (x;y) which seem to form a function of the second degree. I want to know the basic expression for this function, even if I just have the coordinates. These are:
1,3 3,15 4,26 5,37 6,50 7,67 8,74 9,85 10,102 11,125 12,138 13,155 14,174 15,197 16,228 17,257 18,280 19,309 20,352 21,383 22,420 23,463 24,522 25,563 26,610 27,653 28,700 29,761 30,832 31,911 32,970 33,1037 34,1098 35,1181

Thanks in advance!
Gunnar A.

Expert's answer

Conditions

I have got 35 coordinates (x;y)(x;y) which seem to form a function of the second degree. I want to know the basic expression for this function, even if I just have the coordinates. These are:

1,3 3,15 4,26 5,37 6,50 7,67 8,74 9,85 10,102 11,125 12,138 13,155

14,174 15,197 16,228 17,257 18,280 19,309 20,352 21,383 22,420 23,463

24,522 25,563 26,610 27,653 28,700 29,761 30,832 31,911 32,970 33,1037

34,1098 35,1181

Solution

We have to use one of polynomial interpolation methods.

Let's find our function in the following form:


y~=A0+A1x+A2x2.\widetilde{\boldsymbol{y}} = A_0 + A_1 \boldsymbol{x} + A_2 \boldsymbol{x}^2.


Construct a difference:


Sm=i=1n[y(xi)yi]2=i=1n[(A0+A1xi+A2xi2)yi]2S_m = \sum_{i=1}^{n} \left[ y(x_i) - y_i \right]^2 = \sum_{i=1}^{n} \left[ \left( A_0 + A_1 x_i + A_2 x_i^2 \right) - y_i \right]^2


Take the derivatives:


SmA0=2i=1n[(A0+A1xi+A2xi2)yi]=0,\frac{\partial S_m}{\partial A_0} = 2 \sum_{i=1}^{n} \left[ \left( A_0 + A_1 x_i + A_2 x_i^2 \right) - y_i \right] = \mathbf{0},SmA1=2i=1n[(A0+A1xi+A2xi2)yi]xi=0,\frac{\partial S_m}{\partial A_1} = 2 \sum_{i=1}^{n} \left[ \left( A_0 + A_1 x_i + A_2 x_i^2 \right) - y_i \right] x_i = \mathbf{0},SmA2=2i=1n[(A0+A1xi+A2xi2)yi]xi2=0,\frac{\partial S_m}{\partial A_2} = 2 \sum_{i=1}^{n} \left[ \left( A_0 + A_1 x_i + A_2 x_i^2 \right) - y_i \right] x_i^2 = \mathbf{0},


Now we have a system of equations:


{nA0+A1i=1nxi+A2i=1nxi2i=1nyi=0,A0i=1nxi+A1i=1nxi2+A2i=1nxi3i=1nxiyi=0,A0i=1nxi2+A1i=1nxi3+A2i=1nxi4i=1nxi2yi=0\left\{ \begin{array}{l} \boldsymbol{n} A_0 + A_1 \sum_{i=1}^{n} x_i + A_2 \sum_{i=1}^{n} x_i^2 - \sum_{i=1}^{n} y_i = \mathbf{0}, \\ A_0 \sum_{i=1}^{n} x_i + A_1 \sum_{i=1}^{n} x_i^2 + A_2 \sum_{i=1}^{n} x_i^3 - \sum_{i=1}^{n} x_i y_i = \mathbf{0}, \\ A_0 \sum_{i=1}^{n} x_i^2 + A_1 \sum_{i=1}^{n} x_i^3 + A_2 \sum_{i=1}^{n} x_i^4 - \sum_{i=1}^{n} x_i^2 y_i = \mathbf{0} \end{array} \right.


After normalization we have the final form to find the coefficients A0, A1, A2:

For solving this system we can use, for example, MS Excel or Wolfram Mathematics. Calculate there all these sums of xx and yy and their products, then find A0, A1, A2:



Now, using the Wolfram Mathematics, solve this system:



Here xx is A0, yy is A1 and zz is A2. So, our function approximation is:


y~=29.2954.8245x+1.0588x2\tilde {y} = 2 9. 2 9 5 - 4. 8 2 4 5 x + 1. 0 5 8 8 x ^ {2}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS