Interpolation problems

• To: mathgroup at smc.vnet.net
• Subject: [mg120229] Interpolation problems
• From: James Womack <james.c.womack at gmail.com>
• Date: Thu, 14 Jul 2011 05:21:51 -0400 (EDT)

```Hello all,

I am having difficulty with interpolating a data set. My data is a
function of one coordinate -- each data point consists of 2 numbers, one
denoting position and one denoting the value of the function. If you are
interested, the data represents a potential energy function.

The best way to demonstrate my issue is to link to some images of plots.

First, here is the result of:
ListPlot[data, PlotRange -> {{0.4, 0.6}, {-350, 350}}, Joined -> True]
http://jcwx86.dyndns.org/public/listplot.jpeg

Second, here is the result of:
Plot[Interpolation[data][x], {x, 0.4, 0.6}, PlotRange -> {-350, 350}]
http://jcwx86.dyndns.org/public/interpolationfunction.jpeg

These plots focus only on the relevant region of the data. The data
spans x = 0.000857412 to x = 25.6297. The peak you see in the plots is
cut off with a maximum value of the function at about y = 4000.

As you can see, the interpolation results in two small additional minima
at the base of the peak. This is problematic, since the function is a
potential energy function and minima represent stable-states. Additional
minima present in the data therefore result in problems with subsequent
calculations using the InterpolationFunction of the data.

I suspect that the issue is to do with the Interpolation command trying
to fit the function to every datapoint. The rapid change in gradient at
the base of the peak means that in order to fit splines to the function,
these minima are necessary.

Ideally, I would like an InterpolationFunction of the data that is (i)
smooth and (ii) lacks these spurious minima. I have considered deleting
data points from the base of the peak, as this might enable the splines
to better fit the peak. Does anyone know of a way that I can modify the
Interpolation command that enables a fit which better represents the
data? Or perhaps you know of an alternative method of creating
interpolated functions which might suit my needs better? I have already
tried increasing the interpolation order -- this seems only to result in
more "wobbles" at the base of the peak. Decreasing the interpolation
order to 1 removes the minima, but also means the function is no longer
"smooth".

If you want to play around with the data yourself, I will post it below
in full.

James

data = {{0.000857412, 14838.7}, {0.000952607, 14879.2}, {0.0010546,
14922.6}, {0.00116363, 14967.6}, {0.00127992, 15012.4}, {0.00140372,
15055.}, {0.00153526, 15092.5}, {0.00167477, 15121.8}, {0.00182249,
15139.7}, {0.00197865, 15142.7}, {0.00214349,
15127.9}, {0.00231725, 15092.8}, {0.00250016, 15036.}, {0.00269245,
14957.1}, {0.00289436, 14856.4}, {0.00310612, 14735.2}, {0.00332798,
14594.7}, {0.00356017, 14436.}, {0.00380292, 14259.1}, {0.00405647,
14062.8}, {0.00432105, 13844.5}, {0.00459691,
13601.1}, {0.00488428, 13329.}, {0.00518339, 13025.6}, {0.00549449,
12689.5}, {0.0058178, 12320.9}, {0.00615357, 11922.}, {0.00650203,
11496.5}, {0.00686342, 11049.1}, {0.00723798, 10585.3}, {0.00762594,
10110.9}, {0.00802755, 9631.17}, {0.00844304,
9151.38}, {0.00887265, 8675.96}, {0.00931661, 8208.59}, {0.00977517,
7752.08}, {0.0102486, 7308.4}, {0.010737, 6878.79}, {0.0112408,
6463.95}, {0.0117602, 6064.19}, {0.0122953, 5679.67}, {0.0128465,
5310.55}, {0.0134139, 4957.09}, {0.0139978, 4619.7}, {0.0145986,
4298.88}, {0.0152163, 3995.17}, {0.0158512, 3709.05}, {0.0165036,
3440.87}, {0.0171737, 3190.75}, {0.0178618, 2958.54}, {0.0185681,
2743.84}, {0.0192929, 2545.97}, {0.0200363, 2364.08}, {0.0207987,
2197.12}, {0.0215803, 2043.97}, {0.0223812, 1903.44}, {0.0232019,
1774.37}, {0.0240425, 1655.66}, {0.0249032, 1546.25}, {0.0257843,
1445.24}, {0.0266861, 1351.8}, {0.0276088, 1265.26}, {0.0285526,
1185.03}, {0.0295178, 1110.63}, {0.0305046, 1041.65}, {0.0315134,
977.742}, {0.0325443, 918.601}, {0.0335975, 863.929}, {0.0346735,
813.433}, {0.0357722, 766.816}, {0.0368942, 723.771}, {0.0380395,
683.979}, {0.0392085, 647.117}, {0.0404014, 612.862}, {0.0416184,
580.898}, {0.0428598, 550.931}, {0.0441259, 522.687}, {0.0454169,
495.929}, {0.046733, 470.455}, {0.0480746, 446.101}, {0.0494419,
422.747}, {0.0508351, 400.309}, {0.0522545, 378.739}, {0.0537004,
358.02}, {0.055173, 338.159}, {0.0566725, 319.178}, {0.0581993,
301.111}, {0.0597536, 283.995}, {0.0613357, 267.864}, {0.0629458,
252.743}, {0.0645842, 238.642}, {0.0662511, 225.56}, {0.0679469,
213.476}, {0.0696718, 202.352}, {0.071426, 192.138}, {0.0732098,
182.767}, {0.0750235, 174.163}, {0.0768674, 166.246}, {0.0787418,
158.929}, {0.0806468, 152.129}, {0.0825829, 145.764}, {0.0845501,
139.761}, {0.0865489, 134.055}, {0.0885796, 128.59}, {0.0906423,
123.323}, {0.0927373, 118.223}, {0.094865, 113.266}, {0.0970257,
108.441}, {0.0992195, 103.746}, {0.101447, 99.1832}, {0.103708,
94.7614}, {0.106003, 90.492}, {0.108333, 86.3876}, {0.110697,
82.4605}, {0.113096, 78.7209}, {0.11553, 75.1764}, {0.118,
71.8308}, {0.120505, 68.6837}, {0.123047, 65.731}, {0.125625,
62.9647}, {0.128239, 60.3737}, {0.130891, 57.9446}, {0.13358,
55.6622}, {0.136306, 53.511}, {0.13907, 51.4754}, {0.141873,
49.541}, {0.144714, 47.6948}, {0.147594, 45.9259}, {0.150512,
44.2252}, {0.153471, 42.5863}, {0.156469, 41.0045}, {0.159507,
39.477}, {0.162585, 38.0023}, {0.165704, 36.5801}, {0.168864,
35.2105}, {0.172065, 33.894}, {0.175308, 32.6307}, {0.178593,
31.4207}, {0.18192, 30.2633}, {0.185289, 29.1574}, {0.188702,
28.1014}, {0.192157, 27.0929}, {0.195657, 26.1294}, {0.1992,
25.208}, {0.202787, 24.3257}, {0.206419, 23.4798}, {0.210096,
22.6673}, {0.213819, 21.8858}, {0.217586, 21.1333}, {0.2214,
20.4077}, {0.22526, 19.7078}, {0.229167, 19.0325}, {0.233121,
18.3809}, {0.237122, 17.7527}, {0.241171, 17.1474}, {0.245267,
16.5648}, {0.249413, 16.0049}, {0.253607, 15.4675}, {0.25785,
14.9524}, {0.262143, 14.4593}, {0.266486, 13.9879}, {0.270879,
13.5376}, {0.275322, 13.1078}, {0.279817, 12.6974}, {0.284363,
12.3057}, {0.288961, 11.9315}, {0.293611, 11.5735}, {0.298314,
11.2306}, {0.30307, 10.9012}, {0.307879, 10.5843}, {0.312741,
10.2783}, {0.317658, 9.98209}, {0.32263, 9.69444}, {0.327657,
9.41427}, {0.332738, 9.1406}, {0.337876, 8.8726}, {0.34307,
8.60957}, {0.348321, 8.35099}, {0.353629, 8.09645}, {0.358994,
7.84573}, {0.364417, 7.59873}, {0.369899, 7.35549}, {0.375439,
7.11617}, {0.381039, 6.88106}, {0.386698, 6.65052}, {0.392417,
6.42502}, {0.398197, 6.20507}, {0.404039, 5.99126}, {0.409941,
5.78421}, {0.415906, 5.5846}, {0.421933, 5.39311}, {0.428023,
5.2105}, {0.434176, 5.03758}, {0.440393, 4.87524}, {0.446675,
4.72458}, {0.453022, 4.58699}, {0.459433, 4.46447}, {0.465911,
4.36017}, {0.472455, 4.27959}, {0.479066, 4.23335}, {0.485744,
4.24452}, {0.492491, 4.37035}, {0.499305, 4.77992}, {0.506189,
6.11074}, {0.513142, 11.8735}, {0.520165, 61.2058}, {0.527258,
3610.21}, {0.534423, 3768.91}, {0.541659, 56.1737}, {0.548968,
9.2241}, {0.556349, 4.2115}, {0.563803, 3.15953}, {0.571332,
2.84967}, {0.578935, 2.73556}, {0.586613, 2.68399}, {0.594367,
2.6543}, {0.602197, 2.63196}, {0.610104, 2.6111}, {0.618088,
2.58908}, {0.626151, 2.56459}, {0.634292, 2.5369}, {0.642513,
2.5056}, {0.650813, 2.47046}, {0.659194, 2.43137}, {0.667657,
2.38832}, {0.676201, 2.34142}, {0.684829, 2.29084}, {0.693539,
2.23686}, {0.702333, 2.17981}, {0.711212, 2.12015}, {0.720177,
2.05834}, {0.729227, 1.99494}, {0.738364, 1.93054}, {0.747589,
1.86573}, {0.756902, 1.80114}, {0.766304, 1.73737}, {0.775795,
1.67498}, {0.785377, 1.61451}, {0.79505, 1.55641}, {0.804815,
1.50107}, {0.814673, 1.4488}, {0.824624, 1.39981}, {0.83467,
1.35422}, {0.844811, 1.31207}, {0.855048, 1.27331}, {0.865381,
1.23782}, {0.875812, 1.20541}, {0.886342, 1.17584}, {0.896971,
1.14884}, {0.9077, 1.12412}, {0.91853, 1.10136}, {0.929463,
1.08026}, {0.940498, 1.06052}, {0.951637, 1.04186}, {0.96288,
1.02403}, {0.974229, 1.00679}, {0.985685, 0.989961}, {0.997248,
0.973372}, {1.00892, 0.956891}, {1.0207, 0.940417}, {1.03259,
0.923877}, {1.0446, 0.90722}, {1.05671, 0.890421}, {1.06894,
0.873471}, {1.08129, 0.856377}, {1.09375, 0.839159}, {1.10632,
0.821848}, {1.11902, 0.804479}, {1.13183, 0.787093}, {1.14476,
0.769734}, {1.15782, 0.752447}, {1.171, 0.735276}, {1.1843,
0.718261}, {1.19772, 0.701443}, {1.21128, 0.684858}, {1.22495,
0.668537}, {1.23876, 0.652509}, {1.2527, 0.636798}, {1.26677,
0.621424}, {1.28097, 0.606403}, {1.2953, 0.591746}, {1.30977,
0.577463}, {1.32438, 0.563558}, {1.33912, 0.550034}, {1.354,
0.53689}, {1.36903, 0.524124}, {1.38419, 0.511731}, {1.3995,
0.499706}, {1.41495, 0.488039}, {1.43055, 0.476724}, {1.4463,
0.46575}, {1.4622, 0.455106}, {1.47825, 0.444782}, {1.49445,
0.434767}, {1.51081, 0.425048}, {1.52732, 0.415615}, {1.54399,
0.406455}, {1.56082, 0.397555}, {1.57781, 0.388905}, {1.59496,
0.380491}, {1.61228, 0.372303}, {1.62977, 0.364327}, {1.64742,
0.356553}, {1.66524, 0.348968}, {1.68324, 0.341562}, {1.70141,
0.334323}, {1.71976, 0.327241}, {1.73828, 0.320305}, {1.75699,
0.313506}, {1.77588, 0.306834}, {1.79495, 0.30028}, {1.81421,
0.293836}, {1.83366, 0.287495}, {1.8533, 0.281251}, {1.87314,
0.275096}, {1.89317, 0.269027}, {1.9134, 0.263039}, {1.93382,
0.257129}, {1.95446, 0.251294}, {1.9753, 0.245533}, {1.99634,
0.239846}, {2.0176, 0.234233}, {2.03907, 0.228695}, {2.06076,
0.223234}, {2.08267, 0.217853}, {2.1048, 0.212556}, {2.12715,
0.207345}, {2.14974, 0.202226}, {2.17255, 0.197204}, {2.1956,
0.192282}, {2.21888, 0.187468}, {2.24241, 0.182765}, {2.26618,
0.178179}, {2.29019, 0.173715}, {2.31446, 0.169377}, {2.33898,
0.165171}, {2.36375, 0.161099}, {2.38879, 0.157164}, {2.41409,
0.15337}, {2.43967, 0.149718}, {2.46551, 0.146209}, {2.49163,
0.142844}, {2.51803, 0.13962}, {2.54471, 0.136537}, {2.57168,
0.133593}, {2.59895, 0.130783}, {2.62651, 0.128104}, {2.65438,
0.12555}, {2.68255, 0.123115}, {2.71103, 0.120793}, {2.73983,
0.118577}, {2.76894, 0.116457}, {2.79839, 0.114426}, {2.82817,
0.112475}, {2.85828, 0.110594}, {2.88873, 0.108774}, {2.91953,
0.107005}, {2.95069, 0.105277}, {2.9822, 0.103581}, {3.01408,
0.101906}, {3.04634, 0.100244}, {3.07896, 0.0985851}, {3.11198,
0.0969214}, {3.14538, 0.0952448}, {3.17918, 0.0935482}, {3.21339,
0.0918252}, {3.24801, 0.0900703}, {3.28304, 0.0882791}, {3.31851,
0.0864479}, {3.35441, 0.0845746}, {3.39075, 0.0826577}, {3.42754,
0.0806974}, {3.4648, 0.0786946}, {3.50252, 0.0766518}, {3.54072,
0.0745723}, {3.5794, 0.0724607}, {3.61859, 0.0703225}, {3.65827,
0.0681642}, {3.69848, 0.0659931}, {3.73921, 0.0638169}, {3.78048,
0.0616441}, {3.8223, 0.0594833}, {3.86468, 0.0573433}, {3.90763,
0.055233}, {3.95116, 0.0531607}, {3.9953, 0.0511345}, {4.04004,
0.049162}, {4.0854, 0.0472498}, {4.13141, 0.0454037}, {4.17806,
0.0436287}, {4.22539, 0.0419284}, {4.27339, 0.0403057}, {4.32209,
0.038762}, {4.37151, 0.0372978}, {4.42166, 0.0359126}, {4.47256,
0.0346048}, {4.52423, 0.0333719}, {4.57669, 0.0322107}, {4.62995,
0.0311175}, {4.68405, 0.0300877}, {4.73899, 0.0291167}, {4.7948,
0.0281994}, {4.85151, 0.0273307}, {4.90914, 0.0265055}, {4.96772,
0.0257188}, {5.02726, 0.0249656}, {5.08781, 0.0242415}, {5.14938,
0.0235421}, {5.212, 0.0228634}, {5.27572, 0.022202}, {5.34055,
0.0215545}, {5.40654, 0.0209184}, {5.47372, 0.020291}, {5.54213,
0.0196703}, {5.6118, 0.0190546}, {5.68278, 0.0184424}, {5.75511,
0.0178324}, {5.82884, 0.0172239}, {5.90401, 0.0166158}, {5.98067,
0.0160078}, {6.05888, 0.0153993}, {6.13869, 0.01479}, {6.22016,
0.0141799}, {6.30335, 0.0135688}, {6.38833, 0.0129568}, {6.47516,
0.012344}, {6.56392, 0.0117308}, {6.65469, 0.0111176}, {6.74755,
0.010505}, {6.84259, 0.00989355}, {6.93989, 0.00928413}, {7.03957,
0.00867764}, {7.14172, 0.0080751}, {7.24646, 0.00747763}, {7.35392,
0.00688635}, {7.46421, 0.00630242}, {7.57749, 0.00572695}, {7.6939,
0.00516099}, {7.81361, 0.00460546}, {7.93678, 0.00406112}, {8.06362,
0.00352857}, {8.19432, 0.0030082}, {8.32911, 0.00250021}, {8.46823,
0.00200459}, {8.61196, 0.00152117}, {8.76057, 0.0010496}, {8.9144,
0.000589449}, {9.0738,
0.000140156}, {9.23915, -0.00029888}, {9.41088, -0.000728292},
{9.58949, -0.00114872}, {9.77551, -0.00156078}, {9.96953,
-0.00196506}, {10.1723, -0.00236211}, {10.3844, -0.00275245},
{10.607, -0.00313654}, {10.8409, -0.0035148}, {11.0873, -0.00388763},
{11.3476, -0.00425541}, {11.6234, -0.0046185}, {11.9164,
-0.00497726}, {12.2291, -0.00533205}, {12.5641, -0.00568327},
{12.9246, -0.00603136}, {13.3148, -0.00637682}, {13.7399,
-0.00672024}, {14.2064, -0.00706234}, {14.7232, -0.00740403},
{15.3022, -0.00774645}, {15.9599, -0.00809116}, {16.7207,
-0.00844029}, {17.6223, -0.00879694}, {18.7281, -0.00916597},
{20.1565, -0.00955576}, {22.1739, -0.00998324}, {25.6297, -0.0104947}}

```

• Prev by Date: Re: Contour ColorFunction in a ParametricPlot
• Next by Date: Re: Suming InterpolatingFunction Objects
• Previous by thread: Biokmod 5 for Mathematica 8.0
• Next by thread: Re: Interpolation problems