Re: derivative of cubic spline

• To: mathgroup at smc.vnet.net
• Subject: [mg66562] Re: derivative of cubic spline
• From: Peter Pein <petsie at dordos.net>
• Date: Sat, 20 May 2006 04:47:08 -0400 (EDT)
• References: <e4ju6v\$d56\$1@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```derivSpline = ReplacePart[spline, Map[Append[Rest[#]*{1, 2, 3}, 0] &, spline[[4]], {2}], 4]

works in version 5.1

Jaccard Florian schrieb:
> Dear All,
>
> I would like to know how to derivate a spline function constructed by
> Mathematica.
>
> The question has already been posted in :
>  First derivative of interpolated spline
>
> But I wasn't able to find an answer in mathgroup.
>
> Example :
>
>
> data={{0, 1}, {1, 2.3}, {2, 2.5}, {3, 1.2}, {4, 0.47},
>   {5, 0.38}, {6, 0.76}}
>
> << "Numericalmath`SplineFit`"
>
> s = SplineFit[data, Cubic];
>
> You can see that the spline is good :
>
> ParametricPlot[s[x], {x, 0, 6}, PlotStyle -> Blue,
>    Epilog -> {{Blue, Text[HoldForm[y = s(x)],
>        {2.5, g1[2.5]}, Background -> White]},
>      ({PointSize[0.03], Red, Point[#1]} & ) /@ data},
>    PlotRange -> {-0.5, 3}, TextStyle ->
>     {FontFamily -> Times}];
>
> But D[s[t],t] or s'[t] or so one doesn't help...
> So I'm not able to see that the spline is better than Interpolation (in
> the sense of a continuous derivative)!
>
> It's the first time I found something that is easier in MathCad than in
> Mathematica...
>
> Regards
>
> F.Jaccard
> florian.jaccard at he-arc.ch
>
>

```

• Prev by Date: Re: What's wrong with Integrate [ 1/x, {x,1,Infinity}]?
• Next by Date: Re: HoldAll
• Previous by thread: derivative of cubic spline
• Next by thread: Re: derivative of cubic spline