(For the next two commands see the installation page.)
libname := libname, FileTools:-JoinPath(["maple","lib","dcfun.mla"],base=homedir):
with(dcfun):
The equations we call Riccati Mahler equations, by analogy with the differential case, have the remarkable property of being non-linear. A solution of this equation is a ramified rational function $u$ such that $M - u$ is a right-hand factor of $L$.
Let us choose a linear Mahler operator.
b := 3;
$$3$$
L := (x^54+x^27+1)*(x^54-x^27+1)*(x^54+x^27-1)*(x^54-x^27-1)*(x^42+2*x^40+2*x^38+3*x^36+4*x^34+4*x^32+4*x^30+4*x^28+4*x^26+3*x^24+2*x^22+2*x^20+x^18+2*x^12-x^6-2*x^4-2*x^2-1)*M^4+(x^190-x^188+x^186+2*x^182+4*x^178+2*x^176+4*x^174+2*x^172+4*x^170+2*x^168+5*x^166+3*x^164+5*x^162+4*x^160+6*x^158+4*x^156+6*x^154+4*x^152+6*x^150+6*x^148+8*x^146+6*x^144+10*x^142+8*x^140+10*x^138+6*x^136+12*x^134+6*x^132+10*x^130+4*x^128+10*x^126+2*x^124+8*x^122+2*x^120+10*x^118+10*x^114+10*x^110+8*x^106-2*x^104+8*x^102+6*x^98+4*x^94-2*x^92+4*x^90-4*x^88+2*x^86-4*x^84+4*x^82-6*x^80+4*x^78-6*x^76+4*x^74-6*x^72+2*x^70-8*x^68+2*x^66-6*x^64-6*x^60-2*x^58-8*x^56-2*x^54-6*x^52-6*x^48-2*x^46-4*x^44-2*x^42-2*x^40-2*x^36-2*x^32-3*x^28+x^26-3*x^24+2*x^22-2*x^20+2*x^18-2*x^16+2*x^14-2*x^12+x^4+x^2+1)*(x^2+1)*M^3-x^18*(x-1)*(x+1)*(x^166+3*x^164+5*x^162+8*x^160+13*x^158+18*x^156+24*x^154+31*x^152+38*x^150+45*x^148+52*x^146+59*x^144+66*x^142+73*x^140+80*x^138+88*x^136+95*x^134+102*x^132+109*x^130+116*x^128+123*x^126+131*x^124+139*x^122+147*x^120+153*x^118+159*x^116+165*x^114+170*x^112+174*x^110+178*x^108+180*x^106+179*x^104+178*x^102+176*x^100+173*x^98+170*x^96+167*x^94+164*x^92+161*x^90+158*x^88+155*x^86+152*x^84+146*x^82+139*x^80+132*x^78+125*x^76+118*x^74+111*x^72+101*x^70+91*x^68+81*x^66+77*x^64+73*x^62+69*x^60+62*x^58+56*x^56+50*x^54+44*x^52+39*x^50+34*x^48+26*x^46+19*x^44+12*x^42+5*x^40-2*x^38-9*x^36-16*x^34-21*x^32-26*x^30-30*x^28-31*x^26-32*x^24-31*x^22-28*x^20-25*x^18-21*x^16-17*x^14-13*x^12-11*x^10-9*x^8-7*x^6-5*x^4-3*x^2-1)*M^2-x^30*(x^2+1)*(x^138+x^136+x^134+2*x^132+x^130+3*x^128+x^126+4*x^124+2*x^122+5*x^120+3*x^118+5*x^116+4*x^114+5*x^112+5*x^110+5*x^108+6*x^106+6*x^104+6*x^102+6*x^100+6*x^98+6*x^96+6*x^94+6*x^92+6*x^90+6*x^88+6*x^86+5*x^84+5*x^82+5*x^80+4*x^78+5*x^76+3*x^74+5*x^72+4*x^70+6*x^68+3*x^66+5*x^64+3*x^62+4*x^60+3*x^58+3*x^56+3*x^54+2*x^48+2*x^46+2*x^44+2*x^40-2*x^38+2*x^36-2*x^34+2*x^32-3*x^30+x^28-3*x^26-3*x^22-x^20-3*x^18-2*x^16-4*x^14-x^12-3*x^10-x^8-2*x^6-x^4-x^2-1)*M+(x^2+x+1)*(x^2-x+1)*(x^126+2*x^120+2*x^114+3*x^108+4*x^102+4*x^96+4*x^90+4*x^84+4*x^78+3*x^72+2*x^66+2*x^60+x^54+2*x^36-x^18-2*x^12-2*x^6-1)*x^40;
$$\left(x^{54}+x^{27}+1\right) \left(x^{54}-x^{27}+1\right) \left(x^{54}+x^{27}-1\right) \left(x^{54}-x^{27}-1\right) \left(x^{42}+2 x^{40}+2 x^{38}+3 x^{36}+4 x^{34}+4 x^{32}+4 x^{30}+4 x^{28}+4 x^{26}+3 x^{24}+2 x^{22}+2 x^{20}+x^{18}+2 x^{12}-x^{6}-2 x^{4}-2 x^{2}-1\right) M^{4}+\left(x^{190}-x^{188}+x^{186}+2 x^{182}+4 x^{178}+2 x^{176}+4 x^{174}+2 x^{172}+4 x^{170}+2 x^{168}+5 x^{166}+3 x^{164}+5 x^{162}+4 x^{160}+6 x^{158}+4 x^{156}+6 x^{154}+4 x^{152}+6 x^{150}+6 x^{148}+8 x^{146}+6 x^{144}+10 x^{142}+8 x^{140}+10 x^{138}+6 x^{136}+12 x^{134}+6 x^{132}+10 x^{130}+4 x^{128}+10 x^{126}+2 x^{124}+8 x^{122}+2 x^{120}+10 x^{118}+10 x^{114}+10 x^{110}+8 x^{106}-2 x^{104}+8 x^{102}+6 x^{98}+4 x^{94}-2 x^{92}+4 x^{90}-4 x^{88}+2 x^{86}-4 x^{84}+4 x^{82}-6 x^{80}+4 x^{78}-6 x^{76}+4 x^{74}-6 x^{72}+2 x^{70}-8 x^{68}+2 x^{66}-6 x^{64}-6 x^{60}-2 x^{58}-8 x^{56}-2 x^{54}-6 x^{52}-6 x^{48}-2 x^{46}-4 x^{44}-2 x^{42}-2 x^{40}-2 x^{36}-2 x^{32}-3 x^{28}+x^{26}-3 x^{24}+2 x^{22}-2 x^{20}+2 x^{18}-2 x^{16}+2 x^{14}-2 x^{12}+x^{4}+x^{2}+1\right) \left(x^{2}+1\right) M^{3}-x^{18} \left(-1+x \right) \left(1+x \right) \left(x^{166}+3 x^{164}+5 x^{162}+8 x^{160}+13 x^{158}+18 x^{156}+24 x^{154}+31 x^{152}+38 x^{150}+45 x^{148}+52 x^{146}+59 x^{144}+66 x^{142}+73 x^{140}+80 x^{138}+88 x^{136}+95 x^{134}+102 x^{132}+109 x^{130}+116 x^{128}+123 x^{126}+131 x^{124}+139 x^{122}+147 x^{120}+153 x^{118}+159 x^{116}+165 x^{114}+170 x^{112}+174 x^{110}+178 x^{108}+180 x^{106}+179 x^{104}+178 x^{102}+176 x^{100}+173 x^{98}+170 x^{96}+167 x^{94}+164 x^{92}+161 x^{90}+158 x^{88}+155 x^{86}+152 x^{84}+146 x^{82}+139 x^{80}+132 x^{78}+125 x^{76}+118 x^{74}+111 x^{72}+101 x^{70}+91 x^{68}+81 x^{66}+77 x^{64}+73 x^{62}+69 x^{60}+62 x^{58}+56 x^{56}+50 x^{54}+44 x^{52}+39 x^{50}+34 x^{48}+26 x^{46}+19 x^{44}+12 x^{42}+5 x^{40}-2 x^{38}-9 x^{36}-16 x^{34}-21 x^{32}-26 x^{30}-30 x^{28}-31 x^{26}-32 x^{24}-31 x^{22}-28 x^{20}-25 x^{18}-21 x^{16}-17 x^{14}-13 x^{12}-11 x^{10}-9 x^{8}-7 x^{6}-5 x^{4}-3 x^{2}-1\right) M^{2}-x^{30} \left(x^{2}+1\right) \left(x^{138}+x^{136}+x^{134}+2 x^{132}+x^{130}+3 x^{128}+x^{126}+4 x^{124}+2 x^{122}+5 x^{120}+3 x^{118}+5 x^{116}+4 x^{114}+5 x^{112}+5 x^{110}+5 x^{108}+6 x^{106}+6 x^{104}+6 x^{102}+6 x^{100}+6 x^{98}+6 x^{96}+6 x^{94}+6 x^{92}+6 x^{90}+6 x^{88}+6 x^{86}+5 x^{84}+5 x^{82}+5 x^{80}+4 x^{78}+5 x^{76}+3 x^{74}+5 x^{72}+4 x^{70}+6 x^{68}+3 x^{66}+5 x^{64}+3 x^{62}+4 x^{60}+3 x^{58}+3 x^{56}+3 x^{54}+2 x^{48}+2 x^{46}+2 x^{44}+2 x^{40}-2 x^{38}+2 x^{36}-2 x^{34}+2 x^{32}-3 x^{30}+x^{28}-3 x^{26}-3 x^{22}-x^{20}-3 x^{18}-2 x^{16}-4 x^{14}-x^{12}-3 x^{10}-x^{8}-2 x^{6}-x^{4}-x^{2}-1\right) M +\left(x^{2}+x +1\right) \left(x^{2}-x +1\right) \left(x^{126}+2 x^{120}+2 x^{114}+3 x^{108}+4 x^{102}+4 x^{96}+4 x^{90}+4 x^{84}+4 x^{78}+3 x^{72}+2 x^{66}+2 x^{60}+x^{54}+2 x^{36}-x^{18}-2 x^{12}-2 x^{6}-1\right) x^{40}$$
To write the associated Riccati equation, we first make the coefficients of the operator $L$ explicit.
r, d := degree(L, M), degree(L, x);
$$4, 258$$
for k from 0 to r do ell[k] := coeff(L, M, k) od:
$$$$
Next, we write the Riccati equation.
R_equ := add(ell[k]*mul(u(x^(b^j)), j = 0..k-1) , k = 0..r);
$$\left(x^{2}+x +1\right) \left(x^{2}-x +1\right) \left(x^{126}+2 x^{120}+2 x^{114}+3 x^{108}+4 x^{102}+4 x^{96}+4 x^{90}+4 x^{84}+4 x^{78}+3 x^{72}+2 x^{66}+2 x^{60}+x^{54}+2 x^{36}-x^{18}-2 x^{12}-2 x^{6}-1\right) x^{40}-x^{30} \left(x^{2}+1\right) \left(x^{138}+x^{136}+x^{134}+2 x^{132}+x^{130}+3 x^{128}+x^{126}+4 x^{124}+2 x^{122}+5 x^{120}+3 x^{118}+5 x^{116}+4 x^{114}+5 x^{112}+5 x^{110}+5 x^{108}+6 x^{106}+6 x^{104}+6 x^{102}+6 x^{100}+6 x^{98}+6 x^{96}+6 x^{94}+6 x^{92}+6 x^{90}+6 x^{88}+6 x^{86}+5 x^{84}+5 x^{82}+5 x^{80}+4 x^{78}+5 x^{76}+3 x^{74}+5 x^{72}+4 x^{70}+6 x^{68}+3 x^{66}+5 x^{64}+3 x^{62}+4 x^{60}+3 x^{58}+3 x^{56}+3 x^{54}+2 x^{48}+2 x^{46}+2 x^{44}+2 x^{40}-2 x^{38}+2 x^{36}-2 x^{34}+2 x^{32}-3 x^{30}+x^{28}-3 x^{26}-3 x^{22}-x^{20}-3 x^{18}-2 x^{16}-4 x^{14}-x^{12}-3 x^{10}-x^{8}-2 x^{6}-x^{4}-x^{2}-1\right) u \! \left(x \right)-x^{18} \left(-1+x \right) \left(1+x \right) \left(x^{166}+3 x^{164}+5 x^{162}+8 x^{160}+13 x^{158}+18 x^{156}+24 x^{154}+31 x^{152}+38 x^{150}+45 x^{148}+52 x^{146}+59 x^{144}+66 x^{142}+73 x^{140}+80 x^{138}+88 x^{136}+95 x^{134}+102 x^{132}+109 x^{130}+116 x^{128}+123 x^{126}+131 x^{124}+139 x^{122}+147 x^{120}+153 x^{118}+159 x^{116}+165 x^{114}+170 x^{112}+174 x^{110}+178 x^{108}+180 x^{106}+179 x^{104}+178 x^{102}+176 x^{100}+173 x^{98}+170 x^{96}+167 x^{94}+164 x^{92}+161 x^{90}+158 x^{88}+155 x^{86}+152 x^{84}+146 x^{82}+139 x^{80}+132 x^{78}+125 x^{76}+118 x^{74}+111 x^{72}+101 x^{70}+91 x^{68}+81 x^{66}+77 x^{64}+73 x^{62}+69 x^{60}+62 x^{58}+56 x^{56}+50 x^{54}+44 x^{52}+39 x^{50}+34 x^{48}+26 x^{46}+19 x^{44}+12 x^{42}+5 x^{40}-2 x^{38}-9 x^{36}-16 x^{34}-21 x^{32}-26 x^{30}-30 x^{28}-31 x^{26}-32 x^{24}-31 x^{22}-28 x^{20}-25 x^{18}-21 x^{16}-17 x^{14}-13 x^{12}-11 x^{10}-9 x^{8}-7 x^{6}-5 x^{4}-3 x^{2}-1\right) u \! \left(x \right) u \! \left(x^{3}\right)+\left(x^{190}-x^{188}+x^{186}+2 x^{182}+4 x^{178}+2 x^{176}+4 x^{174}+2 x^{172}+4 x^{170}+2 x^{168}+5 x^{166}+3 x^{164}+5 x^{162}+4 x^{160}+6 x^{158}+4 x^{156}+6 x^{154}+4 x^{152}+6 x^{150}+6 x^{148}+8 x^{146}+6 x^{144}+10 x^{142}+8 x^{140}+10 x^{138}+6 x^{136}+12 x^{134}+6 x^{132}+10 x^{130}+4 x^{128}+10 x^{126}+2 x^{124}+8 x^{122}+2 x^{120}+10 x^{118}+10 x^{114}+10 x^{110}+8 x^{106}-2 x^{104}+8 x^{102}+6 x^{98}+4 x^{94}-2 x^{92}+4 x^{90}-4 x^{88}+2 x^{86}-4 x^{84}+4 x^{82}-6 x^{80}+4 x^{78}-6 x^{76}+4 x^{74}-6 x^{72}+2 x^{70}-8 x^{68}+2 x^{66}-6 x^{64}-6 x^{60}-2 x^{58}-8 x^{56}-2 x^{54}-6 x^{52}-6 x^{48}-2 x^{46}-4 x^{44}-2 x^{42}-2 x^{40}-2 x^{36}-2 x^{32}-3 x^{28}+x^{26}-3 x^{24}+2 x^{22}-2 x^{20}+2 x^{18}-2 x^{16}+2 x^{14}-2 x^{12}+x^{4}+x^{2}+1\right) \left(x^{2}+1\right) u \! \left(x \right) u \! \left(x^{3}\right) u \! \left(x^{9}\right)+\left(x^{54}+x^{27}+1\right) \left(x^{54}-x^{27}+1\right) \left(x^{54}+x^{27}-1\right) \left(x^{54}-x^{27}-1\right) \left(x^{42}+2 x^{40}+2 x^{38}+3 x^{36}+4 x^{34}+4 x^{32}+4 x^{30}+4 x^{28}+4 x^{26}+3 x^{24}+2 x^{22}+2 x^{20}+x^{18}+2 x^{12}-x^{6}-2 x^{4}-2 x^{2}-1\right) u \! \left(x \right) u \! \left(x^{3}\right) u \! \left(x^{9}\right) u \! \left(x^{27}\right)$$
While the homogeneous linear equation associated with $L$ is written as follows $$\ell_0(x)u(x) + \ell_1(x)u(x^3) + \ell_2(x)u(x^9) + \ell_3(x)u(x^{27}) + \ell_4(x)u(x^{81}) = 0,$$ the Riccati equation is written as $$\ell_0(x) + \ell_1(x)u(x) + \ell_2(x)u(x)u(x^3) + \ell_3(x)u(x)u(x^3)u(x^9) + \ell_4(x)u(x)u(x^3)u(x^9)u(x^{27}) = 0.$$
We search for the solutions of the Riccati equation in the field of ramified rational functions. Note that we are using the operator $L$, not the previous writing.
ric := LMOpSolve(L, x, M, b, 'free' = 'K', 'output' = 'riccati');
$$\left\{\frac{K_{2} x^{3}+K_{1}}{\left(K_{2} x +K_{1}\right) \left(x^{4}+x^{2}+1\right)}, -\frac{1}{x^{2}-x -1}, -\frac{1}{x^{2}+x -1}\right\}$$
We obtain three solutions. Two of them are simple rational functions. The third one is a parametrized solution. It is parametrized by the projective line ${\mathbb P}^1(\mathbb K)$, where $\mathbb K$ is the field extension of $\mathbb Q$ we want to consider. Moreover the three sets $R$ of solutions, that is two singletons and the image of a projective line, have no elements in common.
The search for the solutions of the Riccati equation is equivalent to the search for what we call Mahler hypergeometric solutions.
LMOpSolve(L, x, M, b, 'free' = 'K', 'output' = 'mhypergeom');
$$\left\{K_{1} \left(\overset{\infty}{\underset{\textit{\_k5} =0}{\textcolor{gray}{\prod}}}\! \left(-x^{2 \,3^{\textit{\_k5}}}+x^{3^{\textit{\_k5}}}+1\right)\right), K_{2} \left(\overset{\infty}{\underset{\textit{\_k6} =0}{\textcolor{gray}{\prod}}}\! \left(-x^{2 \,3^{\textit{\_k6}}}-x^{3^{\textit{\_k6}}}+1\right)\right), -\frac{x K_{4}+K_{3}}{\left(-1+x \right) \left(1+x \right)}\right\}$$
We obtain three linear subspaces of hypergeometric solutions of the linear equation $Ly = 0$, two lines and a plane. These three subspaces are in direct sum. The link between a solution $u$ of the Riccati equation and a solution $y$ of the linear equation is simply $u = My / y$. Moreover each of the three above subspaces $H$ exactly corresponds to one of the solutions of the Riccati equation and the map $y\mapsto My/y$ induces a one-to-one map from the projective space ${\mathbb P}(H)$ to the corresponding set $R$.
As the operator $L$ has order $4$ we found a basis of solutions made from hypergeometric solutions, namely two infinite products and two rational functions. Obviously, we have to indicate in which space we are looking for solutions, but here the result is the same whether we are looking in the space of formal power series, in the space of Laurent series or in the space of Puiseux series.
This example appears in Chyzal et alii. First-order factors of linear Mahler operators (In preparation). Its origin is in Adamczewski, Boris and Colin Faverjon (2017). Méthode de Mahler : relations linéaires, transcendance et applications aux nombres automatiques. In: Proc. Lond. Math. Soc. (3) 115.1, pp. 55–90. url: https://doi.org/10.1112/plms.12038.