MultivariatePowerSeries
SetDisplayStyle
set display style for a particular power series or a Puiseux series or univariate polynomial over power series
SetDefaultDisplayStyle
set global display style for power series or Puiseux series and univariate polynomial over power series
Calling Sequence
Parameters
Description
Examples
Compatibility
SetDisplayStyle(p, d)
SetDisplayStyle(s, d)
SetDisplayStyle(u, d)
SetDefaultDisplayStyle(d)
p
-
power series generated by this package
s
Puiseux series generated by this package
u
univariate polynomial over power series generated by this package
d
list of equation(s) of the form option = value where option can be maxterms, precision, or maxdegree, and value is either a non-negative integer or infinity
Whenever a power series or a Puiseux series or univariate polynomial over power series is displayed, whether simply as the result of a computation or by an explicit call to the Display command, Maple uses some parameters to determine which terms to show and which terms to elide. These parameters and their settings are called a display style.
Display style settings can come from four different sources.
When calling the Display command, you can specify a display style explicitly. This overrides all other settings.
If no display style is specified, or when displaying the result of a computation without a call to Display, Maple uses the display style set for the specific power series or a Puiseux series or univariate polynomial over power series that is to be displayed, if any is set. This is done with the SetDisplayStyle command, as explained below.
Otherwise, Maple uses the style last set using the SetDefaultDisplayStyle command, if any. This, too, is explained below.
Finally, if no display style is set, Maple uses its default values, described together with the individual parameters below.
If some parameters are specified in a display style d1 that is overridden by a different display style d2, then Maple completely ignores d1. Any parameters that are not set in d1 will get their default values.
When displaying a computation result or calling Display, the display style can only limit the terms displayed. It will never cause extra terms to be computed.
Details of the calling sequences
SetDisplayStyle(p, d) sets the display style of the power series p with the settings given by the list d. The argument d is a list of zero or more equations of the form maxterms=n or precision=n, where n is either a non-negative integer or the symbol infinity.
SetDisplayStyle(s, d) sets the display style of the Puiseux series s with the settings given by the list d. The argument d is a list of zero or more equations of the form maxterms=n or precision=n, where n is either a non-negative integer or the symbol infinity.
SetDisplayStyle(u, d) sets the display style of the univariate polynomial over power series u with the settings given by the list d. The argument d can take the same entries as for SetDisplayStyle(p, d), but additionally, the option maxdegree=n can be used.
SetDefaultDisplayStyle(d) sets the default display style for all power series and univariate polynomials over power series. In this case d can specify all three options: maxterms, precision, and maxdegree. Only the first two are applied to power series; all three are applied to univariate polynomials over power series.
The parameters making up a display style
maxterms (default value: 50)
Applicable to power series, Puiseux series, and univariate polynomials over power series and over Puiseux series.
This parameter sets the maximum number of terms to be displayed. For a power series or Puiseux series, this is straightforward. For a univariate polynomial over power series or over Puiseux series, the terms in each of the coefficients (which are power series or Puiseux series) are counted.
precision (default value: infinity)
This parameter limits the precision, that is, the homogeneous degree of terms to be displayed. Again, for a power series this is straightforward. For a Puiseux series, it limits the degree of the internal power series of the Puiseux series. For a univariate polynomial over power series or over Puiseux series, the degree in the main variable is not counted, only the degrees in the coefficients.
maxdegree (default value: infinity)
Applicable to univariate polynomials over power series and over Puiseux series only, not to power series or to Puiseux series.
This parameter limits the degree of the main variable for displayed terms. If the degree of the univariate polynomial over power series or over Puiseux series in its main variable is greater than the specified value, then the rest is elided.
When using the MultivariatePowerSeries package, do not assign anything to the variables occurring in the power series, Puiseux series, and univariate polynomials over these series. If you do, you may see invalid results.
with⁡MultivariatePowerSeries:
We define two power series and tell Maple to compute their expansion up to homogeneous degree 10.
a≔GeometricSeries⁡x,y
a≔PowⅇrSⅇrⅈⅇs of 11−x−y : 1+x+y+…
UpdatePrecision⁡a,10:
b≔SumOfAllMonomials⁡x
b≔PowⅇrSⅇrⅈⅇs of 11−x : 1+x+…
UpdatePrecision⁡b,10:
If we update the default display style to set the precision to 5, then a and b are displayed using that style.
SetDefaultDisplayStyle⁡precision=5
precision=5
a
PowⅇrSⅇrⅈⅇs of 11−x−y : 1+x+y+x2+2⁢x⁢y+y2+x3+3⁢x2⁢y+3⁢x⁢y2+y3+x4+4⁢x3⁢y+6⁢x2⁢y2+4⁢x⁢y3+y4+x5+5⁢x4⁢y+10⁢x3⁢y2+10⁢x2⁢y3+5⁢x⁢y4+y5+…
Display⁡b
PowⅇrSⅇrⅈⅇs of 11−x : 1+x+x2+x3+x4+x5+…
We can override this for, say, a, by setting its display style differently.
SetDisplayStyle⁡a,maxterms=20
maxterms=20
PowⅇrSⅇrⅈⅇs of 11−x−y : 1+x+y+x2+2⁢x⁢y+y2+x3+3⁢x2⁢y+3⁢x⁢y2+y3+x4+4⁢x3⁢y+6⁢x2⁢y2+4⁢x⁢y3+y4+x5+5⁢x4⁢y+10⁢x3⁢y2+10⁢x2⁢y3+5⁢x⁢y4+…+…
This does not affect the display of b.
b
If we specify a display style in a Display call, that overrides the display style set in a.
Display⁡a,maxterms=10
PowⅇrSⅇrⅈⅇs of 11−x−y : 1+x+y+x2+2⁢x⁢y+y2+x3+3⁢x2⁢y+3⁢x⁢y2+y3+…
We also define a univariate polynomial over power series and ensure each coefficient is known to precision 10.
f≔UnivariatePolynomialOverPowerSeries⁡GeometricSeries⁡x,PowerSeries⁡1+x+y,GeometricSeries⁡x,y,z
f≔UnⅈvarⅈatⅇPolynomⅈalOvⅇrPowⅇrSⅇrⅈⅇs: 1+x+…+1+x+y⁢z+1+x+y+…⁢z2
UpdatePrecision⁡f,10:
The default display is as follows.
f
UnⅈvarⅈatⅇPolynomⅈalOvⅇrPowⅇrSⅇrⅈⅇs: 1+x+x2+x3+x4+x5+…+1+x+y⁢z+1+x+y+x2+2⁢x⁢y+y2+x3+3⁢x2⁢y+3⁢x⁢y2+y3+x4+4⁢x3⁢y+6⁢x2⁢y2+4⁢x⁢y3+y4+x5+5⁢x4⁢y+10⁢x3⁢y2+10⁢x2⁢y3+5⁢x⁢y4+y5+…⁢z2
If we are only interested in terms of f that are at most linear in the main variable, we can use the maxdegree parameter.
SetDisplayStyle⁡f,maxdegree=1
maxdegree=1
UnⅈvarⅈatⅇPolynomⅈalOvⅇrPowⅇrSⅇrⅈⅇs: 1+x+x2+x3+x4+x5+…+1+x+y⁢z+…
The MultivariatePowerSeries[SetDisplayStyle] and MultivariatePowerSeries[SetDefaultDisplayStyle] commands were introduced in Maple 2021.
For more information on Maple 2021 changes, see Updates in Maple 2021.
The MultivariatePowerSeries[SetDisplayStyle] and MultivariatePowerSeries[SetDefaultDisplayStyle] commands were updated in Maple 2023.
See Also
Display
GeometricSeries
HomogeneousPart
MainVariable
PowerSeries
PuiseuxSeries
UnivariatePolynomialOverPowerSeries
Download Help Document