$\operatorname{GosperPetkovsekForm}(u, x, b, s)$
libname := libname, FileTools:-JoinPath(["maple","lib","dcfun.mla"],base=homedir):
with(dcfun):
We test the formula on an example.
u := (1+x)/(1-x);
$$\frac{1+x}{1-x}$$
b := 2;
$$2$$
s := 3;
$$3$$
zeta, A, B, C := GosperPetkovsekForm((1+x)/(1-x), x, b, s);
$$-1, 1, x^{4}-1, x^{4}+1$$
u1 := zeta * MOp(C, x, b)/C * MOp(A, x, b^s)/B;
$$-\frac{x^{8}+1}{\left(x^{4}+1\right) \left(x^{4}-1\right)}$$
u2 := MOp(u, x, b^s);
$$-\frac{x^{8}+1}{x^{8}-1}$$
normal(u1 - u2);
$$0$$