Analytical form of an Interpolated function

In summary, the conversation discusses the use of an "Interpolation" function in Mathematica and whether it is possible to extract an analytical expression for it. The function is represented by a polynomial of 3rd or 4th order, but Mathematica does not automatically output the formula. The individual suggests using Fit or other functions to come up with an analytic expression for the data.
  • #1
evgenx
14
0
Analytical form of an "Interpolated" function

Hallo,

I have a question on the use of "Interpolation" function in Mathematica.
I am wondering whether it is possible to extract an analytical expression
for a function built using the "Interpolation" option. Say, I have the following
function of two variable f(x,y) represented on a grid:

Ra=Interpolation[{
{{ 2.777897, 0.000000}, -0.202683},
{{ 2.777897, 0.043633}, -0.203579},
{{ 2.777897, 0.087266}, -0.200988},
{{ 2.777897, 0.130900}, -0.192908},
{{ 2.777897, 0.174533}, -0.176695},
{{ 2.777897, 0.218166}, -0.155857},
{{ 2.777897, 0.261799}, -0.129889},

{{ 2.815692, 0.000000}, -0.202618},
{{ 2.815692, 0.043633}, -0.203585},
{{ 2.815692, 0.087266}, -0.201401},
{{ 2.815692, 0.130900}, -0.194172},
{{ 2.815692, 0.174533}, -0.179481},
{{ 2.815692, 0.218166}, -0.163498},
{{ 2.815692, 0.261799}, -0.140403},

{{ 2.853486, 0.000000}, -0.201962},
{{ 2.853486, 0.043633}, -0.203003},
{{ 2.853486, 0.087266}, -0.201219},
{{ 2.853486, 0.130900}, -0.194830},
{{ 2.853486, 0.174533}, -0.181844},
{{ 2.853486, 0.218166}, -0.170511},
{{ 2.853486, 0.261799}, -0.150171},

{{ 2.891281, 0.000000}, -0.200745},
{{ 2.891281, 0.043633}, -0.201863},
{{ 2.891281, 0.087266}, -0.200472},
{{ 2.891281, 0.130900}, -0.194926},
{{ 2.891281, 0.174533}, -0.184095},
{{ 2.891281, 0.218166}, -0.176901},
{{ 2.891281, 0.261799}, -0.159191},

{{ 2.929075, 0.000000}, -0.198999},
{{ 2.929075, 0.043633}, -0.200197},
{{ 2.929075, 0.087266}, -0.199196},
{{ 2.929075, 0.130900}, -0.194513},
{{ 2.929075, 0.174533}, -0.186552},
{{ 2.929075, 0.218166}, -0.182673},
{{ 2.929075, 0.261799}, -0.167464},

{{ 2.966870, 0.000000}, -0.196757},
{{ 2.966870, 0.043633}, -0.198037},
{{ 2.966870, 0.087266}, -0.197426},
{{ 2.966870, 0.130900}, -0.193666},
{{ 2.966870, 0.174533}, -0.189150},
{{ 2.966870, 0.218166}, -0.187834},
{{ 2.966870, 0.261799}, -0.174997},

{{ 3.004664, 0.000000}, -0.194050},
{{ 3.004664, 0.043633}, -0.195418},
{{ 3.004664, 0.087266}, -0.195205},
{{ 3.004664, 0.130900}, -0.192492},
{{ 3.004664, 0.174533}, -0.191623},
{{ 3.004664, 0.218166}, -0.192395},
{{ 3.004664, 0.261799}, -0.181796},

{{ 3.042459, 0.000000}, -0.190913},
{{ 3.042459, 0.043633}, -0.192374},
{{ 3.042459, 0.087266}, -0.192580},
{{ 3.042459, 0.130900}, -0.191144},
{{ 3.042459, 0.174533}, -0.193806},
{{ 3.042459, 0.218166}, -0.196366},
{{ 3.042459, 0.261799}, -0.187872},

{{ 3.080253, 0.000000}, -0.187381},
{{ 3.080253, 0.043633}, -0.188943},
{{ 3.080253, 0.087266}, -0.189609},
{{ 3.080253, 0.130900}, -0.189813},
{{ 3.080253, 0.174533}, -0.195628},
{{ 3.080253, 0.218166}, -0.199759},
{{ 3.080253, 0.261799}, -0.193240},

{{ 3.118048, 0.000000}, -0.183492},
{{ 3.118048, 0.043633}, -0.185166},
{{ 3.118048, 0.087266}, -0.186363},
{{ 3.118048, 0.130900}, -0.188646},
{{ 3.118048, 0.174533}, -0.197061},
{{ 3.118048, 0.218166}, -0.202589},
{{ 3.118048, 0.261799}, -0.197915},

{{ 3.155842, 0.000000}, -0.179285},
{{ 3.155842, 0.043633}, -0.181090},
{{ 3.155842, 0.087266}, -0.182933},
{{ 3.155842, 0.130900}, -0.187658},
{{ 3.155842, 0.174533}, -0.198096},
{{ 3.155842, 0.218166}, -0.204871},
{{ 3.155842, 0.261799}, -0.201916},

{{ 3.193637, 0.000000}, -0.174801},
{{ 3.193637, 0.043633}, -0.176764},
{{ 3.193637, 0.087266}, -0.179435},
{{ 3.193637, 0.130900}, -0.186750},
{{ 3.193637, 0.174533}, -0.198733},
{{ 3.193637, 0.218166}, -0.206622},
{{ 3.193637, 0.261799}, -0.205261}
}]

Mathematica makes an "Interpolated" function by a polynomial of 3rd or 4th oder out of this.
The question is if there is an elegant option to extract the coefficients of this polynomial
(besides that of taking the 1st, 2nd, etc derivatives of the function, which is quite tedious).
Many thanks!
 
Physics news on Phys.org
  • #2


I do not know any Mathematica...I am just curious...do you mean to tell me that Mathematica CAN interpolate this data and come up with a polynomial, but it won't tell you which one it is?

I mean, I have done simple y=f(x) interpolation in Excel and, on the graph, one has the option of printing the equation Excel came up with...linear, quadratic, exponential, polynomial, whatever...Mathematica does not do that? Or that's the part you don't know how to do?.
 
  • #3


gsal said:
I do not know any Mathematica...I am just curious...do you mean to tell me that Mathematica CAN interpolate this data and come up with a polynomial, but it won't tell you which one it is?

I mean, I have done simple y=f(x) interpolation in Excel and, on the graph, one has the option of printing the equation Excel came up with...linear, quadratic, exponential, polynomial, whatever...Mathematica does not do that? Or that's the part you don't know how to do?.

Yes, as far as I know Mathematica does not output automatically the formula of the function obtained with "Interpolation". I am sure that this issue has been posted before at the forum but unfortunately I cannot find the thread :frown:
 
  • #4


I don't think so. Interpolation works by interpolating between points using various polynomials. It does not use a global polynomial for all the data. Try using Fit or other functions to come up with an analytic expression for the data.
 
  • #5


jackmell said:
I don't think so. Interpolation works by interpolating between points using various polynomials. It does not use a global polynomial for all the data. Try using Fit or other functions to come up with an analytic expression for the data.

Are you sure? As far as I remember, in the manual, it is written that one can work with "interpolated" functions like with normal functions. So it should be a function. Ok, I might try to represent my "Interpolated" function with a polynomial, via 1s,2nd etc derivatives. Maybe it will work...
 

1. What is the purpose of an analytical form of an interpolated function?

The analytical form of an interpolated function is used to represent a smooth and continuous mathematical function that approximates a set of data points. It allows for easier computation and analysis of the data, as well as providing a visual representation of the data.

2. How is an analytical form of an interpolated function different from the original data points?

An analytical form of an interpolated function is a mathematical formula that represents the data points, whereas the original data points are discrete values. The interpolated function creates a smooth curve that connects the data points, making it easier to analyze and use in calculations.

3. What are the benefits of using an analytical form of an interpolated function?

Using an analytical form of an interpolated function allows for more accurate and precise calculations compared to using only the original data points. It also provides a continuous representation of the data, which can be helpful in visualizing trends and patterns.

4. How is an analytical form of an interpolated function created?

An analytical form of an interpolated function is created by using mathematical techniques such as polynomial interpolation or spline interpolation. These techniques use the data points to create a smooth curve that approximates the data and can be represented by a mathematical formula.

5. Can an analytical form of an interpolated function be used to predict new data points?

Yes, an analytical form of an interpolated function can be used to predict new data points within the range of the original data. However, it should be noted that the accuracy of these predictions may vary depending on the quality and quantity of the original data points and the type of interpolation used.

Similar threads

  • Programming and Computer Science
Replies
8
Views
8K
  • Differential Equations
Replies
2
Views
4K
  • Calculus and Beyond Homework Help
Replies
8
Views
63K
Replies
15
Views
38K
Back
Top