 MultivariatePowerSeries/SetDisplayStyle - Maple Help

Home : Support : Online Help : MultivariatePowerSeries/SetDisplayStyle

MultivariatePowerSeries

 SetDisplayStyle
 Set display style for a particular power series or univariate polynomial over power series
 SetDefaultDisplayStyle
 Set global display style for power series and univariate polynomial over power series Calling Sequence SetDisplayStyle(p, d) SetDisplayStyle(u, d) SetDefaultDisplayStyle(d) Parameters

 p - power 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 nonnegative integer or infinity Description

 • Whenever a power 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 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 will completely ignore 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 nonnegative 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 and univariate polynomials over power series.
 This parameter sets the maximum number of terms to be displayed. For a power series, this is straightforward. For a univariate polynomial over power series, the terms in each of the coefficients (which are power series) are counted.
 • precision (default value: infinity)
 Applicable to power series and univariate polynomials over power series.
 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 univariate polynomial over power 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 only, not to power series.
 This parameter limits the degree of the main variable for displayed terms. If the degree of the univariate polynomial over power 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 and univariate polynomials over power series. If you do, you may see invalid results. Examples

 > $\mathrm{with}\left(\mathrm{MultivariatePowerSeries}\right):$

We define two power series and tell Maple to compute their expansion up to homogeneous degree 10.

 > $a≔\mathrm{GeometricSeries}\left(\left[x,y\right]\right)$
 ${a}{≔}\left[{PowⅇrSⅇriⅇs of}\frac{{1}}{{1}{-}{x}{-}{y}}{:}{1}{+}{x}{+}{y}{+}{\dots }\right]$ (1)
 > $\mathrm{UpdatePrecision}\left(a,10\right):$
 > $b≔\mathrm{SumOfAllMonomials}\left(\left[x\right]\right)$
 ${b}{≔}\left[{PowⅇrSⅇriⅇs of}\frac{{1}}{{1}{-}{x}}{:}{1}{+}{x}{+}{\dots }\right]$ (2)
 > $\mathrm{UpdatePrecision}\left(b,10\right):$

If we update the default display style to set the precision to 5, then $a$ and $b$ are displayed using that style.

 > $\mathrm{SetDefaultDisplayStyle}\left(\left[\mathrm{precision}=5\right]\right)$
 $\left[{\mathrm{precision}}{=}{5}\right]$ (3)
 > $a$
 $\left[{PowⅇrSⅇriⅇs of}\frac{{1}}{{1}{-}{x}{-}{y}}{:}{1}{+}{x}{+}{y}{+}{{x}}^{{2}}{+}{2}{}{x}{}{y}{+}{{y}}^{{2}}{+}{{x}}^{{3}}{+}{3}{}{{x}}^{{2}}{}{y}{+}{3}{}{x}{}{{y}}^{{2}}{+}{{y}}^{{3}}{+}{{x}}^{{4}}{+}{4}{}{{x}}^{{3}}{}{y}{+}{6}{}{{x}}^{{2}}{}{{y}}^{{2}}{+}{4}{}{x}{}{{y}}^{{3}}{+}{{y}}^{{4}}{+}{{x}}^{{5}}{+}{5}{}{{x}}^{{4}}{}{y}{+}{10}{}{{x}}^{{3}}{}{{y}}^{{2}}{+}{10}{}{{x}}^{{2}}{}{{y}}^{{3}}{+}{5}{}{x}{}{{y}}^{{4}}{+}{{y}}^{{5}}{+}{\dots }\right]$ (4)
 > $\mathrm{Display}\left(b\right)$
 $\left[{PowⅇrSⅇriⅇs of}\frac{{1}}{{1}{-}{x}}{:}{1}{+}{x}{+}{{x}}^{{2}}{+}{{x}}^{{3}}{+}{{x}}^{{4}}{+}{{x}}^{{5}}{+}{\dots }\right]$ (5)

We can override this for, say, $a$, by setting its display style differently.

 > $\mathrm{SetDisplayStyle}\left(a,\left[\mathrm{maxterms}=20\right]\right)$
 $\left[{\mathrm{maxterms}}{=}{20}\right]$ (6)
 > $a$
 $\left[{PowⅇrSⅇriⅇs of}\frac{{1}}{{1}{-}{x}{-}{y}}{:}{1}{+}{x}{+}{y}{+}{{x}}^{{2}}{+}{2}{}{x}{}{y}{+}{{y}}^{{2}}{+}{{x}}^{{3}}{+}{3}{}{{x}}^{{2}}{}{y}{+}{3}{}{x}{}{{y}}^{{2}}{+}{{y}}^{{3}}{+}{{x}}^{{4}}{+}{4}{}{{x}}^{{3}}{}{y}{+}{6}{}{{x}}^{{2}}{}{{y}}^{{2}}{+}{4}{}{x}{}{{y}}^{{3}}{+}{{y}}^{{4}}{+}\left({{x}}^{{5}}{+}{5}{}{{x}}^{{4}}{}{y}{+}{10}{}{{x}}^{{3}}{}{{y}}^{{2}}{+}{10}{}{{x}}^{{2}}{}{{y}}^{{3}}{+}{5}{}{x}{}{{y}}^{{4}}{+}{\dots }\right){+}{\dots }\right]$ (7)

This does not affect the display of $b$.

 > $b$
 $\left[{PowⅇrSⅇriⅇs of}\frac{{1}}{{1}{-}{x}}{:}{1}{+}{x}{+}{{x}}^{{2}}{+}{{x}}^{{3}}{+}{{x}}^{{4}}{+}{{x}}^{{5}}{+}{\dots }\right]$ (8)

If we specify a display style in a Display call, that overrides the display style set in $a$.

 > $\mathrm{Display}\left(a,\left[\mathrm{maxterms}=10\right]\right)$
 $\left[{PowⅇrSⅇriⅇs of}\frac{{1}}{{1}{-}{x}{-}{y}}{:}{1}{+}{x}{+}{y}{+}{{x}}^{{2}}{+}{2}{}{x}{}{y}{+}{{y}}^{{2}}{+}{{x}}^{{3}}{+}{3}{}{{x}}^{{2}}{}{y}{+}{3}{}{x}{}{{y}}^{{2}}{+}{{y}}^{{3}}{+}{\dots }\right]$ (9)

We also define a univariate polynomial over power series and ensure each coefficient is known to precision 10.

 > $f≔\mathrm{UnivariatePolynomialOverPowerSeries}\left(\left[\mathrm{GeometricSeries}\left(x\right),\mathrm{PowerSeries}\left(1+x+y\right),\mathrm{GeometricSeries}\left(\left[x,y\right]\right)\right],z\right)$
 ${f}{≔}\left[{UnivariatⅇPolynomialOvⅇrPowⅇrSⅇriⅇs:}\left({1}{+}{x}{+}{\dots }\right){+}\left({1}{+}{x}{+}{y}\right){}{z}{+}\left({1}{+}{x}{+}{y}{+}{\dots }\right){}{{z}}^{{2}}\right]$ (10)
 > $\mathrm{UpdatePrecision}\left(f,10\right):$

The default display is as follows.

 > $f$
 $\left[{UnivariatⅇPolynomialOvⅇrPowⅇrSⅇriⅇs:}\left({1}{+}{x}{+}{{x}}^{{2}}{+}{{x}}^{{3}}{+}{{x}}^{{4}}{+}{{x}}^{{5}}{+}{\dots }\right){+}\left({1}{+}{x}{+}{y}\right){}{z}{+}\left({1}{+}{x}{+}{y}{+}{{x}}^{{2}}{+}{2}{}{x}{}{y}{+}{{y}}^{{2}}{+}{{x}}^{{3}}{+}{3}{}{{x}}^{{2}}{}{y}{+}{3}{}{x}{}{{y}}^{{2}}{+}{{y}}^{{3}}{+}{{x}}^{{4}}{+}{4}{}{{x}}^{{3}}{}{y}{+}{6}{}{{x}}^{{2}}{}{{y}}^{{2}}{+}{4}{}{x}{}{{y}}^{{3}}{+}{{y}}^{{4}}{+}{{x}}^{{5}}{+}{5}{}{{x}}^{{4}}{}{y}{+}{10}{}{{x}}^{{3}}{}{{y}}^{{2}}{+}{10}{}{{x}}^{{2}}{}{{y}}^{{3}}{+}{5}{}{x}{}{{y}}^{{4}}{+}{{y}}^{{5}}{+}{\dots }\right){}{{z}}^{{2}}\right]$ (11)

If we are only interested in terms of $f$ that are at most linear in the main variable, we can use the maxdegree parameter.

 > $\mathrm{SetDisplayStyle}\left(f,\left[\mathrm{maxdegree}=1\right]\right)$
 $\left[{\mathrm{maxdegree}}{=}{1}\right]$ (12)
 > $f$
 $\left[{UnivariatⅇPolynomialOvⅇrPowⅇrSⅇriⅇs:}\left({1}{+}{x}{+}{{x}}^{{2}}{+}{{x}}^{{3}}{+}{{x}}^{{4}}{+}{{x}}^{{5}}{+}{\dots }\right){+}\left({1}{+}{x}{+}{y}\right){}{z}{+}{\dots }\right]$ (13) Compatibility

 • The MultivariatePowerSeries[SetDisplayStyle] and MultivariatePowerSeries[SetDefaultDisplayStyle] commands were introduced in Maple 2021.
 • For more information on Maple 2021 changes, see Updates in Maple 2021.