|
|
|
last edited 5 years ago by hemmecke |
| 1 2 3 4 5 6 7 8 | ||
|
Editor: hemmecke
Time: 2021/04/04 16:54:23 GMT+0 |
||
| Note: | ||
added:
Note 04-Apr-2021: This page is abandoned, it's new home is
https://fricas.github.io/fricas-notebooks/FriCAS-TaylorSeries.html
Note 04-Apr-2021: This page is abandoned, it's new home is https://fricas.github.io/fricas-notebooks/FriCAS-TaylorSeries.htmlExample for multivariate Taylor series expansion
Univariate TaylorSeries
FriCAS can deal with power series in a simple manner.
fricas(1) -> )version
"FriCAS 1.3.12 compiled at Sat 7 Jun 23:54:49 CEST 2025"fricasx:=taylor 'x\begin{equation} \label{eq1}x\end{equation}fricassinh(x)\begin{equation} \label{eq2}\begin{array}{@{}l} \displaystyle x +{{\frac{1}{6}}\ {{x}^{3}}}+{{\frac{1}{120}}\ {{x}^{5}}}+{{\frac{1}{5 040}}\ {{x}^{7}}}+ \ \ \displaystyle {{\frac{1}{362880}}\ {{x}^{9}}}+{O \left({{x}^{11}}\right)} \end{array} \end{equation}However, sometimes one wants to be more precise with the domain that the object lives in. If, for example, we don't want power series over the general expression domain as exemplified above, we can give the coefficient domain explicitly.
fricasZ ==> IntegerType: VoidfricasQ ==> Fraction ZType: VoidfricasUx ==> UnivariateTaylorSeries(Q,'x, 0) Type: Voidfricasux: Ux := 'x\begin{equation} \label{eq3}x\end{equation}fricassinh(ux)\begin{equation} \label{eq4}\begin{array}{@{}l} \displaystyle x +{{\frac{1}{6}}\ {{x}^{3}}}+{{\frac{1}{120}}\ {{x}^{5}}}+{{\frac{1}{5 040}}\ {{x}^{7}}}+ \ \ \displaystyle {{\frac{1}{362880}}\ {{x}^{9}}}+{O \left({{x}^{11}}\right)} \end{array} \end{equation}Combination of univariate TaylorSeries
The FriCAS interpreter is smart enough to create an appropriate type if two univariate Taylor series interact.
However, as seen below, the resulting domain is something like $$Q[[x]]?[[y]]?,$$ i.e., univariate power series in y with coefficients that are univariate power series in x that have rational coefficients.
fricasUy ==> UnivariateTaylorSeries(Q,'y, 0) Type: Voidfricasuy: Uy := 'y\begin{equation} \label{eq5}y\end{equation}fricascosh(uy)\begin{equation} \label{eq6}\begin{array}{@{}l} \displaystyle 1 +{{\frac{1}{2}}\ {{y}^{2}}}+{{\frac{1}{24}}\ {{y}^{4}}}+{{\frac{1}{7 20}}\ {{y}^{6}}}+ \ \ \displaystyle {{\frac{1}{40320}}\ {{y}^{8}}}+{{\frac{1}{3628800}}\ {{y}^{10}}}+{O \left({{y}^{11}}\right)} \end{array} \end{equation}fricassinh(ux)*cosh(uy)\begin{equation} \label{eq7}\begin{array}{@{}l} \displaystyle x +{{\frac{1}{6}}\ {{x}^{3}}}+{{\frac{1}{120}}\ {{x}^{5}}}+{{\frac{1}{5 040}}\ {{x}^{7}}}+ \ \ \displaystyle {{\frac{1}{362880}}\ {{x}^{9}}}+{O \left({{x}^{11}}\right)}+ \ \ \displaystyle {{\left({ \begin{array}{@{}l} \displaystyle {{\frac{1}{2}}\ x}+{{\frac{1}{12}}\ {{x}^{3}}}+{{\frac{1}{24 0}}\ {{x}^{5}}}+ \ \ \displaystyle {{\frac{1}{10080}}\ {{x}^{7}}}+{{\frac{1}{725760}}\ {{x}^{9}}}+{O \left({{x}^{11}}\right)} \end{array} }\right)}\ {{y}^{2}}}+ \ \ \displaystyle {{\left({ \begin{array}{@{}l} \displaystyle {{\frac{1}{24}}\ x}+{{\frac{1}{144}}\ {{x}^{3}}}+{{\frac{1}{2 880}}\ {{x}^{5}}}+ \ \ \displaystyle {{\frac{1}{120960}}\ {{x}^{7}}}+{{\frac{1}{8709120}}\ {{x}^{9}}}+{O \left({{x}^{11}}\right)} \end{array} }\right)}\ {{y}^{4}}}+ \ \ \displaystyle {{\left({ \begin{array}{@{}l} \displaystyle {{\frac{1}{720}}\ x}+{{\frac{1}{4320}}\ {{x}^{3}}}+{{\frac{1}{8 6400}}\ {{x}^{5}}}+ \ \ \displaystyle {{\frac{1}{3628800}}\ {{x}^{7}}}+{{\frac{1}{261273600}}\ {{x}^{9}}}+{O \left({{x}^{11}}\right)} \end{array} }\right)}\ {{y}^{6}}}+ \ \ \displaystyle {{\left({ \begin{array}{@{}l} \displaystyle {{\frac{1}{40320}}\ x}+{{\frac{1}{241920}}\ {{x}^{3}}}+ \ \ \displaystyle {{\frac{1}{4838400}}\ {{x}^{5}}}+{{\frac{1}{203212800}}\ {{x}^{7}}}+ \ \ \displaystyle {{\frac{1}{14631321600}}\ {{x}^{9}}}+{O \left({{x}^{11}}\right)} \end{array} }\right)}\ {{y}^{8}}}+ \ \ \displaystyle {{\left({ \begin{array}{@{}l} \displaystyle {{\frac{1}{3628800}}\ x}+{{\frac{1}{21772800}}\ {{x}^{3}}}+ \ \ \displaystyle {{\frac{1}{435456000}}\ {{x}^{5}}}+{{\frac{1}{18289152000}}\ {{x}^{7}}}+ \ \ \displaystyle {{\frac{1}{1316818944000}}\ {{x}^{9}}}+{O \left({{x}^{11}}\right)} \end{array} }\right)}\ {{y}^{10}}}+ \ \ \displaystyle {O \left({{y}^{11}}\right)} \end{array} \end{equation}As a general rule, the FriCAS interpreter tries to find a "better coefficient domain" if something does not fit into the type of the current object in order to construct a more general domain that can hold the result of the operation.
In the case above that is probably not what we expected or wanted.
Multivariate TaylorSeries in infinitely many variables
There is a domain in FriCAS that is similar to the
Polynomial(Q)domain.TaylorSeries(Q)is the domain of power series overQin infinitely many variables.With that domain the input is as simple as for univariate power series.
fricasT ==> TaylorSeries QType: Voidfricastx:T := 'x\begin{equation} \label{eq8}x\end{equation}Type: TaylorSeries(Fraction(Integer))fricasty:T := 'y\begin{equation} \label{eq9}y\end{equation}Type: TaylorSeries(Fraction(Integer))fricassinh(tx)*cosh(ty)\begin{equation} \label{eq10}\begin{array}{@{}l} \displaystyle x +{\left({{\frac{1}{2}}\ x \ {{y}^{2}}}+{{\frac{1}{6}}\ {{x}^{3}}}\right)}+ \ \ \displaystyle {\left({{\frac{1}{24}}\ x \ {{y}^{4}}}+{{\frac{1}{12}}\ {{x}^{3}}\ {{y}^{2}}}+{{\frac{1}{120}}\ {{x}^{5}}}\right)}+ \ \ \displaystyle {\left({ \begin{array}{@{}l} \displaystyle {{\frac{1}{720}}\ x \ {{y}^{6}}}+{{\frac{1}{144}}\ {{x}^{3}}\ {{y}^{4}}}+{{\frac{1}{240}}\ {{x}^{5}}\ {{y}^{2}}}+ \ \ \displaystyle {{\frac{1}{5040}}\ {{x}^{7}}} \end{array} }\right)}+ \ \ \displaystyle {\left({ \begin{array}{@{}l} \displaystyle {{\frac{1}{40320}}\ x \ {{y}^{8}}}+{{\frac{1}{4320}}\ {{x}^{3}}\ {{y}^{6}}}+ \ \ \displaystyle {{\frac{1}{2880}}\ {{x}^{5}}\ {{y}^{4}}}+{{\frac{1}{10080}}\ {{x}^{7}}\ {{y}^{2}}}+ \ \ \displaystyle {{\frac{1}{362880}}\ {{x}^{9}}} \end{array} }\right)}+ \ \ \displaystyle {O \left({11}\right)} \end{array} \end{equation}Type: TaylorSeries(Fraction(Integer))Multivariate TaylorSeries in two variables
FriCAS allows to be more precise with multivariate power series. It is possible to create multivariate power series in a given number of variables. Such a construction is, however, a bit more involved.
The domain (named
Mbelow') is modelled as a univariate power series over bivariate polynomials where the n-th coefficient of the series is the polynomial consisting of all (bivariate) terms of degree n.Thus we first have to create a bivariate polynomial domain. From this construction, it should be clear how to create multivariate series in three or more variables.
fricasvl: List Symbol := ['x,\begin{equation*} \label{eq11}\left[ x , \: y \right]?\end{equation*}'y] Type: List(Symbol)fricasV ==> OrderedVariableList vlType: VoidfricasP ==> SparseMultivariatePolynomial(Q,V) Type: VoidfricasM ==> SparseMultivariateTaylorSeries(Q,V, P) Type: VoidfricasX: M := monomial(1$M,\begin{equation} \label{eq12}x\end{equation}'x, 1) Type: SparseMultivariateTaylorSeries(Fraction(Integer),OrderedVariableList([x, y]), SparseMultivariatePolynomial?(Fraction(Integer), OrderedVariableList([x, y]))) fricasY: M := monomial(1$M,\begin{equation} \label{eq13}y\end{equation}'y, 1) Type: SparseMultivariateTaylorSeries(Fraction(Integer),OrderedVariableList([x, y]), SparseMultivariatePolynomial?(Fraction(Integer), OrderedVariableList([x, y]))) fricassinh(X)*cosh(Y)\begin{equation} \label{eq14}\begin{array}{@{}l} \displaystyle x +{\left({{\frac{1}{6}}\ {{x}^{3}}}+{{\frac{1}{2}}\ {{y}^{2}}\ x}\right)}+ \ \ \displaystyle {\left({{\frac{1}{120}}\ {{x}^{5}}}+{{\frac{1}{12}}\ {{y}^{2}}\ {{x}^{3}}}+{{\frac{1}{24}}\ {{y}^{4}}\ x}\right)}+ \ \ \displaystyle {\left({ \begin{array}{@{}l} \displaystyle {{\frac{1}{5040}}\ {{x}^{7}}}+{{\frac{1}{240}}\ {{y}^{2}}\ {{x}^{5}}}+{{\frac{1}{144}}\ {{y}^{4}}\ {{x}^{3}}}+ \ \ \displaystyle {{\frac{1}{720}}\ {{y}^{6}}\ x} \end{array} }\right)}+ \ \ \displaystyle {\left({ \begin{array}{@{}l} \displaystyle {{\frac{1}{362880}}\ {{x}^{9}}}+{{\frac{1}{10080}}\ {{y}^{2}}\ {{x}^{7}}}+ \ \ \displaystyle {{\frac{1}{2880}}\ {{y}^{4}}\ {{x}^{5}}}+{{\frac{1}{4320}}\ {{y}^{6}}\ {{x}^{3}}}+ \ \ \displaystyle {{\frac{1}{40320}}\ {{y}^{8}}\ x} \end{array} }\right)}+ \ \ \displaystyle {O \left({11}\right)} \end{array} \end{equation}Type: SparseMultivariateTaylorSeries(Fraction(Integer),OrderedVariableList([x, y]), SparseMultivariatePolynomial?(Fraction(Integer), OrderedVariableList([x, y]))) Multivariate Taylor series with unknown coefficients
We want to generate taylor series with unknown coefficients.
fricas)clear completely
All user variables and function definitions have been cleared. All )browse facility databases have been cleared. Internally cached functions and constructors have been cleared. )clear completely is finished. vl: List Symbol := ['x,'y]; Type: List(Symbol)fricasV ==> OrderedVariableList vlType: VoidfricasQ ==> Expression IntegerType: VoidfricasP ==> SparseMultivariatePolynomial(Q,V) Type: VoidfricasM ==> SparseMultivariateTaylorSeries(Q,V, P) Type: VoidfricasX: M := monomial(1$M,\begin{equation} \label{eq15}x\end{equation}'x, 1) Type: SparseMultivariateTaylorSeries(Expression(Integer),OrderedVariableList([x, y]), SparseMultivariatePolynomial?(Expression(Integer), OrderedVariableList([x, y]))) fricasY: M := monomial(1$M,\begin{equation} \label{eq16}y\end{equation}'y, 1) Type: SparseMultivariateTaylorSeries(Expression(Integer),OrderedVariableList([x, y]), SparseMultivariatePolynomial?(Expression(Integer), OrderedVariableList([x, y]))) fricassx:M := recip(1-X)\begin{equation} \label{eq17}1 + x +{{x}^{2}}+{{x}^{3}}+{{x}^{4}}+{{x}^{5}}+{{x}^{6}}+{{x}^{7}}+{{x}^{8}}+{{x}^{9}}+{{x}^{10}}+{O \left({11}\right)}\end{equation}Type: SparseMultivariateTaylorSeries(Expression(Integer),OrderedVariableList([x, y]), SparseMultivariatePolynomial?(Expression(Integer), OrderedVariableList([x, y]))) fricassy:M := recip(1-Y)\begin{equation} \label{eq18}1 + y +{{y}^{2}}+{{y}^{3}}+{{y}^{4}}+{{y}^{5}}+{{y}^{6}}+{{y}^{7}}+{{y}^{8}}+{{y}^{9}}+{{y}^{10}}+{O \left({11}\right)}\end{equation}Type: SparseMultivariateTaylorSeries(Expression(Integer),OrderedVariableList([x, y]), SparseMultivariatePolynomial?(Expression(Integer), OrderedVariableList([x, y]))) fricass1 := sx*sy\begin{equation} \label{eq19}\begin{array}{@{}l} \displaystyle 1 +{\left(x + y \right)}+{\left({{x}^{2}}+{y \ x}+{{y}^{2}}\right)}+{\left({{x}^{3}}+{y \ {{x}^{2}}}+{{{y}^{2}}\ x}+{{y}^{3}}\right)}+ \ \ \displaystyle {\left({{x}^{4}}+{y \ {{x}^{3}}}+{{{y}^{2}}\ {{x}^{2}}}+{{{y}^{3}}\ x}+{{y}^{4}}\right)}+ \ \ \displaystyle {\left({{x}^{5}}+{y \ {{x}^{4}}}+{{{y}^{2}}\ {{x}^{3}}}+{{{y}^{3}}\ {{x}^{2}}}+{{{y}^{4}}\ x}+{{y}^{5}}\right)}+ \ \ \displaystyle {\left({{x}^{6}}+{y \ {{x}^{5}}}+{{{y}^{2}}\ {{x}^{4}}}+{{{y}^{3}}\ {{x}^{3}}}+{{{y}^{4}}\ {{x}^{2}}}+{{{y}^{5}}\ x}+{{y}^{6}}\right)}+ \ \ \displaystyle {\left({{x}^{7}}+{y \ {{x}^{6}}}+{{{y}^{2}}\ {{x}^{5}}}+{{{y}^{3}}\ {{x}^{4}}}+{{{y}^{4}}\ {{x}^{3}}}+{{{y}^{5}}\ {{x}^{2}}}+{{{y}^{6}}\ x}+{{y}^{7}}\right)}+ \ \ \displaystyle {\left({ \begin{array}{@{}l} \displaystyle {{x}^{8}}+{y \ {{x}^{7}}}+{{{y}^{2}}\ {{x}^{6}}}+{{{y}^{3}}\ {{x}^{5}}}+{{{y}^{4}}\ {{x}^{4}}}+{{{y}^{5}}\ {{x}^{3}}}+{{{y}^{6}}\ {{x}^{2}}}+ \ \ \displaystyle {{{y}^{7}}\ x}+{{y}^{8}} \end{array} }\right)}+ \ \ \displaystyle {\left({ \begin{array}{@{}l} \displaystyle {{x}^{9}}+{y \ {{x}^{8}}}+{{{y}^{2}}\ {{x}^{7}}}+{{{y}^{3}}\ {{x}^{6}}}+{{{y}^{4}}\ {{x}^{5}}}+{{{y}^{5}}\ {{x}^{4}}}+{{{y}^{6}}\ {{x}^{3}}}+ \ \ \displaystyle {{{y}^{7}}\ {{x}^{2}}}+{{{y}^{8}}\ x}+{{y}^{9}} \end{array} }\right)}+ \ \ \displaystyle {\left({ \begin{array}{@{}l} \displaystyle {{x}^{10}}+{y \ {{x}^{9}}}+{{{y}^{2}}\ {{x}^{8}}}+{{{y}^{3}}\ {{x}^{7}}}+{{{y}^{4}}\ {{x}^{6}}}+{{{y}^{5}}\ {{x}^{5}}}+{{{y}^{6}}\ {{x}^{4}}}+ \ \ \displaystyle {{{y}^{7}}\ {{x}^{3}}}+{{{y}^{8}}\ {{x}^{2}}}+{{{y}^{9}}\ x}+{{y}^{10}} \end{array} }\right)}+ \ \ \displaystyle {O \left({11}\right)} \end{array} \end{equation}Type: SparseMultivariateTaylorSeries(Expression(Integer),OrderedVariableList([x, y]), SparseMultivariatePolynomial?(Expression(Integer), OrderedVariableList([x, y]))) We can create power series with unknown coefficients.
fricasa: Symbol := 'a;Type: Symbolfricasfp(p:P):P == (pp:P := 0; e:=enumerate()$V; for m in monomials p repeat (l:=degree(m,e); pp := pp + elt(a, l)*m);pp)
Function declaration fp : SparseMultivariatePolynomial(Expression( Integer),OrderedVariableList([x, y])) -> SparseMultivariatePolynomial(Expression(Integer), OrderedVariableList([x, y])) has been added to workspace. Type: Voidfricasst1: Stream P := coefficients s1;fricasast1: Stream P := map(fp,st1); fricasCompiling function fp with type SparseMultivariatePolynomial( Expression(Integer),OrderedVariableList([x, y])) -> SparseMultivariatePolynomial(Expression(Integer), OrderedVariableList([x, y])) fricasa1: M := series ast1;Type: SparseMultivariateTaylorSeries(Expression(Integer),OrderedVariableList([x, y]), SparseMultivariatePolynomial?(Expression(Integer), OrderedVariableList([x, y]))) fricast:=(X+Y-1)*a1;Type: SparseMultivariateTaylorSeries(Expression(Integer),OrderedVariableList([x, y]), SparseMultivariatePolynomial?(Expression(Integer), OrderedVariableList([x, y]))) fricascoefficient(t,\begin{equation} \label{eq20}\begin{array}{@{}l} \displaystyle {{\left(-{a_{3, \: 0}}+{a_{2, \: 0}}\right)}\ {{x}^{3}}}+{{\left(-{a_{2, \: 1}}+{a_{2, \: 0}}+{a_{1, \: 1}}\right)}\ y \ {{x}^{2}}}+ \ \ \displaystyle {{\left(-{a_{1, \: 2}}+{a_{1, \: 1}}+{a_{0, \: 2}}\right)}\ {{y}^{2}}\ x}+{{\left(-{a_{0, \: 3}}+{a_{0, \: 2}}\right)}\ {{y}^{3}}} \end{array} \end{equation}3) fricasc := concat [coefficients coefficient(t,\begin{equation*} \label{eq21}\begin{array}{@{}l} \displaystyle \left[ -{a_{0, \: 0}}, \:{-{a_{1, \: 0}}+{a_{0, \: 0}}}, \:{-{a_{0, \: 1}}+{a_{0, \: 0}}}, \:{-{a_{2, \: 0}}+{a_{1, \: 0}}}, \: \right. \ \ \displaystyle \left.{-{a_{1, \: 1}}+{a_{1, \: 0}}+{a_{0, \: 1}}}, \:{-{a_{0, \: 2}}+{a_{0, \: 1}}}, \:{-{a_{3, \: 0}}+{a_{2, \: 0}}}, \: \right. \ \ \displaystyle \left.{-{a_{2, \: 1}}+{a_{2, \: 0}}+{a_{1, \: 1}}}, \:{-{a_{1, \: 2}}+{a_{1, \: 1}}+{a_{0, \: 2}}}, \: \right. \ \ \displaystyle \left.{-{a_{0, \: 3}}+{a_{0, \: 2}}}, \:{-{a_{4, \: 0}}+{a_{3, \: 0}}}, \:{-{a_{3, \: 1}}+{a_{3, \: 0}}+{a_{2, \: 1}}}, \: \right. \ \ \displaystyle \left.{-{a_{2, \: 2}}+{a_{2, \: 1}}+{a_{1, \: 2}}}, \:{-{a_{1, \: 3}}+{a_{1, \: 2}}+{a_{0, \: 3}}}, \: \right. \ \ \displaystyle \left.{-{a_{0, \: 4}}+{a_{0, \: 3}}}\right] \end{array} \end{equation*}n) for n in 0..4] Type: List(Expression(Integer))fricasvariables first c\begin{equation*} \label{eq22}\left[{a_{0, \: 0}}\right]?\end{equation*}Type: List(Symbol)fricasvars: List Symbol := concat [variables z for z in c]\begin{equation*} \label{eq23}\begin{array}{@{}l} \displaystyle \left[{a_{0, \: 0}}, \:{a_{0, \: 0}}, \:{a_{1, \: 0}}, \:{a_{0, \: 0}}, \:{a_{0, \: 1}}, \:{a_{1, \: 0}}, \:{a_{2, \: 0}}, \:{a_{0, \: 1}}, \:{a_{1, \: 0}}, \:{a_{1, \: 1}}, \: \right. \ \ \displaystyle \left.{a_{0, \: 1}}, \:{a_{0, \: 2}}, \:{a_{2, \: 0}}, \:{a_{3, \: 0}}, \:{a_{1, \: 1}}, \:{a_{2, \: 0}}, \:{a_{2, \: 1}}, \:{a_{0, \: 2}}, \:{a_{1, \: 1}}, \:{a_{1, \: 2}}, \: \right. \ \ \displaystyle \left.{a_{0, \: 2}}, \:{a_{0, \: 3}}, \:{a_{3, \: 0}}, \:{a_{4, \: 0}}, \:{a_{2, \: 1}}, \:{a_{3, \: 0}}, \:{a_{3, \: 1}}, \:{a_{1, \: 2}}, \:{a_{2, \: 1}}, \:{a_{2, \: 2}}, \: \right. \ \ \displaystyle \left.{a_{0, \: 3}}, \:{a_{1, \: 2}}, \:{a_{1, \: 3}}, \:{a_{0, \: 3}}, \:{a_{0, \: 4}}\right] \end{array} \end{equation*}Type: List(Symbol)fricasv: List Symbol := [u for u in members set vars]\begin{equation*} \label{eq24}\begin{array}{@{}l} \displaystyle \left[{a_{0, \: 0}}, \:{a_{0, \: 1}}, \:{a_{0, \: 2}}, \:{a_{0, \: 3}}, \:{a_{0, \: 4}}, \:{a_{1, \: 0}}, \:{a_{1, \: 1}}, \:{a_{1, \: 2}}, \:{a_{1, \: 3}}, \:{a_{2, \: 0}}, \: \right. \ \ \displaystyle \left.{a_{2, \: 1}}, \:{a_{2, \: 2}}, \:{a_{3, \: 0}}, \:{a_{3, \: 1}}, \:{a_{4, \: 0}}\right] \end{array} \end{equation*}Type: List(Symbol)fricases:=cons(a[0,\begin{equation*} \label{eq25}\begin{array}{@{}l} \displaystyle \left[{{a_{0, \: 0}}- 1}, \:{-{a_{1, \: 0}}+{a_{0, \: 0}}}, \:{-{a_{0, \: 1}}+{a_{0, \: 0}}}, \:{-{a_{2, \: 0}}+{a_{1, \: 0}}}, \: \right. \ \ \displaystyle \left.{-{a_{1, \: 1}}+{a_{1, \: 0}}+{a_{0, \: 1}}}, \:{-{a_{0, \: 2}}+{a_{0, \: 1}}}, \:{-{a_{3, \: 0}}+{a_{2, \: 0}}}, \: \right. \ \ \displaystyle \left.{-{a_{2, \: 1}}+{a_{2, \: 0}}+{a_{1, \: 1}}}, \:{-{a_{1, \: 2}}+{a_{1, \: 1}}+{a_{0, \: 2}}}, \: \right. \ \ \displaystyle \left.{-{a_{0, \: 3}}+{a_{0, \: 2}}}, \:{-{a_{4, \: 0}}+{a_{3, \: 0}}}, \:{-{a_{3, \: 1}}+{a_{3, \: 0}}+{a_{2, \: 1}}}, \: \right. \ \ \displaystyle \left.{-{a_{2, \: 2}}+{a_{2, \: 1}}+{a_{1, \: 2}}}, \:{-{a_{1, \: 3}}+{a_{1, \: 2}}+{a_{0, \: 3}}}, \: \right. \ \ \displaystyle \left.{-{a_{0, \: 4}}+{a_{0, \: 3}}}\right] \end{array} \end{equation*}0]-1, rest c) Type: List(Expression(Integer))Unfortunately, removing the semicolon from the end of the following command makes trouble for LaTeX.
fricasresult:=solve([e=0 for e in es],v); Type: List(List(Equation(Expression(Integer))))Bill Page: It seems to be a problem with encoding a list of lists.
fricasfor i in result repeat outputAsTex(i)\begin{equation} \label{eq26}\begin{array}{@{}l} \displaystyle {{a_{0, \: 0}}= 1}\ {{a_{0, \: 1}}= 1}\ {{a_{0, \: 2}}= 1}\ {{a_{0, \: 3}}= 1}\ {{a_{0, \: 4}}= 1}\ {{a_{1, \: 0}}= 1}\ \cdot \ \ \displaystyle {{a_{1, \: 1}}= 2}\ {{a_{1, \: 2}}= 3}\ {{a_{1, \: 3}}= 4}\ {{a_{2, \: 0}}= 1}\ {{a_{2, \: 1}}= 3}\ {{a_{2, \: 2}}= 6}\ \cdot \ \ \displaystyle {{a_{3, \: 0}}= 1}\ {{a_{3, \: 1}}= 4}\ {{a_{4, \: 0}}= 1} \end{array} \end{equation}Type: Void
This is pdfTeX, Version 3.141592653-2.6-1.40.24 (TeX Live 2022/Debian) (preloaded format=latex) restricted \write18 enabled. entering extended mode I can't find file `5267549894624915361-16.0px.tex'. <*> 5267549894624915361-16.0px.tex(Press Enter to retry, or Control-D to exit) Please type another input file name Emergency stop. <*> 5267549894624915361-16.0px.tex
No pages of output. Transcript written on texput.log.