[Mathematica] Sorting polynomial terms

Click For Summary

Discussion Overview

The discussion revolves around sorting polynomial terms in a series expansion using Mathematica. Participants explore methods to arrange terms in increasing powers of the exponent, particularly in the context of a series expansion around a specific point.

Discussion Character

  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant requests clarification on how to sort a series in Mathematica to achieve a specific order of terms.
  • Another participant suggests expanding the series around infinity, though it is unclear if this will yield the desired sorting.
  • A participant expresses confusion regarding the output of Mathematica, noting that it reports the series in increasing powers of 1/z as expected.
  • One participant shares a code snippet using TraditionalForm to display the series, indicating it meets their needs.
  • Another participant provides an alternative method for generating the series expansion around infinity.

Areas of Agreement / Disagreement

Participants express differing views on the best approach to achieve the desired sorting of terms, with no consensus reached on a single method.

Contextual Notes

Some limitations may include the dependence on the definitions of series expansion and the specific context of the function being analyzed.

jackmell
Messages
1,806
Reaction score
54
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

produces
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}

I would like them to be

1-\frac{1}{2z}-\frac{1}{8z^2}-\cdots

Thanks,
Jack
 
Physics news on Phys.org
You can make a series around \infty. I don't know if that will appear sorted the way you want.
 
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:
myseries = Normal[Series[Sqrt[1 - w], {w, 0, 5}]] /. w -> 1/z;
TraditionalForm[myseries]
 
Series[Sqrt[1 - w] /. w -> 1/z, {z, \[Infinity], 5}]
 
Ok, thanks guys. TraditionalForm does what I wanted.
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
6
Views
2K
Replies
12
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K