# [Maxima] approximating a curve

Valery Pipin pip at iszf.irk.ru
Wed Dec 10 00:07:07 CST 2008

```Hi Richard,

Thanks for suggestions!
In my case I have used the Chebyshev approximations. This gives further
advantage in differentiation/integration as I can simply combine the
coefficients of series to get the results. Also the Chebyshev
interpolation is the best off all among the polynomials of the given
order. This is so called "minimax" property.

best regards
Valery

> I have a function called curvefit() which can be used for
> interpolation and the resulting curve can be differentiated.  You can
> get it from this link below, it is part of pw.mac.  I am working on
> faster ways to do this but for now it is not lightning fast.  Also
> curvefit() is experimental and does not always work perfectly.  If
> you use a degree of 7 or so it should work okay but that depends on
> the points being fitted probably.
>
> Rich
>
> http://home.comcast.net/~rvh2007/site/?/page/Pw.mac_2.2/
>
>

>
> On Tue, 9 Dec 2008 08:21:31 -0700
> Robert Dodier wrote:
>
> > On 12/8/08, Valery Pipin  wrote:
> >
> > > real life example. Using the Peter's Eggleton stellar evolution
> > > code I've got a table of  the stellar interior parameters for the
> > > Brown Dwarf (0.2 M_sun, 0.006 L_sun). The parameters are pressure,
> > >  temperature, luminosity, density and etc.. . Now I want to use
> > > their functional form in my dynamo model. The best way is to get
> > > the Chebyshev approximations to them. I do as follows,
> > >  1) read the table to maxima
> > >  2) find the spline interpolation
> > >  3) find  the Chebyshev approximations
> >
> > Hey, that rocks. But I don't quite understand what's going on here.
> > Why is there both a cubic spline and a Chebyshev approximation?
> Agree, it is not an ideal way.
> The problem is that I can not use the given spline approximations to
> differentiate them further. I have use it to interpolate the table to
> the Chebyshev nodes. It was a fast solution (in sense, that everything
> is at hands).
>
> best regards
> Valery
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima

```