RE: Interpolating function
- To: mathgroup at smc.vnet.net
- Subject: [mg9835] RE: [mg9737] Interpolating function
- From: Ersek_Ted%PAX1A at mr.nawcad.navy.mil
- Date: Fri, 28 Nov 1997 05:35:47 -0500
- Sender: owner-wri-mathgroup at wolfram.com
jmthomas wrote: |--------------------------------------------- | Interpolation[data] | comes with an option InterpolationOrder, which by default is set to | Three, meaning it guarantees the continuity of the interpolation | function for the first and second derivative. | I replied with: | |That's what I used to think Interpolation did, but consider the example below. |In Out[3] you get a plot of the Interpolation, and you will |see it is continuous (good). |In Out[4] you get a plot of the 2nd derivative of the interpolation, and you will |see it is piecewise linear, but not continuous. | (* See my previous post for the details of the example. *) | jmthomas replied with: To me, the second derivative of "inter" IS continuous (no gaps between two very close points), and is piecewise linear. The third derivative is not continuous, and piecewise constant. ---------------------------------------------- After taking another look it seems you are right. I don't know what I was thinking to conclude otherwise. ----------------------------------------------- Also: In hind site I feel like a fool for my other recent post, "Want to use Module". The solution to my problem is simply: In[1]:= y[x_]:=x*Exp[x]+2; In[2]:= foo[x_]:=With[{temp=y[x]}, 2/(3+temp)/;temp<100] I just assumed the Kernal wasn't flexible enough to have a condition for foo[x_]:=(.......) inside With[.......]. I guess I should have tried it instead of assuming it wouldn't work. Ted Ersek ersek_ted%pax1a at mr.nawcad.navy.mil