Gen:=proc(L) local Sing, i, g, S; S:={}; Sing:=singularity(L) minus removable(L); for i in Sing do g:=DEtools[gen_exp](L,T,x=i); g:=[seq(op(i[1..-2]),i=g)]; S:=S union {[op(g),i]}; od; S; end: sing2:=proc(f) #find roots of f,1-f and 1/f. if degree(numer(f))>degree(denom(f)) then [solve(numer(f),x),solve(f-1,x),infinity] elif degree(numer(f))NULL then B1:=op(op(s)[1])[2]; B2:=op(op(s)[2])[2]; C:=subs(b2=B2,C);A:=subs(s,A);r:=subs(s,r); S:=S union {[A,B1,B2,C,u,v,r]}; fi; od; else for i in e1 do C:=solve(i,c); for g in GG do if g[-1]=l1[2] then e2:=MatchExp1(g[1],g[2],g[3],a,b2,C-a-b1+b2); break;fi; od; for j in e2 do l:=solve(j,{b1,b2}); B1:=op(op(l)[1])[2]; B2:=op(op(l)[2])[2]; L2:=subs(b1=B1,b2=B2,c=C,L1); L2:=collect(normal(L2),{Dx,Dx^2,Dx^3},factor); a1:=coeff(L,Dx^2); a2:=coeff(L2,Dx^2); r:=1/3*(a1-a2); Lp:=L2-DEtools[symmetric_product](L,Dx-r); Lp:=collect(Lp,Dx,normal): A:=solve({coeffs(numer(Lp),{Dx,x})},a); if A<>NULL then B1:=subs(a=A,B1); B2:=subs(a=A,B2); S:=S union {[A,B1,B2,C,u,v,r]}; fi; od; od; fi; S; end: