Re: Convert expression to polynomial
- To: mathgroup at smc.vnet.net
- Subject: [mg70412] Re: Convert expression to polynomial
- From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
- Date: Mon, 16 Oct 2006 02:33:57 -0400 (EDT)
- Organization: The Open University, Milton Keynes, UK
- References: <egsd96$cj7$1@smc.vnet.net>
Diana wrote: > Math folks, > > I am generating a list of partial sums which look like: > > x = 1 + (-t + t^2)^(-1) + 1/((-t + t^2)^2*(-t + t^4)) + 1/((-t + > t^2)^4*(-t + t^4)^2*(-t + t^8)) > > I then try to calculate the PolynomialQuotient[Numerator[x], > Denominator[x], t], etc., and I get an error saying that x is not a > polynomial function. > > I tried to find the command to put everything over a common > denominator, but was unable to find this. Can someone help? > > Thanks, > > Diana M. > Hi Diana, Use the built-in function Together [1]. In[1]:= x = 1 + (-t + t^2)^(-1) + 1/((-t + t^2)^2*(-t + t^4)) + 1/((-t + t^2)^4*(-t + t^4)^2*(-t + t^8)) Out[1]= 1 1 1 + ------- + -------------------- + 2 2 2 4 -t + t (-t + t ) (-t + t ) 1 ------------------------------- 2 4 4 2 8 (-t + t ) (-t + t ) (-t + t ) In[2]:= Together[x] Out[2]= 4 5 6 7 8 9 (1 + t - 2 t + 2 t - 5 t + 9 t - 10 t + 10 11 12 13 14 12 t - 16 t + 17 t - 14 t + 14 t - 15 16 17 18 19 16 t + 14 t - 13 t + 15 t - 15 t + 20 21 22 23 24 12 t - 9 t + 7 t - 4 t + t ) / 7 7 2 2 ((-1 + t) t (1 + t + t ) 2 3 4 5 6 (1 + t + t + t + t + t + t )) In[3]:= PolynomialQuotient[Numerator[Together[x]], Denominator[Together[x]], t] Out[3]= 1 Regards, Jean-Marc [1] http://documents.wolfram.com/mathematica/functions/Together