# Find limit of Interpolated function

I have an interpolated function

f = Interpolation[data]


I would like to calculate limits such as

Limit[(f[1.5 + h] - f[1.5])/h, h -> 0]


I just get errors.

• That's just the derivative you want; try f'[1.5]. May 31 '13 at 1:58
• Limit is a purely algebraic tool. You could try NLimit from the NumericalCalculus package. I concur with J.M., however, that your specific example would be best approached with f'. May 31 '13 at 2:04
• I know it's the derivative. I want my students to find a derivative with a limit. May 31 '13 at 2:16
• In general, interpolated functions seem fussy compared to user defined functions. May 31 '13 at 2:16
• While I agree it might be a reasonable thing to do, at this time Limit is not going inside the InterpolatingFunction to extract a local interpolant polynomial. May 31 '13 at 3:12

Try:

<< NumericalCalculus
f = Interpolation[Table[{x, x  x}, {x, 1, 5}]];
NLimit[(f[3 + h] - f[3])/h, h -> 0]
(*
6
*)

• Thanks, this is not working for me. I am not sure how to copy and paste my code into a comment to show you. I am trying to figure it out. May 31 '13 at 2:48
• I still get errors, but I am at least getting an answer along with the errors now. Thank you! May 31 '13 at 2:53
• Can you explain why I needed the <<NumericalCalculus? Isn't NLimit already defined without any special packages? That line is what seems to make the difference May 31 '13 at 2:56
• @user, because NLimit[] is not built-in, and it is in the NumericalCalculus ` package which needs to be explicitly loaded... May 31 '13 at 4:30