On Thu, Apr 24, 2008 at 3:08 PM, marco restelli <mrestelli at gmail.com> wrote:
> Dear list,
> I would like to use Taylor expansions to approximate integrals and
> I see the following problem:
>
> this trivial case works as expected, yielding p(0) l
> pT : taylor(p(s),s,0,0);
> pT : ratsimp(pT);
> pbar : integrate(pT,s,-l/2,l/2);
>
> but when I take
> pT : taylor(p(s),s,0,1);
> pT : ratsimp(pT);
> pbar : integrate(pT,s,-l/2,l/2);
> maxima starts computing and never delivers any result. Does anyone
> have a suggestion?
>
You can use the pdiff package:
(%i1) load(pdiff)$
(%i2) pT:taylor(p(s), s, 0, 1)$
(%i3) pT:ratsimp(pT)$
(%i4) pbar:integrate(pT,s,-I/2,I/2), ratsimp;
(%o4) p(0)*I
HTH,
--
Andrej