Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

[Mathematica] Sorting polynomial terms

  1. Dec 4, 2011 #1
    Hi. Can someone explain to me how to sort a Series so that the terms are in increasing powers of the exponent? For example the code:

    myseries = Normal[ Series[Sqrt[1 - w], {w, 0, 5}]] /. w -> 1/z

    [tex]1-\frac{7}{256 z^5}-\frac{5}{128 z^4}-\frac{1}{16 z^3}-\frac{1}{8 z^2}-\frac{1}{2 z}[/tex]

    I would like them to be


  2. jcsd
  3. Dec 4, 2011 #2


    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    You can make a series around [itex]\infty[/itex]. I don't know if that will appear sorted the way you want.
  4. Dec 4, 2011 #3
    Sorry. I'm afraid I'm having some problems with this. The series is being reported by Mathematica in increasing powers of 1/z like it should and like I'd want it to be.

    Thanks Hurky for suggesting expanding it around infinity which is what I'd want for the function outside the unit circle.
    Last edited: Dec 4, 2011
  5. Dec 4, 2011 #4
    myseries = Normal[Series[Sqrt[1 - w], {w, 0, 5}]] /. w -> 1/z;
  6. Dec 4, 2011 #5


    User Avatar
    Gold Member

    Series[Sqrt[1 - w] /. w -> 1/z, {z, \[Infinity], 5}]
  7. Dec 5, 2011 #6
    Ok, thanks guys. TraditionalForm does what I wanted.
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Similar Threads - Mathematica Sorting polynomial Date
Mathematica Cannot do the integral of the Hyper-geometric function? Mar 11, 2018
Mathematica Cannot Plot This Function in Mathematica Feb 26, 2018
Mathematica While Loop in Mathematica Feb 25, 2018
Mathematica - sorting NSolve solutions Feb 24, 2011
Functions in Mathematica - sort function Jan 14, 2010