# How can I interpolate this data? [closed]

   data= {{1.*10^-10,-343.722},{0.05,-343.639},{0.1,-343.392},{0.15,-342.981},{0.2,-
342.406},{0.25,-341.669},{0.3,-340.769},{0.35,-339.709},{0.4,-338.489},{0.45,-
337.113},{0.5,-335.58},{0.55,-333.895},{0.6,-332.058},{0.65,-330.073},{0.7,-
327.942},{0.75,-325.668},{0.8,-323.254},{0.85,-320.703},{0.9,-318.02},{0.95,-
315.206},{1.,-312.267},{1.05,-309.205},{1.1,-306.026},{1.15,-302.733},{1.2,-
299.329},{1.25,-295.821},{1.3,-292.211},{1.35,-288.505},{1.4,-284.707},{1.45,-
280.822},{1.5,-276.854},{1.55,-272.809},{1.6,-268.691},{1.65,-264.504},{1.7,-
260.255},{1.75,-255.947},{1.8,-251.586},{1.85,-247.176},{1.9,-242.722},{1.95,-
238.23},{2.,-233.704},{2.05,-229.148},{2.1,-224.569},{2.15,-219.969},{2.2,-
215.355}}


I need to interpolate the data which is given above and i will sum it with another function.

There is built in functionality to accomplish this task. Directly using Interpolation:

data = {{1.*10^-10, -343.722}, {0.05, -343.639}, {0.1, -343.392}, {0.15, \
-342.981}, {0.2, -342.406}, {0.25, -341.669}, {0.3, -340.769}, {0.35, \
-339.709}, {0.4, -338.489}, {0.45, -337.113}, {0.5, -335.58}, {0.55, \
-333.895}, {0.6, -332.058}, {0.65, -330.073}, {0.7, -327.942}, {0.75, \
-325.668}, {0.8, -323.254}, {0.85, -320.703}, {0.9, -318.02}, {0.95, \
-315.206}, {1., -312.267}, {1.05, -309.205}, {1.1, -306.026}, {1.15, \
-302.733}, {1.2, -299.329}, {1.25, -295.821}, {1.3, -292.211}, {1.35, \
-288.505}, {1.4, -284.707}, {1.45, -280.822}, {1.5, -276.854}, {1.55, \
-272.809}, {1.6, -268.691}, {1.65, -264.504}, {1.7, -260.255}, {1.75, \
-255.947}, {1.8, -251.586}, {1.85, -247.176}, {1.9, -242.722}, {1.95, \
-238.23}, {2., -233.704}, {2.05, -229.148}, {2.1, -224.569}, {2.15, \
-219.969}, {2.2, -215.355}}

fun = Interpolation[data];


You can operate with the interpolation function fun like another function

fun[1]
(*-312.267*)


Plotting the function over the original data:

Show[ListPlot[data],
Plot[fun[x], {x, Min@data[[;; , 1]], Max@data[[;; , 1]]}]]