[Newbie] expansion of a function as a power series



On Wed, Jul 25, 2007 at 07:00:41PM -0700, Richard Fateman wrote:
> 
> 
> ----- Original Message -----
> From: Daniel Lakeland <dlakelan at street-artists.org>
> Date: Wednesday, July 25, 2007 2:36 pm
> .....
> > You compute the nth derivative of your function and evaluate it at the
> > expansion point, then divide by n!
> 
> 
> This is extremely unlikely to be more computationally efficiently.  More likely it will be exponentially more expensive than the method used by taylor   (computing in a truncated power series domain).   Computing implicit  power series by the powerseries command uses quite different tools.
> RJF

You're absolutely right, I timed computing the 6th order coefficient
of the taylor series for his example problem by direct methods, and by
using coeff on the output of taylor. The direct method took 10 times
the time of taylor. Still both were less than a clock tick with
"showtime:true" I had to run them in a loop 1000 times to see the
aggregated time difference. I imagine most of the time goes to
computing the 6th derivative.

I'm not quite sure how taylor gets around computing the derivatives
the long way, but I'm impressed at the difference.

That being said, my first inclination would have been to call taylor
and then coeff or ratcoef. That looks to be the best way as well.

-- 
Daniel Lakeland
dlakelan at street-artists.org
http://www.street-artists.org/~dlakelan