Package Details - Maple Help

Details of the Groebner Package

 Calling Sequence Groebner[command](arguments) command(arguments)

Description

 • This page contains complete information about the Groebner package, with the exception of computations of Groebner bases for modules, for which users are referred to Groebner Bases for Modules.  For basic information on the Groebner package, see the Groebner help page.
 • The Groebner package is a collection of commands for doing Groebner basis calculations in skew algebras like Weyl and Ore algebras and in corresponding modules like D-modules.  It can also be used in the case of usual commutative polynomials.
 • Whereas in the commutative case the ideals (respectively modules) are two-sided, in the skew case we focus on left-sided ideal (respectively modules).  This corresponds to skew polynomials acting on functions on the left.
 • Each command in the Groebner package can be accessed by using either the long form or the short form of the command name in the command calling sequence.

List of Groebner Package Commands

 • The following is a list of available commands.

 • To display the help page for a particular Groebner command, see Getting Help with a Command in a Package.
 • These commands make Groebner basis calculations and related facilities available in commutative algebras of polynomials and in skew algebras. For details, see Ore_algebra[poly_algebra], Ore_algebra[Weyl_algebra], and Ore_algebra. Such calculations are also available in the case of algebraic and modular coefficients.  For the case of modules, see Computing Groebner Bases for Modules.
 • The MonomialOrder command declares a monomial order on an algebra and returns a table that describes it.  This table is needed by other commands in the package. Alternatively, a short monomial order description can be used in simple cases (see type(...,ShortMonomialOrder)). The TestOrder command checks if two monomials are in a given monomial order.  Many predefined monomial orderings are available, including total degree, lexicographic, elimination, and matrix-defined orderings.
 • The NormalForm command computes the normal form of a polynomial modulo an ideal.  The command Reduce returns the pseudo-remainder of a polynomial in the division by a list of polynomials.  The InterReduce command inter-reduces a list of polynomials.  Both the NormalForm and Reduce commands are usually used after a (reduced) Groebner basis has been computed.
 • The Basis command computes a (reduced) Groebner bases either in an algebra of skew polynomials (an Ore algebra) or in an algebra of usual polynomials.  It also computes Groebner bases for modules over (usual or skew) polynomial rings.  The RememberBasis command makes a Groebner basis known to the system without performing any computation.
 • In the commutative case, the Solve command preprocesses a set of generators in view of solving.
 • The SPolynomial command computes the S-polynomial of two polynomials.
 • The UnivariatePolynomial command finds univariate polynomials of least degree in a polynomial ideal.
 • The MultivariateCyclicVector command is a general-purpose and parametrizable iteration algorithm based on idea behind the FGLM algorithm.
 • The commands IsZeroDimensional and IsProper decide whether an ideal has finitely many solutions, or at least one solution, respectively.
 • The commands HilbertDimension, HilbertPolynomial, and HilbertSeries compute the Hilbert dimension, Hilbert polynomial, and Hilbert series of an ideal, respectively.
 • A typical Groebner basis computation is one of the following.
 1. Define the appropriate algebra with one of: Ore_algebra[poly_algebra], Ore_algebra[diff_algebra], Ore_algebra[shift_algebra], Ore_algebra[qshift_algebra], or Ore_algebra[skew_algebra].
 2. Define the appropriate monomial order on the algebra with Groebner[MonomialOrder].
 3. Call Groebner[Basis], or in simple cases call Groebner[Basis] with the short syntax.
 • A typical test of membership in an ideal is:
 1. Perform a Groebner basis computation to find a Groebner basis of the ideal (usually with tdeg);
 2. Call Groebner[Reduce] to test whether it returns zero.
 • A typical use of Groebner bases for elimination is:
 1. Compute a Groebner basis with respect to an elimination monomial order (with the lexdeg syntax);
 2. Select those polynomials in which the indeterminate to be eliminated has disappeared.
 Note: Elimination of a single indeterminate between two polynomials can also be performed using Ore_algebra[skew_elim].
 • When relevant, most commands of the Groebner package accept algebraic numbers and algebraic functions denoted by I, radicals, or RootOfs in their the inputs. Exceptions are Groebner[MultiplicationMatrix], Groebner[NormalSet], and Groebner[Solve]. Also when relevant, they accept PolynomialIdeal data structures in their input.
 • You can use the Groebner package in conjunction with the PolynomialIdeals package.
 Note: Both packages have the following exports of the same name and almost identical functionality: HilbertDimension, IsProper, IsZeroDimensional, and UnivariatePolynomial. After loading both packages using with, these names refer to the corresponding exports of the most recently loaded package, but you can still access the exports with the same name in the other package using the long form, that is, by prepending the package name.

Examples

Short Versus General Syntax for Term Orders

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

Simple Groebner basis calculation using the short syntax:

 > $G≔\mathrm{map}\left(\mathrm{numer},\left[\frac{{s}^{2}}{2s+1}{x}^{2}y-\left(s+1\right)y,\frac{3s-1}{3}x{y}^{2}-\frac{1}{s-1}x\right]\right):$
 > $\mathrm{Basis}\left(G,\mathrm{tdeg}\left(x,y\right)\right)$
 $\left[{3}{}{{s}}^{{2}}{}{{x}}^{{2}}{+}\left({-}{6}{}{{s}}^{{4}}{-}{{s}}^{{3}}{+}{7}{}{{s}}^{{2}}{+}{s}{-}{1}\right){}{{y}}^{{2}}{,}\left({3}{}{{s}}^{{2}}{-}{4}{}{s}{+}{1}\right){}{{y}}^{{3}}{-}{3}{}{y}{,}\left({3}{}{{s}}^{{2}}{-}{4}{}{s}{+}{1}\right){}{x}{}{{y}}^{{2}}{-}{3}{}{x}\right]$ (1)

More complicated one using the general syntax:

 > $\mathrm{with}\left(\mathrm{Ore_algebra}\right):$
 > $A≔\mathrm{poly_algebra}\left(s,x,y,\mathrm{characteristic}=3,\mathrm{rational}=s\right):$
 > $T≔\mathrm{MonomialOrder}\left(A,\mathrm{tdeg}\left(x,y\right)\right):$
 > $\mathrm{Basis}\left(G,T\right)$
 $\left[{{y}}^{{2}}{,}{{s}}^{{2}}{}{{x}}^{{2}}{}{y}{+}{{s}}^{{2}}{}{y}{+}{2}{}{y}\right]$ (2)

Lauricella Functions and Partial Differential Systems

The following example deals with Lauricella functions. It illustrates Groebner basis computation in D-modules with parameters in the ground field.

 > $n≔2:$
 > $S≔\mathrm{add}\left(x\left[i\right]\mathrm{D}\left[i\right],i=1..n\right)$
 ${S}{≔}{{x}}_{{1}}{}{{\mathrm{D}}}_{{1}}{+}{{x}}_{{2}}{}{{\mathrm{D}}}_{{2}}$ (3)
 > $A≔\mathrm{skew_algebra}\left(\mathrm{comm}=\left\{a,b,\mathrm{seq}\left(c\left[i\right],i=1..n\right)\right\},\mathrm{seq}\left(\mathrm{diff}=\left[\mathrm{D}\left[i\right],x\left[i\right]\right],i=1..n\right),\mathrm{polynom}=\left\{\mathrm{seq}\left(x\left[i\right],i=1..n\right)\right\}\right):$
 > $P≔\mathrm{skew_product}\left(S+a,S+b,A\right)$
 ${P}{≔}{{\mathrm{D}}}_{{1}}^{{2}}{}{{x}}_{{1}}^{{2}}{+}{2}{}{{\mathrm{D}}}_{{1}}{}{{\mathrm{D}}}_{{2}}{}{{x}}_{{1}}{}{{x}}_{{2}}{+}\left({a}{+}{b}{+}{1}\right){}{{x}}_{{1}}{}{{\mathrm{D}}}_{{1}}{+}{{\mathrm{D}}}_{{2}}^{{2}}{}{{x}}_{{2}}^{{2}}{+}\left({a}{+}{b}{+}{1}\right){}{{x}}_{{2}}{}{{\mathrm{D}}}_{{2}}{+}{a}{}{b}$ (4)

The following operators introduce $n$ other parameters.

 > $\mathbf{for}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}i\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{to}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}n\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{do}\phantom{\rule[-0.0ex]{0.0em}{0.0ex}}\phantom{\rule[-0.0ex]{2.0em}{0.0ex}}l\left[i\right]≔\mathrm{skew_product}\left(\mathrm{D}\left[i\right],x\left[i\right]\mathrm{D}\left[i\right]+c\left[i\right]-1,A\right)-P\phantom{\rule[-0.0ex]{0.0em}{0.0ex}}\mathbf{end}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{do}$
 ${{l}}_{{1}}{≔}{{\mathrm{D}}}_{{1}}^{{2}}{}{{x}}_{{1}}{+}{{\mathrm{D}}}_{{1}}{}{{c}}_{{1}}{-}{{\mathrm{D}}}_{{1}}^{{2}}{}{{x}}_{{1}}^{{2}}{-}{2}{}{{\mathrm{D}}}_{{1}}{}{{\mathrm{D}}}_{{2}}{}{{x}}_{{1}}{}{{x}}_{{2}}{-}\left({a}{+}{b}{+}{1}\right){}{{x}}_{{1}}{}{{\mathrm{D}}}_{{1}}{-}{{\mathrm{D}}}_{{2}}^{{2}}{}{{x}}_{{2}}^{{2}}{-}\left({a}{+}{b}{+}{1}\right){}{{x}}_{{2}}{}{{\mathrm{D}}}_{{2}}{-}{a}{}{b}$
 ${{l}}_{{2}}{≔}{{\mathrm{D}}}_{{2}}^{{2}}{}{{x}}_{{2}}{+}{{\mathrm{D}}}_{{2}}{}{{c}}_{{2}}{-}{{\mathrm{D}}}_{{1}}^{{2}}{}{{x}}_{{1}}^{{2}}{-}{2}{}{{\mathrm{D}}}_{{1}}{}{{\mathrm{D}}}_{{2}}{}{{x}}_{{1}}{}{{x}}_{{2}}{-}\left({a}{+}{b}{+}{1}\right){}{{x}}_{{1}}{}{{\mathrm{D}}}_{{1}}{-}{{\mathrm{D}}}_{{2}}^{{2}}{}{{x}}_{{2}}^{{2}}{-}\left({a}{+}{b}{+}{1}\right){}{{x}}_{{2}}{}{{\mathrm{D}}}_{{2}}{-}{a}{}{b}$ (5)
 > $M≔\mathrm{MonomialOrder}\left(A,\mathrm{lexdeg}\left(\left[\mathrm{seq}\left(\mathrm{D}\left[i\right],i=1..n\right)\right],\left[\mathrm{seq}\left(x\left[i\right],i=1..n\right)\right]\right)\right):$

The result is a third-order differential system of four equations.

 > $\mathrm{Basis}\left(\left[\mathrm{seq}\left(l\left[i\right],i=1..n\right)\right],M\right)$
 $\left[{2}{}{{\mathrm{D}}}_{{1}}{}{{\mathrm{D}}}_{{2}}{}{{x}}_{{1}}{}{{x}}_{{2}}{+}{{\mathrm{D}}}_{{2}}^{{2}}{}{{x}}_{{1}}{}{{x}}_{{2}}{+}{{\mathrm{D}}}_{{2}}^{{2}}{}{{x}}_{{2}}^{{2}}{+}{a}{}{{\mathrm{D}}}_{{1}}{}{{x}}_{{1}}{+}{a}{}{{\mathrm{D}}}_{{2}}{}{{x}}_{{2}}{+}{b}{}{{\mathrm{D}}}_{{1}}{}{{x}}_{{1}}{+}{b}{}{{\mathrm{D}}}_{{2}}{}{{x}}_{{2}}{-}{{\mathrm{D}}}_{{1}}{}{{c}}_{{1}}{}{{x}}_{{1}}{-}{{\mathrm{D}}}_{{2}}^{{2}}{}{{x}}_{{2}}{+}{{\mathrm{D}}}_{{2}}{}{{c}}_{{2}}{}{{x}}_{{1}}{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{}{{\mathrm{D}}}_{{1}}{}{{\mathrm{D}}}_{{2}}{}{{c}}_{{2}}{-}{3}{}{{\mathrm{D}}}_{{1}}{}{{\mathrm{D}}}_{{2}}{}{{x}}_{{1}}{+}{6}{}{{\mathrm{D}}}_{{1}}{}{{\mathrm{D}}}_{{2}}{}{{x}}_{{2}}{+}{2}{}{{\mathrm{D}}}_{{1}}{}{{c}}_{{1}}^{{2}}{+}{{\mathrm{D}}}_{{2}}^{{2}}{}{{c}}_{{2}}{-}{{\mathrm{D}}}_{{2}}^{{2}}{}{{x}}_{{1}}{+}{5}{}{{\mathrm{D}}}_{{2}}^{{2}}{}{{x}}_{{2}}{-}{2}{}{{\mathrm{D}}}_{{2}}{}{{c}}_{{1}}{}{{c}}_{{2}}{+}{2}{}{a}{}{{\mathrm{D}}}_{{1}}{-}{a}{}{{\mathrm{D}}}_{{2}}{+}{2}{}{b}{}{{\mathrm{D}}}_{{1}}{-}{b}{}{{\mathrm{D}}}_{{2}}{-}{4}{}{{\mathrm{D}}}_{{1}}{}{{c}}_{{1}}{+}{{\mathrm{D}}}_{{2}}^{{2}}{+}{4}{}{{\mathrm{D}}}_{{2}}{}{{c}}_{{2}}{+}{2}{}{{\mathrm{D}}}_{{1}}{-}{{\mathrm{D}}}_{{2}}\right]$ (6)

Legendre Polynomials and Differential-Difference Linear Systems

The following example deals with Legendre polynomials: from a differential equation and a mixed differential-difference equation that define them, elimination of $\mathrm{Dx}$ yields a difference equation that vanishes on them.

 > $\mathrm{unassign}\left('n','P'\right):$
 > $\mathrm{DE}≔\left(1-{x}^{2}\right){\mathrm{Dx}}^{2}-2x\mathrm{Dx}+n\left(n+1\right)$
 ${\mathrm{DE}}{≔}\left({-}{{x}}^{{2}}{+}{1}\right){}{{\mathrm{Dx}}}^{{2}}{-}{2}{}{x}{}{\mathrm{Dx}}{+}{n}{}\left({n}{+}{1}\right)$ (7)
 > $\mathrm{RDE}≔\left(1-{x}^{2}\right)\mathrm{Dx}\mathrm{Sn}+\left(n+1\right)x\mathrm{Sn}-\left(n+1\right)$
 ${\mathrm{RDE}}{≔}\left({-}{{x}}^{{2}}{+}{1}\right){}{\mathrm{Dx}}{}{\mathrm{Sn}}{+}\left({n}{+}{1}\right){}{x}{}{\mathrm{Sn}}{-}{n}{-}{1}$ (8)
 > $\mathrm{with}\left(\mathrm{Ore_algebra}\right):$
 > $A≔\mathrm{skew_algebra}\left(\mathrm{diff}=\left[\mathrm{Dx},x\right],\mathrm{shift}=\left[\mathrm{Sn},n\right],\mathrm{polynom}=\left\{n,x\right\}\right):$
 > $\mathrm{with}\left(\mathrm{Groebner}\right):$
 > $M≔\mathrm{MonomialOrder}\left(A,\mathrm{lexdeg}\left(\left[\mathrm{Dx}\right],\left[n,x,\mathrm{Sn}\right]\right)\right):$
 > $G≔\mathrm{Basis}\left(\left[\mathrm{DE},\mathrm{RDE}\right],M\right)$
 ${G}{≔}\left[{-}{{\mathrm{Sn}}}^{{2}}{}{{n}}^{{2}}{+}{2}{}{\mathrm{Sn}}{}{{n}}^{{2}}{}{x}{-}{4}{}{{\mathrm{Sn}}}^{{2}}{}{n}{+}{7}{}{x}{}{\mathrm{Sn}}{}{n}{-}{4}{}{{\mathrm{Sn}}}^{{2}}{+}{6}{}{x}{}{\mathrm{Sn}}{-}{{n}}^{{2}}{-}{3}{}{n}{-}{2}{,}{-}{\mathrm{Dx}}{}{\mathrm{Sn}}{}{n}{+}{\mathrm{Dx}}{}{n}{}{x}{-}{\mathrm{Dx}}{}{\mathrm{Sn}}{+}{x}{}{\mathrm{Dx}}{+}{{n}}^{{2}}{+}{2}{}{n}{+}{1}{,}{\mathrm{Dx}}{}{{\mathrm{Sn}}}^{{2}}{}{n}{+}{2}{}{\mathrm{Dx}}{}{{\mathrm{Sn}}}^{{2}}{-}{\mathrm{Dx}}{}{\mathrm{Sn}}{}{x}{-}{2}{}{\mathrm{Sn}}{}{{n}}^{{2}}{-}{\mathrm{Dx}}{}{n}{-}{6}{}{\mathrm{Sn}}{}{n}{-}{\mathrm{Dx}}{-}{5}{}{\mathrm{Sn}}{,}{\mathrm{Dx}}{}{\mathrm{Sn}}{}{{x}}^{{2}}{-}{x}{}{\mathrm{Sn}}{}{n}{-}{\mathrm{Dx}}{}{\mathrm{Sn}}{-}{x}{}{\mathrm{Sn}}{+}{n}{+}{1}{,}{{\mathrm{Dx}}}^{{2}}{}{{x}}^{{2}}{-}{{\mathrm{Dx}}}^{{2}}{+}{2}{}{x}{}{\mathrm{Dx}}{-}{{n}}^{{2}}{-}{n}\right]$ (9)

Continuing this application, we derive a proof that Legendre polynomials satisfy

 > $\mathrm{Sum}\left(\mathrm{orthopoly}\left[P\right]\left(n,z\right){u}^{n},n=0..\mathrm{\infty }\right)=\frac{1}{\mathrm{sqrt}\left(1-2zu+{u}^{2}\right)}$
 ${\sum }_{{n}{=}{0}}^{{\mathrm{\infty }}}{}{\mathrm{orthopoly}}\left[{P}\right]{}\left({n}{,}{z}\right){}{{u}}^{{n}}{=}\frac{{1}}{\sqrt{{{u}}^{{2}}{-}{2}{}{z}{}{u}{+}{1}}}$ (10)

Indeed, it follows that the summand $\mathrm{orthopoly}\left[P\right]\left(n,z\right){u}^{n}$ in the identity that we want to prove satisfies

 > $G≔\mathrm{map}\left(\mathrm{numer}@\mathrm{normal},\mathrm{eval}\left(\mathrm{convert}\left(G,\mathrm{set}\right),\mathrm{Sn}=\frac{\mathrm{Sn}}{u}\right)\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{union}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\left\{u\mathrm{Du}-n\right\}$
 ${G}{≔}\left\{{u}{}{\mathrm{Du}}{-}{n}{,}{{\mathrm{Dx}}}^{{2}}{}{{x}}^{{2}}{-}{{\mathrm{Dx}}}^{{2}}{+}{2}{}{x}{}{\mathrm{Dx}}{-}{{n}}^{{2}}{-}{n}{,}{\mathrm{Dx}}{}{\mathrm{Sn}}{}{{x}}^{{2}}{-}{x}{}{\mathrm{Sn}}{}{n}{-}{\mathrm{Dx}}{}{\mathrm{Sn}}{-}{x}{}{\mathrm{Sn}}{+}{n}{}{u}{+}{u}{,}{\mathrm{Dx}}{}{n}{}{x}{}{u}{-}{\mathrm{Dx}}{}{\mathrm{Sn}}{}{n}{+}{x}{}{\mathrm{Dx}}{}{u}{+}{{n}}^{{2}}{}{u}{-}{\mathrm{Dx}}{}{\mathrm{Sn}}{+}{2}{}{n}{}{u}{+}{u}{,}{\mathrm{Dx}}{}{{\mathrm{Sn}}}^{{2}}{}{n}{-}{\mathrm{Dx}}{}{\mathrm{Sn}}{}{x}{}{u}{-}{\mathrm{Dx}}{}{n}{}{{u}}^{{2}}{-}{2}{}{\mathrm{Sn}}{}{{n}}^{{2}}{}{u}{+}{2}{}{\mathrm{Dx}}{}{{\mathrm{Sn}}}^{{2}}{-}{\mathrm{Dx}}{}{{u}}^{{2}}{-}{6}{}{\mathrm{Sn}}{}{n}{}{u}{-}{5}{}{\mathrm{Sn}}{}{u}{,}{2}{}{\mathrm{Sn}}{}{{n}}^{{2}}{}{x}{}{u}{-}{{\mathrm{Sn}}}^{{2}}{}{{n}}^{{2}}{+}{7}{}{x}{}{\mathrm{Sn}}{}{n}{}{u}{-}{{n}}^{{2}}{}{{u}}^{{2}}{-}{4}{}{{\mathrm{Sn}}}^{{2}}{}{n}{+}{6}{}{x}{}{\mathrm{Sn}}{}{u}{-}{3}{}{n}{}{{u}}^{{2}}{-}{4}{}{{\mathrm{Sn}}}^{{2}}{-}{2}{}{{u}}^{{2}}\right\}$ (11)

in the new algebra $C\left(z,u\right)\left[n\right]\left[\mathrm{Dz},\mathrm{Du},\mathrm{Sn}\right]$. (Since the index of summation is $n$, we consider polynomials in this variable to allow for its elimination.)

 > $\mathrm{with}\left(\mathrm{Ore_algebra}\right)$
 $\left[{\mathrm{Ore_to_DESol}}{,}{\mathrm{Ore_to_RESol}}{,}{\mathrm{Ore_to_diff}}{,}{\mathrm{Ore_to_shift}}{,}{\mathrm{annihilators}}{,}{\mathrm{applyopr}}{,}{\mathrm{diff_algebra}}{,}{\mathrm{dual_algebra}}{,}{\mathrm{dual_polynomial}}{,}{\mathrm{poly_algebra}}{,}{\mathrm{qshift_algebra}}{,}{\mathrm{rand_skew_poly}}{,}{\mathrm{reverse_algebra}}{,}{\mathrm{reverse_polynomial}}{,}{\mathrm{shift_algebra}}{,}{\mathrm{skew_algebra}}{,}{\mathrm{skew_elim}}{,}{\mathrm{skew_gcdex}}{,}{\mathrm{skew_pdiv}}{,}{\mathrm{skew_power}}{,}{\mathrm{skew_prem}}{,}{\mathrm{skew_product}}\right]$ (12)
 > $A≔\mathrm{skew_algebra}\left(\mathrm{diff}=\left[\mathrm{Dx},x\right],\mathrm{diff}=\left[\mathrm{Du},u\right],\mathrm{shift}=\left[\mathrm{Sn},n\right],\mathrm{polynom}=n\right):$
 > $M≔\mathrm{MonomialOrder}\left(A,\mathrm{lexdeg}\left(\left[n\right],\left[\mathrm{Dx},\mathrm{Du},\mathrm{Sn}\right]\right)\right):$
 > $\mathrm{GB}≔\mathrm{Basis}\left(G,M\right)$
 ${\mathrm{GB}}{≔}\left[{-}{u}{}{x}{}{\mathrm{Du}}{}{\mathrm{Sn}}{+}{\mathrm{Dx}}{}{\mathrm{Sn}}{}{{x}}^{{2}}{+}{{u}}^{{2}}{}{\mathrm{Du}}{-}{\mathrm{Dx}}{}{\mathrm{Sn}}{+}{u}{,}{-}{{u}}^{{2}}{}{{\mathrm{Du}}}^{{2}}{+}{{\mathrm{Dx}}}^{{2}}{}{{x}}^{{2}}{-}{2}{}{u}{}{\mathrm{Du}}{-}{{\mathrm{Dx}}}^{{2}}{+}{2}{}{x}{}{\mathrm{Dx}}{,}{-}{{\mathrm{Du}}}^{{2}}{}{{u}}^{{2}}{}{x}{-}{\mathrm{Du}}{}{\mathrm{Dx}}{}{u}{}{{x}}^{{2}}{+}{u}{}{{\mathrm{Du}}}^{{2}}{}{\mathrm{Sn}}{+}{u}{}{\mathrm{Dx}}{}{\mathrm{Du}}{-}{3}{}{\mathrm{Du}}{}{u}{}{x}{-}{\mathrm{Dx}}{}{{x}}^{{2}}{+}{\mathrm{Du}}{}{\mathrm{Sn}}{+}{\mathrm{Dx}}{-}{x}{,}{-}{u}{}{\mathrm{Du}}{+}{n}\right]$ (13)

The previous equations are satisfied by the summand. Setting $\mathrm{Sn}=1$ in them yields equations satisfied by the sum.  A final Groebner basis calculation returns these equations:

 > $\mathrm{GB}≔\mathrm{Basis}\left(\mathrm{eval}\left(\mathrm{remove}\left(\mathrm{has},\mathrm{GB},n\right),\mathrm{Sn}=1\right),M\right):$
 > $\mathrm{collect}\left(\mathrm{GB},\left\{\mathrm{Du},\mathrm{Dx}\right\},\mathrm{distributed},\mathrm{factor}\right)$
 $\left[\left({u}{-}{x}\right){}{u}{}{\mathrm{Du}}{+}\left({x}{-}{1}\right){}\left({x}{+}{1}\right){}{\mathrm{Dx}}{+}{u}{,}{u}{}\left({{u}}^{{2}}{-}{2}{}{u}{}{x}{+}{1}\right){}{{\mathrm{Du}}}^{{2}}{+}\left({4}{}{{u}}^{{2}}{-}{5}{}{u}{}{x}{+}{1}\right){}{\mathrm{Du}}{+}{2}{}{u}{-}{x}\right]$ (14)

Solving this simple system of PDEs yields the announced closed form.