       Re: polynomial long division using Series[] and changing polynomial

• To: mathgroup at smc.vnet.net
• Subject: [mg112410] Re: polynomial long division using Series[] and changing polynomial
• From: Peter Pein <petsie at dordos.net>
• Date: Tue, 14 Sep 2010 05:15:30 -0400 (EDT)
• References: <i6kj03\$f12\$1@smc.vnet.net>

```Hi Nasser,

it looks like you want the expansion around infinity:

In:= num = 2 + z;
den = z^2 + 2*z + 1;
Normal[Series[num/den, {z, Infinity, 4}]]
Out= 2/z^4 - 1/z^3 + 1/z

Regards,
Peter

Am Mon, 13 Sep 2010 07:14:11 +0000 (UTC)
schrieb "Nasser M. Abbasi" <nma at 12000.org>:

> Mathematica experts:
>
> I need a way to tell Mathematica to reverse the default ordering it
> uses for polynomial.
>
> The problem:
>
> I have 2 uni-variants polynomials num(z) and den(z), I can do the
> polynomial num(z)/den(z) long division using the Series command
>
> Series[num/den,{z,0,n}]
>
> Where n is the maximum number of terms I want to see in the long
> division. This is a small example
>
> ---------------
> num = 2 + z;
> den = z^2 + 2*z + 1;
> Normal[Series[num/den, {z, 0, 4}]]
>
> 2 - 3*z + 4*z^2 - 5*z^3 + 6*z^4
> ----------------
>
> But due to Mathematica default ordering of polynomial, which is from
> low to high degree, the above is long division done as follows, when
> done by hand:
>
>                     +----------
>       1+ 2*z + z^2  | 2 + z
>      ---------------+
>
> What I want is to do the long division as follows
>
>                     +----------
>       z^2 + 2*z + 1 | z + 2
>      ---------------+
>
> Which, when done by hand, would result in : z^-1 - z^-3 + 2 z^-4 +....
>
...
> thanks
> --Nasser
>

```

• Prev by Date: How does Mathematica create contour plots (or density plots)?
• Next by Date: Tabulating expressions dependent on two variables
• Previous by thread: Re: How does Mathematica create contour plots (or density plots)?
• Next by thread: Re: polynomial long division using Series[] and changing polynomial