MathGroup Archive 1999

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Simlifying series expansion


Peter,

You are looking for the Series with x^g factored out, i.e., 

n = 5;
s = x^g * Series[Sin[x], {x, 0, n}];

Redefine Series to automatically handle the factoring

mySeries[expr_, {x_Symbol, x0_?NumericQ, n_Integer}] := 
  Module[{t = Series[#, {x, x0, n}] & /@ expr, f},
    f = Times @@ 
        Cases[t, y_?(! FreeQ[#, Series] &) :> First[y]];
    f * Series[expr/f, {x, x0, n}]]

s == mySeries[x^g Sin[x], {x, 0, n}]

True

I haven't tested this very thoroughly so there may be situations where it 
does not work as expected.

Bob Hanlon

In a message dated 10/30/1999 4:07:15 AM, pollner at physik.uni-marburg.de 
writes:

>I am interested to calculate power series like
>
>x^g Sin[x] = x^(g+1) + o[x^(g+3)]
>
>How to do it with Mathematica? The naive
>
>Series[x^g Sin[x],{x,0,IntegerPart[g+4]}]
>
>do not work.
>


  • Prev by Date: Re: Assumptions in Integrate
  • Next by Date: Re: Zeta Function
  • Previous by thread: Simlifying series expansion
  • Next by thread: Electromagnetics notebooks