Interpolation of a rapidly oscillating function

  • #1
CAF123
Gold Member
2,948
88
I have an analytic function F(x,y,z) and grids in x,y and z. I would like to reproduce the values I get for F at a given x,y and z through carefully interpolating the values given in the grids I have in each of these variables. The problem is that in some part of the x,y,z phase space, namely when y->0, the function F(x,y,z) oscillates very heavily and I am not sure how to tackle the interpolation.

My interpolation routine is in Cpp and, for a good part of my phase space, linear interpolation is OK but for y->0 I see it is not and was thinking of using splines. But, I see only a max 2D spline given in the gsl_library and I am anyway not sure if splines would help here when the function oscillates rapidly.

Thanks in advance for any comments.
 
Technology news on Phys.org
  • #2
What form does the oscillation take?
Map the axes through a function that corrects the period to be a constant.
Consider using a 3D Fourier transform as the interpolator.
 
  • #3
CAF123 said:
I am anyway not sure if splines would help here when the function oscillates rapidly.
Probably not, you can't extract more information than the grid can encode (oscillations at twice the interval of the grid points by the Nyquist-Shannon theorem).

Below this limit you could extract more accuracy using e.g. https://www.geometrictools.com/GTE/Mathematics/IntpTricubic3.h.
 
Last edited:
  • #4
Is there some other properties of the function ##F(x,y,z)## that can be used in decision what interpolation would be the best for it
- It is analytical . Does it can be represented in the following form
$$F(x,y,z)=\sum_{n=0}^{\infty} a_n (x-x_0)^n+b_n(y-y_0)^n+c_n(z-z_0)^n$$
- It oscillates. What are features of those oscillations ? ( amplitude, frequency property )
- Why oscillates more when ##y \to 0## ?
Maybe combination of a trigonometric function and an interpolation can describe it better.
 

Related to Interpolation of a rapidly oscillating function

1. How can interpolation be applied to a rapidly oscillating function?

Interpolation of a rapidly oscillating function involves fitting a curve or a series of points to the function in order to estimate the values in between the known data points. This can help in smoothing out the oscillations and providing a more continuous representation of the function.

2. What are some common methods used for interpolating rapidly oscillating functions?

Some common methods for interpolating rapidly oscillating functions include spline interpolation, polynomial interpolation, and Fourier series interpolation. These methods can help in accurately representing the function even in regions where the data points are widely spaced or erratic.

3. How does the choice of interpolation method affect the accuracy of the results?

The choice of interpolation method can greatly affect the accuracy of the results when dealing with rapidly oscillating functions. Some methods may introduce artifacts or errors, while others may provide a more faithful representation of the function. It is important to carefully consider the characteristics of the function and the data points before selecting an interpolation method.

4. Can interpolation of a rapidly oscillating function lead to overfitting?

Yes, interpolation of a rapidly oscillating function can lead to overfitting if the interpolation method is not chosen carefully. Overfitting occurs when the interpolation curve fits the noise or fluctuations in the data rather than the underlying trend of the function. This can result in a misleading representation of the function and poor predictive performance.

5. Are there any limitations to interpolating rapidly oscillating functions?

There are some limitations to interpolating rapidly oscillating functions, such as the potential for introducing errors or artifacts in regions of high oscillation. Additionally, interpolating functions with rapidly changing values can be computationally expensive and may require careful consideration of the interpolation method and parameters to achieve accurate results.

Similar threads

  • Programming and Computer Science
Replies
1
Views
10K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
2K
  • Programming and Computer Science
Replies
1
Views
1K
Replies
5
Views
850
  • Programming and Computer Science
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
905
  • Programming and Computer Science
Replies
2
Views
1K
  • Topology and Analysis
Replies
2
Views
1K
  • Programming and Computer Science
Replies
31
Views
2K
Back
Top