{VERSION 4 0 "IBM INTEL NT" "4.0" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 1 12 0 0 255 1 0 2 0 0 1 0 0 0 0 1 }{CSTYLE "2D Math" -1 2 "Times" 1 14 128 0 0 1 0 0 2 0 0 0 0 0 0 1 }{CSTYLE "2D Output" 2 20 "" 1 14 0 0 128 1 0 0 0 0 0 0 0 0 0 1 }{PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "Times" 1 14 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 3 0 3 0 2 2 0 1 }{PSTYLE "Maple Outpu t" -1 11 1 {CSTYLE "" -1 -1 "Times" 1 16 0 0 0 1 2 2 2 2 2 2 1 1 1 1 } 3 3 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Maple Output" -1 12 1 {CSTYLE " " -1 -1 "Times" 1 16 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }1 3 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "R3 Font 0" -1 256 1 {CSTYLE "" -1 -1 "Courier" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "R3 \+ Font 2" -1 257 1 {CSTYLE "" -1 -1 "Times" 1 12 128 0 0 1 2 2 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }} {SECT 0 {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 35 "restart: readlib(gfu n): with(gfun);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 417 "testini:=proc(L 1,L2)\nlocal s1, s2, i, j, n;\n if L1=L2 then RETURN(true) fi;\n \+ s1:=indets(L1,_C[anything]);\n s2:=indets(L2,_C[anything]);\n i f s1=\{\} and s2=\{\} then RETURN(false) fi;\n n:=nops(s1);\n if n<>nops(s2) then RETURN(false) fi;\n for i in combinat[permute](s1 ) do\n if evala(Normal(expand(L1-subs([seq(s2[j]=i[j],j=1..n)], L2))))=0 then\n RETURN(true) fi\n od;\n false\nend: \+ " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 738 "testdiffeq:=proc(deq1,deq2,y,z )\nlocal eq1,eq2,Y, ini1, ini2, S, i;\n if type(deq1,set) and type( deq2,set) then\n ini1:=select(hastype,deq1,function(0));\n \+ ini2:=select(hastype,deq2,function(0));\n S:=\{seq(op(1,i),i =ini1)\};\n if S<>\{seq(op(1,i),i=ini2)\} then RETURN(false) fi ;\n if not testini(subs(ini1,[op(S)]),subs(ini2,[op(S)])) \n \+ then RETURN(false) fi;\n eq1:=op(select(has,deq1,z)); \n eq2:=op(select(has,deq2,z))\n elif type(deq1,set) or type (deq2,set) then RETURN(false)\n else eq1:=deq1; eq2:=deq2 fi;\n \+ eq1:=convert(eq1,D); eq2:=convert(eq2,D);\n RETURN(evalb(type(norma l(subs((D@@3)(y)(z)=Y^4,(D@@2)(y)(z)=Y^3,\n (D)(y)(z)=Y^2,y(z)= Y,eq1/eq2)),rational)))\nend:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 507 "t estrec:=proc(rec1,rec2,u,n)\nlocal eq1,eq2,Y;\n if type(rec1,set) a nd type(rec2,set) then\n if select(hastype,rec1,function(intege r))<>\n select(hastype,rec2,function(integer))\n \+ then RETURN(false) fi;\n eq1:=op(select(has,rec1,n));\n \+ eq2:=op(select(has,rec2,n))\n elif type(rec1,set) or type(rec2,set ) then RETURN(false)\n else eq1:=rec1; eq2:=rec2 fi;\n RETURN(ev alb(type(normal(subs(u(n+3)=Y^4,u(n+2)=Y^3,\n u(n+1)=Y^2,u(n)=Y ,eq1/eq2)),rational)))\nend:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 2111 "# rectoproc\nprint(`Testing rectoproc`);\n# Test from the help page\nre s1:= rectoproc(f(i)=f(i-1)+f(i-2),f(i),remember):\nres1:=res1(5):\nres 2:=5*_C[1]+3*_C[0]:\nif res1=res2 then ok else res1,res2 fi;\n# Test f rom the help page\nres1:=rectoproc(\{f(i)=f(i-1)+f(i-2),f(0)=0,f(1)=1 \},f(i))(50):\nres2:=12586269025:\nif res1=res2 then ok else res1,res2 fi;\nres1:=rectoproc(\{f(i)=f(i-1)+f(i-2),f(0)=0,f(1)=1\},f(i))(100): \nres2:=354224848179261915075:\nif res1=res2 then ok else res1,res2 fi ;\n# Test from the help page\nres1:=rectoproc(\{f(i)=f(i-1)+f(i-2),f(0 )=1,f(1)=1\},f(i),list)(10):\nres2:=[1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]:\nif res1=res2 then ok else res1,res2 fi;\nres1:=rectoproc(\{(1-n **2)*u(n+1)+3/2*u(n-1)+(1/2+3/2*n+n**2)*u(n),u(0)=1,u(2)=a\}\n,u(n))(1 0):\nres2:=86773903/3440640*a-41665019/17203200:\nif res1=res2 then ok else res1,res2 fi;\nres1:=rectoproc(f(i)=f(i-1)+f(i-2),f(i))(100):\nr es2:=354224848179261915075*_C[1]+218922995834555169026*_C[0]:\nif res1 =res2 then ok else res1,res2 fi;\nres1:=rectoproc(\{u(1) = 0, u(3) = 0 , u(5) = 0, u(2) = -4/3*_C[0], u(4) = _C[0],\n(2*n+n^2)*u(n)+(14*n+16+ 3*n^2)*u(2+n)+(30*n+56+4*n^2)*u(n+4)\n+(48+2*n^2+20*n)*u(n+6)\},u(n),r emember):\nres1:=[seq(res1(i),i=0..10)]:\nres2:=[_C[0],0,-4/3*_C[1],0, _C[1],0,-13/18*_C[1],0,25/48*_C[1],0,\n-187/480*_C[1]]:\nif res1=res2 \+ then ok else res1,res2 fi;\nres1:=rectoproc(\{(-2*nu+2*n)*u(n)+(n^2+3* n+2)*u(n+2),u(0)=1,u(1)=2\},u(n),\n'remember',params=[nu]):\nres1:=res 1(5,2):\nres2:=-1/15:\nif res1=res2 then ok else res1,res2 fi;\nres1:= rectoproc(\{(-2*NU+2*n)*u(n)+(n^2+3*n+2)*u(n+2), u(0)=1, u(1)=1\},\n u (n), params=[NU]):\nres1:=res1(1,2):\nres2:=1:\nif res1=res2 then ok e lse res1,res2 fi;\nres1:=rectoproc(\{u(0) = a[0], u(1) = a[1], u(2) = \+ a[1],u(3) = 1/6*a[0]+2/3*a[1],\n (n^2-n)*u(n)+u(n+1)+(2*n+6)*u(n+3)+( -n^2-7*n-12)*u(n+4)\},u(n),list,\n params=[a[0],a[1]]):\nres1:=res1(5 ,2,3):\nres2:=[2, 3, 3, 7/3, 17/12, 43/60]:\nif res1=res2 then ok else res1,res2 fi;\nres1:=rectoproc(\{-n*u(n)+(-n-1)*u(n+1)+1, u(0) = a0, \+ u(1) = 1\},\n u(n),list,params = [a0]):\nres1:=res1(10,a):\nres2:=[a , 1, 0, 1/3, 0, 1/5, 0, 1/7, 0, 1/9, 0]:\nif res1=res2 then ok else re s1,res2 fi;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 2393 "# diffeqtorec\npri nt(`Testing diffeqtorec`);\nres1:=traperror(diffeqtorec(z^2*diff(w(z), z,z)+z*diff(w(z),z)+(z^2-nu^2)*w(z),\ny(z),u(n))):\nres2:=lasterror:\n if res1=res2 then ok else res1,res2 fi;\nres1:=traperror(diffeqtorec(- z**2*diff(y(z),z)+z*diff(y(z),z)-10*y(z)*z-y(z)+1,\ny(z),u(n))):\nres2 :=`no valid initial conditions`:\nif res1=res2 then ok else res1,res2 \+ fi;\nres1:=diffeqtorec((67/2000*t^2+129/1000)*diff(diff(f(t),t),t)+\n7 7/500*t*diff(f(t),t)+5859/125*f(t) = 34/625,f(t),u(n)):\nres2:=\{(4687 20+1205*n+335*n^2)*u(n)+(1290*n^2+3870*n+2580)*u(n+2),u(0)=_C[0],\nu(1 )=_C[1],u(2)=136/645-7812/43*_C[0]\}:\nif testrec(res1,res2,u,n) then \+ ok else res1,res2 fi;\nres1:=diffeqtorec((67/2000*t^2+129/1000)*diff(d iff(f(t),t),t)+77/500*t*\ndiff(f(t),t)+5859/125*f(t) = 34/625,f(t),f(n )):\nres2:=\{(468720+1205*n+335*n^2)*f(n)+(1290*n^2+3870*n+2580)*f(n+2 ),f(0)=_C[0],\nf(2)=136/645-7812/43*_C[0],f(1)=_C[1]\}:\nif testrec(re s1,res2,f,n) then ok else res1,res2 fi;\nres1:=diffeqtorec(\{diff(diff (y(x),x),x)+3*x*diff(y(x),x)+y(x)=0,y(0)=0,\n(D(y))(0)=1\},y(x),c(n)): \nres2:=\{c(0) = 0, c(1) = 1, (1+3*n)*c(n)+(n^2+3*n+2)*c(n+2)\}:\nif t estrec(res1,res2,c,n) then ok else res1,res2 fi;\n# Test from the help page\nres1:=diffeqtorec(y(z)=a*diff(y(z),z),y(z),v(n)):\nres2:=v(n)+( -a*n-a)*v(n+1):\nif testrec(res1,res2,v,n) then ok else res1,res2 fi; \n# used to give an order 4 recurrence\nres1:=diffeqtorec(-y(z)+1/(1-z )+D(y)(z)-1/(1-z)^2+z*((D@@2)(y)(z)-2/(1-z)^3),\ny(z),u(n)):\nres2:=\{ u(n)+(-2*n-1-n^2)*u(n+1)+n^2+2*n,u(3)=_C[0],u(0)=36*_C[0]-35,\nu(1)=36 *_C[0]-35,u(2)=9*_C[0]-8\}:\nif testrec(res1,res2,u,n) then ok else re s1,res2 fi;\nrec:=diffeqtorec((2*z^2-1)*D(y)(z)+(z^3-z)*(D@@2)(y)(z)-z ,y(z),u(n)):\np:=rectoproc(rec,u(n),remember):\nres1:=[seq(p(i),i=0..1 0)]:\nres2:=[_C[0], 0, -1/4, 0, -3/32, 0, -5/96, 0, -35/1024, 0, -63/2 560]:\nif res1=res2 then ok else res1,res2 fi;\n# used to crash gfun/i solve\nres1:=diffeqtorec((a[4]*x^4+a[3]*x^3+a[2]*x^2)*diff(f(x),x,x) \+ \n+ (b[3]*x^3+b[2]*x^2+b[1]*x)*diff(f(x),x) \n+ (c[2]*x^2+c[1]*x+c[0]) *f(x),f(x),u(n)):\nres2:=\n\{(a[4]*n^2+(b[3]-a[4])*n+c[2])*u(n)+(a[3]* n^2+(b[2]+a[3])*n+c[1]+b[2])*u(n+1)\n+(a[2]*n^2+(b[1]+3*a[2])*n+c[0]+2 *b[1]+2*a[2])*u(n+2), u(0) = 0, u(1) = 0\}:\nif testrec(res1,res2,u,n) then ok else res1,res2 fi;\n# used to have a problem with u\nres1:=di ffeqtorec(D(f)(u)-u*f(u),f(u),u(n)):\nres2:=\{u(1) = 0, -u(n)+(n+2)*u( n+2)\}:\nif testrec(res1,res2,u,n) then ok else res1,res2 fi;" }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 244 "# rectodiffeq\n# pldx comment : aj out l:= 'l';\nprint(`Testing rectodiffeq`);\nl:= 'l':\nres1:=rectodiff eq(\{a(n) = l*(a(n-1)+l), a(0) = l\},a(n),y(z)):\nres2:=(1-z)*(-l*z+1) *y(z)-l*(1-z)-z*l^2:\nif testdiffeq(res1,res2,y,z) then ok else res1,r es2 fi;\n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 460 "res1:=rectodiffeq(op( 1,listtorec([0,2,10,42,168,660,2574,10010,38896,151164,\n587860,228813 2,8914800,34767720,135727830,530365050,2074316640,8119857900,\n3181073 7420,124718287980],t(n))),t(n),y(z)):\nres2:=\{(-18*z^2+13*z-2)*y(z)+( -12*z^3+7*z^2-z)*(D(y))(z)+6*z,y(0)=0,D(y)(0)=2\}:\nres3:=\{y(0)=0,D(y )(0)=2,(6*z+2)*y(z)+(14*z^2-2*z)*D(y)(z)\n +(4*z^3-z^2)*(D@@2)(y)(z) \}:\nif testdiffeq(res1,res2,y,z) or testdiffeq(res1,res3,y,z)\n th en ok else res1,res2,res3 fi;\n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 2916 "# It would be a mistake to return initial conditions there:\nres 1 := rectodiffeq((1+k^2)*f(k)=1,f(k),y(z)):\nres2 :=(1-z)*y(z)+(1-z)*z *(D(y))(z)+(1-z)*z^2*((D@@2)(y))(z)-1:\nif testdiffeq(res1,res2,y,z) t hen ok else res1,res2 fi;\n# Test from the help page\nres1:=rectodiffe q((n-10)*u(n+1)-u(n),u(n),y(z)):\nres2:=\n\{(z+11)*y(z)-z*D(y)(z), y(0 ) = 0, D(y)(0) = 0, (D@@2)(y)(0) = 0,\n(D@@3)(y)(0) = 0, (D@@4)(y)(0) \+ = 0, (D@@5)(y)(0) = 0, (D@@6)(y)(0) = 0,\n(D@@7)(y)(0) = 0, (D@@8)(y)( 0) = 0, (D@@9)(y)(0) = 0, (D@@10)(y)(0) = 0,\n(D@@11)(y)(0) = _C[0]\}: \nif testdiffeq(res1,res2,y,z) then ok else res1,res2 fi;\n# Test from the help page\n# Initial conditions are useless there:\nres1:=rectodi ffeq(\{(5*n+10)*u(n)+k*u(n+1)-u(n+2),u(0)=0,u(1)=0\},u(n),f(t)):\nres2 :=(-10*t^2-k*t+1)*f(t)-5*t^3*(D(f))(t):\nif testdiffeq(res1,res2,f,t) \+ then ok else res1,res2 fi;\n# Test from the help page (of rectodiffeq) \nres1:=diffeqtorec(res2,f(t),u(n)):\nres2:=\{(5*n+10)*u(n)+k*u(n+1)-u (n+2),u(0)=0,u(1)=0\}:\nif testrec(res1,res2,u,n) then ok else res1,re s2 fi;\n# bug from (fixed pz 111194) #\nres1:=rectodiffeq(\{a(n+3)=a(n),a(0)=1,a(1)=1,a(2)=1\},a(n ),f(x)):\nres2:=1+(x-1)*f(x):\nif testdiffeq(res1,res2,f,x) then ok el se res1,res2 fi;\n# This used to return a non-homogeneous equation\n# \+ with lots of (D@@k)(y)(0). Changed BS Jan 95.\nres1:=rectodiffeq(f(n)- 6*f(n+2)-3*f(n+3)+2*f(n+4),f(n),y(z)):\nres2:=(12*_C[3]-18*_C[2]-36*_C [1])*z^3+(-36*_C[0]+12*_C[2]-18*_C[1])*z^2+\n(12*_C[1]-18*_C[0])*z+12* _C[0]+(-6*z^4+36*z^2+18*z-12)*y(z):\nif testdiffeq(res1,res2,y,z) then ok else res1,res2 fi;\n# This used to lose the condition a(2)=1.\nres 1:=rectodiffeq(\{a(0) = 0, a(1) = 0, a(2) = 1,\n(1+4/5*n+1/5*n^2)*a(n+ 1)+(-6/5-n-1/5*n^2)*a(n+3)\},a(n),y(z)):\nres2:=\{y(0)=0,D(y)(0)=0,-2* y(z)-3*z*D(y)(z)+(-z^2+1)*(D@@2)(y)(z)-2\}:\nif testdiffeq(res1,res2,y ,z) then ok else res1,res2 fi;\n# Check subtleties with the initial co nditions\nres1:=rectodiffeq((n-2)*v(n),v(n),y(z)):\nres2:=_C[0]*z^2-y( z):\nif testdiffeq(res1,res2,y,z) then ok else res1,res2 fi;\nres1:=tr aperror(rectodiffeq(a(n)*v(n),v(n),y(z))):\nres2:=`invalid recurrence \+ or unknown`, a(n)*v(n), v(n):\nif [res1]=[res2] then ok else [res1 ],[res2] fi;\n# More.\neq2:=(1+x)*(D@@2)(y)(x)+D(y)(x):\nres1:=diffeqt orec(eq2,y(x),u(n)):\nres2:=(n+2)*u(n+2)+(n+1)*u(n+1):\nif testrec(res 1,res2,u,n) then ok else res1,res2 fi;\nres1:=rectodiffeq(res2,u(n),y( x)):\nres2:=\{(-x-1)*D(y)(x)+_C[1],y(0)=_C[0]\}:\nif testdiffeq(res1,r es2,y,x) then ok else res1,res2 fi;\n# used to have a problem with u\n res1:=rectodiffeq(-u(n)+(n+2)*u(n+2),u(n),f(u)):\nres2:=\{u*f(u)-(D(f) )(u)+_C[1], f(0) = _C[0]\}:\nif testdiffeq(res1,res2,f,u) then ok else res1,res2 fi;\n# The initial conditions were not properly handled\nre s1:=rectodiffeq(\{u(0) = 0, u(1) = 1, a^2*u(n)+(-2+4*n)*u(n+1)\},u(n), y(x)):\nres2:=\{D(y)(0) = 1, y(0) = 0, (-x*a^2+6)*y(x)-4*x*D(y)(x)-2*x \}:\nif testdiffeq(res1,res2,y,x) then ok else res1,res2 fi;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 4932 "# diffeq+diffeq, diffeq*diffeq, hadamar dproduct, poltodiffeq\nprint(`Testing diffeq+diffeq, diffeq*diffeq, ca uchyproduct, poltodiffeq`);\neq := diff(y(z),z,z)+y(z):\nres1:=`diffeq *diffeq`(eq,eq,y(z)):\nres2:=(D@@3)(y)(z)+4*D(y)(z):\nif testdiffeq(re s1,res2,y,z) then ok else res1,res2 fi;\nrec1:=\{u(n+1)=(n+1)*u(n),u(0 )=1\}:\nrec2:=\{u(n+1)=2*u(n),u(0)=1\}:\ndeq1:=rectodiffeq(rec1,u(n),y (z)):\ndeq2:=rectodiffeq(rec2,u(n),y(z)):\ndeq3:=`diffeq+diffeq`(deq1, deq2,y(z)):\nrec3:=diffeqtorec(deq3,y(z),u(n)):\nres:=rectoproc(rec3,u (n))(100)-(2^100+100!):\nif res=0 then ok else res,0 fi;\n# Test from \+ the help page\neq1 := D(y)(x)-y(x):\neq2 := (1+x)*(D@@2)(y)(x)+D(y)(x) :\nres1:=`diffeq+diffeq`(eq1,eq2,y(x)):\nres2:=(-x-3)*(D(y))(x)+(-x^2+ 1-2*x)*((D@@2)(y))(x)+(2+3*x+x^2)*((D@@3)(y))(x):\nif testdiffeq(res1, res2,y,x) then ok else res1,res2 fi;\n# Test from the help page\nres1: =`diffeq*diffeq`(eq1,eq2,y(x)):\nres2:=y(x)*x+(-2*x-1)*(D(y))(x)+(1+x) *((D@@2)(y))(x):\nif testdiffeq(res1,res2,y,x) then ok else res1,res2 \+ fi;\n# Test from the help page\nres1:=hadamardproduct(eq1,eq2,y(x)):\n res2:=\{(-x-1)*(D(y))(x)-(D@@2)(y)(x)*x+_C[1],y(0)=_C[0],D(y)(0)=_C[1] \}:\nif testdiffeq(res1,res2,y,x) then ok else res1,res2 fi;\n# Initia l conditions were lost. Fixed BS Jan 95.\nSin:=\{diff(y(z),z,z)=-y(z), y(0)=0,D(y)(0)=1\}:\nCos:=\{diff(y(z),z,z)=-y(z),y(0)=1,D(y)(0)=0\}:\n Sin2:=`diffeq*diffeq`(Sin,Sin,y(z)):\nCos2:=`diffeq*diffeq`(Cos,Cos,y( z)):\none:=`diffeq+diffeq`(Sin2,Cos2,y(z)):\nres:=\{4*D(y)(z)+(D@@3)(y )(z),y(0)=1,D(y)(0)=0,(D@@2)(y)(0)=0\}:\nif testdiffeq(one,res,y,z) th en ok else one,res fi;\n# Invalid format for the result. Fixed BS Jan \+ 95.\ndeq:=(1-z-z^2)*y(z)-1:\nres1:=`diffeq+diffeq`(deq,deq,y(z)):\nres 2:=(1-z-z^2)*y(z)-2:\nif testdiffeq(res1,res2,y,z) then ok else res1,r es2 fi;\n# Invalid initial conditions in the result. Fixed BS Feb 95. \nres1:=`diffeq+diffeq`(\n \{y(0)=a, D(y)(0)=a, y(z)+(3*z-1)*D(y)(z)+z ^2*(D@@2)(y)(z)\},\n \{y(0)=a/2, D(y)(0)=a, 2*y(z)+(4*z-1)*D(y)(z)+z^2 *(D@@2)(y)(z)\},y(z)):\nres2:=\n\{-4*y(z)+(-32*z+8)*D(y)(z)+(-38*z^2+1 0*z-1)*(D@@2)(y)(z)\n+(-12*z^3+2*z^2)*(D@@3)(y)(z)-z^4*(D@@4)(y)(z),\n D(y)(0) = 2*a, (D@@2)(y)(0) = 10*a, y(0) = 3/2*a,\n(D@@3)(y)(0) = 108* a\}:\nif testdiffeq(res1,res2,y,z) then ok else res1,res2 fi;\nres1:=` diffeq+diffeq`(\n \{y(0)=a, D(y)(0)=a, y(z)+(3*z-1)*D(y)(z)+z^2*(D@@2) (y)(z)\},\n \{y(0)=b/2, D(y)(0)=b, 2*y(z)+(4*z-1)*D(y)(z)+z^2*(D@@2)(y )(z)\},y(z)):\nres2:=\n\{-4*y(z)+(-32*z+8)*D(y)(z)+(-38*z^2+10*z-1)*(D @@2)(y)(z)\n+(-12*z^3+2*z^2)*(D@@3)(y)(z)-z^4*(D@@4)(y)(z),\nD(y)(0) = a+b, (D@@2)(y)(0) = 4*a+6*b, y(0) = a+b/2,\n(D@@3)(y)(0) = 36*a+72*b \}:\nif testdiffeq(res1,res2,y,z) then ok else res1,res2 fi;\n# Wrong \+ initial conditions. Fixed BS Jan 96.\nres1:=poltodiffeq(y1(x)^3, [(D@@ 2)(y1)(x)+y1(x)], [y1(x)], y(x)):\n# Don't check the answer, it is ord ering-sensitive\n# res2:=\{`@@`(D,4)(y)(x)+10*`@@`(D,2)(y)(x)+9*y(x), \+ D(y)(0) = -3*_C[1]*_C[0]^2,\n# y(0) = _C[0]^3, `@@`(D,2)(y)(0) = -3*_C [0]^3+6*_C[1]^2*_C[0],\n# `@@`(D,3)(y)(0) = 21*_C[1]*_C[0]^2-6*_C[1]^3 \}:\n# if testdiffeq(res1,res2,y,x) then ok else res1,res2 fi;\n# Test from the help page\nSin:=\{diff(y1(z),z,z)=-y1(z),y1(0)=0,D(y1)(0)=1 \}:\nCos:=\{diff(y2(z),z,z)=-y2(z),y2(0)=1,D(y2)(0)=0\}:\nres:=poltodi ffeq(y1(z)^2+y2(z)^2,[Sin,Cos],[y1(z),y2(z)],y(z)):\nif testdiffeq(one ,res,y,z) then ok else one,res fi;\n# Test from the help page\nres1:=p oltodiffeq(y1(z)^2+diff(y1(z),z)^2,[Sin],[y1(z)],y(z)):\nres2:=\{y(0) \+ = 1, D(y)(z)\}:\nif testdiffeq(res1,res2,y,z) then ok else res1,res2 f i;\nbessel:=z^2*diff(w(z),z,z)+z*diff(w(z),z)+(z^2-nu^2)*w(z):\nj0:=\{ subs(nu=0,w=w0,bessel),w0(0)=1,D(w0)(0)=0\}:\nj1:=\{subs(nu=1,w=w1,bes sel),w1(0)=0,D(w1)(0)=1/2\}:\nres1:=poltodiffeq(diff(w0(z),z)+w1(z),[j 0,j1],[w0(z),w1(z)],y(z)):\nres2:=\{(z^2-1)*y(z)+(D@@2)(y)(z)*z^2+z*(D (y))(z), y(0) = 0, (D(y))(0) = 0\}:\nif testdiffeq(res1,res2,y,z) then ok else res1,res2 fi;\nres1:=poltodiffeq(y2(z)^2+y2(z),[Cos],[y2(z)], y(z)):\nres2:=\{(D@@5)(y)(z)+5*(D@@3)(y)(z)+4*D(y)(z), y(0) = 2, D(y)( 0) = 0, \n(D@@2)(y)(0) = -3, (D@@3)(y)(0) = 0, (D@@4)(y)(0) = 9\}:\nif testdiffeq(res1,res2,y,z) then ok else res1,res2 fi;\nres1:=poltodiff eq(y(x),[x*y(x)-1],[y(x)],y(x)):\nres2:=x*y(x)-1:\nif testdiffeq(res1, res2,y,z) then ok else res1,res2 fi;\nres1:=poltodiffeq(y[1](x),[\{dif f(y[1](x),x)-y[1](x), y[1](0) = 1\}],[y[1](x)],y(x)):\nres2:=\{D(y)(x) -y(x), y(0) = 1\}:\nif testdiffeq(res1,res2,y,x) then ok else res1,res 2 fi;\nres1:=poltodiffeq((y[2])(x)+(y[1])(x), [\{(y[1])(0) = 0 , (D(y[ 1]))(0) = 1,\n diff(diff((y[1])(x),x),x)+(y[1])(x)\}, 1-x*(y[2])(x)], \+ [(y[1 ])(x),(y[2])(x)], y(x)):\nres2:=(D@@2)(y)(x)*x^3-2+y(x)*x^3-x^2: \nif testdiffeq(res1,res2,y,x) then ok else res1,res2 fi;\n# This used to lose an initial condition\nres1:=poltodiffeq(z^4*y[1](z),\n[\{D(y[ 1])(0) = 1, diff(diff(y[1](z),z),z)+y[1](z), y[1](0) = 0\}],[y[1](z)], y(z)):\nres2:=\{(20+z^2)*y(z)+(D@@2)(y)(z)*z^2-8*D(y)(z)*z, y(0) = 0, \+ (D@@4)(y)(0) = \n0, (D@@5)(y)(0) = 120, (D@@2)(y)(0) = 0, (D@@3)(y)(0) = 0, D(y)(0) = 0\}:\nif testdiffeq(res1,res2,y,z) then ok else res1,r es2 fi;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 2870 "# rec+rec, rec*rec, ca uchyproduct, poltorec\nprint(`Testing rec+rec, rec*rec, cauchyproduct, poltorec`);\n# Test from the help page\nrec1:=u(n+1)=(n+1)*u(n):\nrec 2:=u(n+1)=2*u(n):\nres1:=`rec*rec`(rec1,rec2,u(n)):\nres2:=(-2*n-2)*u( n)+u(n+1):\nif testrec(res1,res2,u,n) then ok else res1,res2 fi;\n# Te st from the help page\nres1:=cauchyproduct(rec1,rec2,u(n)):\nres2:=\{( 2*n+4)*u(n)+(-n-4)*u(n+1)+u(n+2),u(0)=_C[0],u(1)=3*_C[0]\}:\nif testre c(res1,res2,u,n) then ok else res1,res2 fi;\n# This used to lose the i nitial conditions. Fixed BS Jan 95\nres1:=`rec*rec`(\{f(n+2)=f(n+1)+f( n),f(0)=1,f(1)=1\},f(n)=-1,f(n)):\nres2:=\{f(n)+f(n+1)-f(n+2),f(0)=-1, f(1)=-1\}:\nif testrec(res2,res2,f,n) then ok else res1,res2 fi;\n# Th is didn't work for many reasons. Fixed BS Jan 95.\nfib:=\{f(n+2)=f(n+1 )+f(n),f(0)=0,f(1)=1\}:\nrec1:=`rec*rec`(fib,fib,f(n)):\nrec2:=`rec*re c`(\{f(n+2)=f(n+1)+f(n),f(0)=1,f(1)=1\},\{f(n+2)=f(n+1)+f(n),f(1)=0,f( 2)=1\},f(n)):\nrec2:=`rec*rec`(rec2,f(n)=-1,f(n)):\nres1:=`rec+rec`(re c1,rec2,f(n)):\nres2:=\{f(n+1)+f(n),f(0)=1\}:\nif testrec(res2,res2,f, n) then ok else res1,res2 fi;\n# This used to find a 3rd order recurre nce. Fixed BS March 95.\nrec1:=\{u(n+1)=(n+1)*u(n),u(1)=1\}:\nrec2:=\{ u(n+1)=2*u(n),u(1)=1\}:\nres1:=`rec+rec`(rec1,rec2,u(n)):\nres2:=\{(2* n+2*n^2)*u(n)+(-1+n)*u(n+2)+(2-n^2-3*n)*u(n+1),\nu(1) = 2, u(0) = 3/2, u(2) = 4, u(3) = 10\}:\nif testrec(res2,res2,f,n) then ok else res1,r es2 fi;\n# an example with parameters, used to give a 4th order rec. F ixed BS Nov 95.\nrec:=y(n+1)=a*y(n)-y(n-1): ini:=y(0)=c[0],y(1)=c[1]: \nres1:=`rec+rec`(`rec*rec`(y(n)=-1,\n `rec*rec`(\{rec,y(0)=c[1], y(1)=a*c[1]-c[0]\},\n \{rec,y(1)=c[0],y(2)=c[1]\},y(n)) ,y(n)),\n `rec*rec`(\{rec,ini\},\{rec,ini\},y(n)),y(n)):\nres2:= \n\{-y(n)+(-1+a^2)*y(n+1)+(1-a^2)*y(n+2)+y(n+3), y(0) = -a*c[1]*c[0]+c [1]^2+c[0]\n^2, y(1) = -a*c[1]*c[0]+c[1]^2+c[0]^2, y(2) = -a*c[1]*c[0] +c[1]^2+c[0]^2\}:\nif testrec(res1,res2,y,n) then ok else res1,res2 fi ;\n# Bug in the inhomogeneous case. Fixed BS Aug 95\nrec1:=u(n+1)-u(n) = -2/(n+1)^3:\nrec2:=(n+1)*u(n+1)+u(n):\nres1:=`rec*rec`(rec1,rec2,u( n)):\nres2:=(n^2+2*n+1)*u(n)+(2*n^3+9*n^2+15*n+9)*u(n+1)+\n(n^4+8*n^3+ 24*n^2+32*n+16)*u(n+2):\nif testrec(res1,res2,u,n) then ok else res1,r es2 fi;\n# Test from the help page\nrec1:=\{u1(n+1)=(n+1)*u1(n),u1(0)= 1\}:\nrec2:=\{u2(n+2)=2*u2(n+1)-3*n*u2(n),u2(1)=1,u2(0)=1\}:\nres1:=po ltorec(u1(n)^2+2*u1(n)*u2(n),[rec1,rec2],[u1(n),u2(n)],u(n)):\nres2:= \n\{u(2) = 12, u(3) = 48, u(0) = 3, u(1) = 3, (-462*n^4-363*n^2-90*n-5 79*n^3-3*n\n^7-39*n^6-192*n^5)*u(n)+(354*n^2+254*n+60+209*n^3+5*n^5+54 *n^4)*u(n+1)+(-15-n^ 4\n-46*n^2-62*n-12*n^3)*u(n+2)+(4*n+n^2)*u(n+3)\} :\nif testrec(res1,res2,u,n) then ok else res1,res2 fi;\n# Test from t he help page\n# Cassini's identity\nfib:=\{F(n+2)=F(n+1)+F(n),F(0)=1,F (1)=1\}:\nres1:=poltorec(F(n+2)*F(n)-F(n+1)^2,[fib],[F(n)],f(n)):\nres 2:=\{f(0) = 1, f(n+1)+f(n)\}:\nif testrec(res1,res2,u,n) then ok else \+ res1,res2 fi;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 752 "# borel, invborel \nprint(`Testing borel, invborel`);\n# Test from the help page\nrec:=a (n)-a(n-1)-a(n-2):\nres1:=borel(rec,a(n)):\nres2:=-a(n)+(-n-1)*a(n+1)+ (n^2+3*n+2)*a(n+2):\nif testrec(res1,res2,a,n) then ok else res1,res2 \+ fi;\n# Test from the help page\nres1:=invborel(res2,a(n)):\nres2:=a(n+ 2)-a(n+1)-a(n):\nif testrec(res1,res2,a,n) then ok else res1,res2 fi; \n# Test from the help page\nres1:=borel(\{a(n)=a(n-1)+a(n-2)+n,a(0)=0 ,a(1)=1\},a(n)):\nres2:=\{(n+3)*a(n)+a(n+1)*(n+1)+(-19*n-10-2*n^3-11*n ^2)*a(n+2)+\n(n^4+8*n^3+23*n^2+28*n+12)*a(n+3), a(2) = 3/2, a(0) = 0, \+ a(1) = 1\}:\nif testrec(res1,res2,a,n) then ok else res1,res2 fi;\nrec :=\{a(n+2)-a(n+1)-a(n),a(0)=0,a(1)=1\}:\nrec2:=borel(rec,a(n)):\nrec3: =invborel(rec2,a(n)):\nif rec3=rec then ok else rec3,rec fi;\n" }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 154 "rec3:=rectodiffeq(rec2,a(n),f(t)): \nrec2:=invborel(rec3,f(t),'diffeq'):\nres:=diffeqtorec(rec2,f(t),a(n) ):\nif testrec(res,rec,a,n) then ok else rec,res fi;\n" }}{PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 43 "# pldx comment : ajout\351 un +/- pour le test " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 142 "eq:=\{z^2*diff(y(z),z,z)+y(z)= z,D(y)(0)=1\}:\nres1:=borel(eq,y(z),'diffeq'):\nres2:=z-y(z):\nif res1 =res2 or res1=-res2 then ok else res1,res2 fi;\n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 183 "res1:=borel(rectodiffeq(invborel(\{a(n)=a(n-1)+a(n-2 ),a(0)=0,a(1)=1\},a(n)),a(n),\nf(t)),f(t),'diffeq'):\nres2:=(-t^2-t+1) *f(t)-t:\nif testdiffeq(res1,res2,f,t) then ok else res1,res2 fi;\n" } }{PARA 0 "> " 0 "" {MPLTEXT 1 0 156 "res1:=borel(\{y(0)=1, (D(y))(0) = 1, (1-z)*y(z)-z^2*(D(y))(z)-1\},y(z),'diffeq'):\nres2:=(-z+1)*y(z)-1: \nif testdiffeq(res1,res2,y,z) then ok else res1,res2 fi;" }}{PARA 0 " > " 0 "" {MPLTEXT 1 0 2125 "# algeqtodiffeq\nprint(`Testing algeqtodif feq`);\n# No initial conditions needed.\n# Test from the help page\nre s1:=algeqtodiffeq(y=1+z*y^2,y(z)):\nres2:=(-z/4+z**2)*D(y)(z)+(-1/4+z/ 2)*y(z)+1/4:\nif testdiffeq(res1,res2,y,z) then ok else res1,res2 fi; \nres1:=algeqtodiffeq(y^2-x^2,y(x)):\nres2:=\{x*D(y)(x)-y(x),y(0)=0\}: \nif testdiffeq(res1,res2,y,x) then ok else res1,res2 fi;\neq:=-28*x** 2+3*y*x-31*y+y^2:\nres1:=algeqtodiffeq(eq,y(x)):\nres2:=\{1736/121*x+( -x+93/121)*y(x)+(x^2-186/121*x+961/121)*(D(y))(x),\ny(0)=-31/3*_C[0],D (y)(0)=_C[0]\}:\nif testdiffeq(res1,res2,y,x) then ok else res1,res2 f i;\nres1:=algeqtodiffeq(eq,y(x),\{y(0)=0\}):\nres2:=\{1736/121*x+(-x+9 3/121)*y(x)+(x^2-186/121*x+961/121)*(D(y))(x),\ny(0) = 0,D(y)(0)=0\}: \nif testdiffeq(res1,res2,y,x) then ok else res1,res2 fi;\nres1:=trape rror(algeqtodiffeq(eq,y(x),\{y(0)=1\})):\nres2:=`invalid initial condi tions`:\nif res1=res2 then ok else res1,res2 fi;\n# Test from the help page\neq:=56*a^3+7*a^3*y^3-14*y*z:\ntt:=rectoproc(diffeqtorec(algeqto diffeq(eq,y(z),\{y(0)=-2\}),y(z),u(n)),u(n),\nremember):\nres1:=map(no rmal,series(subs(y=listtoseries([seq(tt(i),i=0..10)],z,ogf),eq),z,10)) :\nres2:=series(O(z^10),z):\nif res1=res2 then ok else res1,res2 fi;\n # Test from the help page (of diffeqtorec)\neq:=y=1+z*(y^2+y^3):\ntt:= rectoproc(diffeqtorec(algeqtodiffeq(eq,y(z),\{\}),y(z),u(n)),u(n),reme mber):\nres1:=series(subs(y=listtoseries([seq(tt(i),i=0..10)],z,ogf),o p(1,eq)-op(2,eq))\n,z,10):\nres2:=series(O(z^10),z):\nif res1=res2 the n ok else res1,res2 fi;\n# Test from the help page\nres1:=algeqtodiffe q(y^5*(1-x)=1,y(x),\{y(0)=1\}):\nres2:=\{y(x)+(-5+5*x)*D(y)(x),y(0)=1 \}:\nif testdiffeq(res1,res2,y,x) then ok else res1,res2 fi;\nres1:=al geqtodiffeq(x*y^4-1,y(x)):\nres2:=y(x)+4*x*(D(y))(x):\nif testdiffeq(r es1,res2,y,x) then ok else res1,res2 fi;\n# old bug\nres1:=algeqtodiff eq(-(4*x^2*z+4*z^2*x-4*x*z-x-z+1)\n*(4*f^2*x^2*z+4*f^2*z^2*x-4*f^2*x*z -f^2*x-f^2*z+f^2+4*f*x*z-f+x),f(x),\{f(0) = 1/(-z+1)\}):\nres2:=\{-2*x *z+1-z+(4*x^2*z-4*z^2*x-2*x*z-2*z^2+4*z-1)*f(x)+(-12*x^2*z-4*z^2*x+2*x *z+3*x+\nz-1+8*x^3*z+8*x^2*z^2-2*x^2)*(D(f))(x), f(0) = -1/(-1+z)\}: \nif testdiffeq(res1,res2,f,x) then ok else res1,res2 fi;" }}{PARA 0 " > " 0 "" {MPLTEXT 1 0 3637 "# algebraicsubs\nprint(`Testing algebraics ubs`);\ndeq:=\{y(0)=1,D(y)(0)=1/2,(1-z)*y(z)+(1-z)*z*(D(y))(z)+(1-z)*z ^2*((D@@2)(y))(z)-1\}:\nres1:=algebraicsubs(deq,(1-z)*y+z,y(z)):\nres2 :=-y(z)+(-2*z^3+3*z^2-z)*D(y)(z)+(-z^4+2*z^3-z^2)*(D@@2)(y)(z)+1-z:\ni f testdiffeq(res1,res2,y,z) then ok else res1,res2 fi;\n# No initial c ondition needed\nres1:=`diffeq*diffeq`(res2,y(z)*(1-z)-1,y(z)):\nres2: =(2*z^2-z+1)*y(z)+(4*z^3-5*z^2+z)*D(y)(z)+(z^4-2*z^3+z^2)*(D@@2)(y)(z) -1:\nif testdiffeq(res1,res2,y,z) then ok else res1,res2 fi;\nres1:=di ffeqtorec(res2,y(z),g(n)):\nres2:=\{g(0) = 1, g(1) = 1/2, (n^2+3*n+2)* g(n)+(-6-7*n-2*n^2)*g(n+1)+(4*n+5+n^2)\n*g(n+2)\}:\nif testrec(res1,re s2,g,n) then ok else res1,res2 fi;\nres1:=rectoproc(res2,g(n))(20):\nr es2:=-3845848802828440117248/7315582032468906326065:\nif res1=res2 the n ok else res1,res2 fi;\n# Test from the help page\nres1:=algebraicsub s((D@@2)(f)(t)+f(t),f^2-1+4*t,f(t)):\nres2:=-f(t)+D(f)(t)/2+(t-1/4)*(D @@2)(f)(t):\nif testdiffeq(res1,res2,f,t) then ok else res1,res2 fi;\n res1:=algebraicsubs(\{y(0) = 1, -1+(z+1)*y(z)+(z^2+z)*diff(y(z),z)\n+( z^2+z^3)*diff(diff(y(z),z),z), (D(y))(0) = -1/2\},z*y^2+(2*z-1)*y+z,y( z)):\nres2:=\{y(0)=1, 2*y(z)+(36*z^2-18*z+2)*D(y)(z)+(3*z-28*z^2+64*\n z^3)*(D@@2)(y)(z)+(16*z^4-8*z^3+z^2)*(D@@3)(y)(z)-1\}:\nif testdiffeq( res1,res2,y,z) then ok else res1,res2 fi;\n# bug in versions < 2.29 ## # cos(x+2^(1/2)*x^2):\nres1 := algebraicsubs((D@@2)(y)(x)+y(x),2*x^4-y ^2+2*y*x-x^2,y(x)):\n#res2 := \{(768*x^6-2048*x^8+864*x^4+87-236*x^2)* y(x)+(320*x^3+280*x)*D(y)(x)\n#+(18-136*x^2-512*x^6)*(D@@2)(y)(x)+(128 *x^3-8*x)*(D@@3)(y)(x)+(-32*x^4+4*x^2 +\n#3)*(D@@4)(y)(x), y(0) = -_C[ 0], D(y)(0) = -_C[1],\n#(D@@3)(y)(0) = 1/2*(12*_C[0]+_C[1]*RootOf(_Z^2 -2))*RootOf(_Z^2-2),\n#(D@@2)(y)(0) = -2*_C[1]*RootOf(_Z^2-2)+_C[0]\}: \n#if testdiffeq(res1,res2,y,x) then ok else res1,res2 fi;\nres1:=alge braicsubs(\{(D@@2)(y)(x)+y(x),y(0)=1,D(y)(0)=0\},\n2*x^4-y^2+2*y*x-x^2 ,y(x)):\n# don't test the answer, it is ordering sensitive\n#res2:=\{( 768*x^6-2048*x^8+864*x^4+87-236*x^2)*y(x)+\n#(320*x^3+280*x)*(D(y))(x) +(18-136*x^2-512*x^6)*(D@@2)(y)(x)+\n#(128*x^3-8*x)*(D@@3)(y)(x)+(-32* x^4+4*x^2+3)*(D@@4)(y)(x),\n#D(y)(0) = 0, (D@@3)(y)(0) = -6*RootOf(_Z^ 2-2), (D@@2)(y)(0) = -1, y(0) = 1\}:\n#if testdiffeq(res1,res2,y,x) th en ok else res1,res2 fi;\nres1:=algebraicsubs(\{y(0)=0,D(y)(0)=1, diff (diff(y(x),x),x)+y(x)\},y-x^2,y(x)):\nres2:=\{y(0)=0,D(y)(0)=0,(D@@2)( y)(0)=2,4*x^3*y(x)-D(y)(x)+x*(D@@2)(y)(x)\}:\nif testdiffeq(res1,res2, y,x) then ok else res1,res2 fi;\nres1:=algebraicsubs(\{y(x)+((`@@`(D,2 ))(y))(x), y(0) = 1, \n(D(y))(0) = 0\}, y^3-x^2, y(x), \{y(0) = 0\}): \nres2:=64*x^3*y(x)+315*D(y)(x)-315*x*(D@@2)(y)(x)+2025*x^3*(D@@4)(y)( x)+\n3645*x^4*(D@@5)(y)(x)+729*x^5*(D@@6)(y)(x):\nif testdiffeq(res1,r es2,y,x) then ok else res1,res2 fi;\nres1:=algebraicsubs(\{y(x)+((`@@` (D,2))(y))(x), y(0) = 1, \n (D(y))(0) = 0\}, y^2-x, y(x), \{y(0) = 0\}):\nres2:=\{y(0) = 1, y(x)+2*D(y)(x)+4*x*(D@@2)(y)(x)\}:\nif tes tdiffeq(res1,res2,y,x) then ok else res1,res2 fi;\nres1:=algebraicsubs (diff(y(x),x)*x+(1+x^2)*diff(diff(y(x),x),x),y-1-x,y(x)):\nres2:=(1+x) *D(y)(x)+(2+2*x+x^2)*(D@@2)(y)(x):\nif testdiffeq(res1,res2,y,x) then \+ ok else res1,res2 fi;\n# arcsec(1/z)\nres1:=algebraicsubs((2*z^2-1)*di ff(y(z),z)+(z^3-z)*diff(diff(y(z),z),z),y*z-1,y(z)):\nres2:=-z*D(y)(z) +(-z^2+1)*(D@@2)(y)(z):\nif testdiffeq(res1,res2,y,x) then ok else res 1,res2 fi;\n# there used to remain a D(x) in the result\nres1:=algebra icsubs(\{y^2*`@@`(D,2)(h)(y)+y*D(h)(y)+(y^2-1)*h(y),\n `@@`(D,2)(h)( 0) = 0, D(h)(0) = 1/2\},h-x*y^2,h(y)):\nres2:=\{(-4+4*x^2*y^4)*h(y)+y* D(h)(y)+y^2*(D@@2)(h)(y),D(h)(0)=0,h(0)=0,\n (D@@2)(h)(0) = x\}:\ni f testdiffeq(res1,res2,h,y) then ok else res1,res2 fi;" }}{PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 1389 "# algeqtoseries\nprint(`Testing algeqtoserie s`);\nP:=t+t^2-x:\nres1:=algeqtoseries(P,x,t,6):\nres2:=\n[series(-1-1 *x+1*x^2-2*x^3+5*x^4-14*x^5+O(x^6),x,6), series(1*x-1*x^2+2*x^3-5*x\n^ 4+14*x^5-42*x^6+O(x^7),x,7)]:\nif res1=res2 then ok else res1,res2 fi; \nP:=x+x*t+x*t^2/2+(x-1)*t^3/6+x*t^4/24:\nres1:=algeqtoseries(P,x,t,6) :\nres2:=\n[series(4*x^(-1)-4-3*x-9/2*x^2-69/8*x^3-75/4*x^4+O(x^5),x,5 ), RootOf(_Z^3-6)*x^\n(1/3)+1/3*RootOf(_Z^3-6)^2*x^(2/3)+x+16/27*RootO f(_Z^3-6)*x^(4/3)+125/324*\nRootOf(_Z^3-6)^2*x^(5/3)+3/2*x^2+O(x^(7/3) )]:\nif res1=res2 then ok else res1,res2 fi;\nP:=x + (x-1)*t + (x-2)*t ^2 + (x-3)*t^3:\nres1:=algeqtoseries(P,x,t,6):\nres2:=\n[series(RootOf (3*_Z^2+2*_Z+1)+(-1/3+1/3*RootOf(3*_Z^2+2*_Z+1))*x+(11/18*RootOf(\n3*_ Z^2+2*_Z+1)+13/18)*x^2+(-77/54-151/54*RootOf(3*_Z^2+2*_Z+1))*x^3+(745/ 648+\n5147/648*RootOf(3*_Z^2+2*_Z+1))*x^4+(14677/1944-23041/1944*RootO f(3*_Z^2+2*_Z +1\n))*x^5+O(x^6),x,6), series(1*x-1*x^2+1*x^3+3*x^4-23* x^5+83*x^6+O(x^7),x,7)]:\nif res1=res2 then ok else res1,res2 fi;\n# T est from the help page\nP:=y-(x^2+x^3*y^2+x^6*y^5):\nres1:=algeqtoseri es(P,x,y,4):\nres2:=\n[series(1*x^2+O(x^6),x,6), -1/x^(3/2)-1/4+O(x^(1 /2)), 1/x^(3/2)-1/4+O(x^(1/2))\n, RootOf(_Z^2+1)/x^(3/2)+1/4+O(x^(1/2) )]:\nif res1=res2 then ok else res1,res2 fi;\n# Test from the help pag e\nres1:=algeqtoseries(P,x,y,10,true):\nres2:=[series(x^2+x^7+O(x^12), x,12)]:\nif res1=res2 then ok else res1,res2 fi;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 754 "# algfuntoalgeq\nprint(`Testing algfuntoalgeq`);\n# \+ Test from the help page\nres1:=algfuntoalgeq(a*RootOf(_Z^5+1)*x^(2/3), y(x)):\nres2:=y^15+a^15*x^10:\nif res1=res2 then ok else res1,res2 fi; \n# Test from the help page\nres1:=algfuntoalgeq(a*RootOf(_Z^5+1)*x^(2 /3),y(x),'algebraic'):\nres2:=y^3-a^3*RootOf(_Z^5+1)^3*x^2:\nif res1=r es2 or res1=-res2 then ok else res1,res2 fi;\n# Test from the help pag e\nres1:=algfuntoalgeq(5^(1/3)+3*7^(2/3),y(x)):\nres2:=y^9-3984*y^6+51 12147*y^3-2342039552:\nif res1=res2 then ok else res1,res2 fi;\n# Test from the help page\nres1:=algfuntoalgeq(1+RootOf(_Z^3+1)*x,y(x),'res3 '):\nres2:=-x^3-y^3+3*y^2-3*y+1:\nres4:=\{(D(y))(0) = RootOf(_Z^3+1), \+ y(0) = 1, (D@@2)(y)(0)=0\}:\nif res1=res2 and res3=res4 then ok else r es1,res2,res3,res4 fi;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 4027 "# holex prtodiffeq\nprint(`Testing holexprtodiffeq`);\n# Test from the help pa ge\nres1:=holexprtodiffeq(BesselJ(2,x),y(x)):\nres2:=\{x^2*(D@@2)(y)(x )+x*D(y)(x)+(x^2-4)*y(x),\n(D@@2)(y)(0) = 1/4, (D@@3)(y)(0) = 0, y(0) \+ = 0, D(y)(0) = 0\}:\nif testdiffeq(res1,res2,y,x) then ok else res1,re s2 fi;\n# Test from the help page\nres1:=holexprtodiffeq(arcsec(1/x)+s in(x)^2,y(x)):\nres2:=\{y(0)=1/2*Pi,(D@@3)(y)(0)=-1,D(y)(0)=-1,(D@@2)( y)(0) = 2,\n(16*x^5-8*x^3+52*x)*D(y)(x)+(16*x^6-40*x^4+44*x^2-20)*(D@@ 2)(y)(x)\n+(4*x^5-2*x^3+13*x)*(D@@3)(y)(x)+(4*x^6-10*x^4+11*x^2-5)*(D@ @4)(y)(x)\}:\nif testdiffeq(res1,res2,y,x) then ok else res1,res2 fi; \nres1:=holexprtodiffeq(arcsinh(x^3+x+1), y(x)):\nres2:=\{D(y)(0) = 1/ 2*2^(1/2), y(0) = arcsinh(1),\n(3*x^7+3*x^5+x^3-11*x-3*x^4-6*x^2+1)*D( y)(x)\n+(6*x^5+3*x^8+7*x^6+8*x^3+5*x^4+7*x^2+2*x+2)*(D@@2)(y)(x)\}:\ni f testdiffeq(res1,res2,y,x) then ok else res1,res2 fi;\nres1:=holexprt odiffeq(exp((x^2+1)^(1/2)), y(x)):\nres2:=\{y(0) = exp(1), -x^3*y(x)-D (y)(x)+(x^3+x)*(D@@2)(y)(x),\n(D@@2)(y)(0) = exp(1), D(y)(0) = 0\}:\ni f testdiffeq(res1,res2,y,x) then ok else res1,res2 fi;\nres1:=holexprt odiffeq(BesselI(3,x^2+x), y(x)):\nres2:=\{(D@@3)(y)(0) = 1/8, (D@@2)(y )(0) = 0,\n(-80*x^3-109*x^2-54*x-8*x^7-28*x^6-38*x^5-25*x^4-9)*y(x)+\n (x+4*x^3+3*x^2+2*x^4)*D(y)(x)+(x^2+2*x^5+5*x^4+4*x^3)*(D@@2)(y)(x),\ny (0) = 0, (D(y))(0) = 0\}:\nif testdiffeq(res1,res2,y,x) then ok else r es1,res2 fi;\nres1:=holexprtodiffeq(sin((1-x^2)^(1/2))+exp(1+x), y(x)) :\nres2:=\{y(0) = sin(1)+exp(1), (D@@2)(y)(0) = exp(1)-cos(1), D(y)(0) = exp(1),\n(x^3-3*x^2+3*x)*y(x)+(-x^3+x^2-1)*D(y)(x)\n+(-x^3+3*x^2-2* x)*(D@@2)(y)(x)+(1-x-x^2+x^3)*(D@@3)(y)(x)\}:\nif testdiffeq(res1,res2 ,y,x) then ok else res1,res2 fi;\nres1:=holexprtodiffeq(sin(z)+RootOf( _Z^3+2), y(z)):\nres2:=\{y(0) = RootOf(_Z^3+2), (D@@2)(y)(z)+y(z)-Root Of(_Z^3+2),D(y)(0) = 1\}:\nif testdiffeq(res1,res2,y,z) then ok else r es1,res2 fi;\nres1:=holexprtodiffeq((1+z*(1+z)^(1/2))^(1/2), y(z)):\nr es2:=\{y(0) = 1, D(y)(0) = 1/2,\n(-27*z^3-54*z^2-36*z-8)*y(z)+(48*z^4+ 112*z^3+96*z^2+56*z+32)*D(y)(z)\n+(48*z^5+128*z^4+112*z^3-16*z^2-80*z- 32)*(D@@2)(y)(z)\}:\nif testdiffeq(res1,res2,y,z) then ok else res1,re s2 fi;\nres1:=holexprtodiffeq(BesselJ(1,x)-1/2*x+1/16*x^3-1/384*x^5+1/ 18432*x^7, y(x)):\nres2:=\{(D@@2)(y)(0) = 0, (D@@7)(y)(0) = 0, (D@@6)( y)(0) = 0, (D@@5)(y)(0) = 0,\n(D@@4)(y)(0) = 0, (D@@3)(y)(0) = 0, (D@@ 8)(y)(0) = 0, D(y)(0) = 0, y(0) = 0,\n(18432*x^2-18432)*y(x)+18432*x^2 *(D@@2)(y)(x)-x^9+18432*x*D(y)(x)\}:\nif testdiffeq(res1,res2,y,x) the n ok else res1,res2 fi;\nres1:=holexprtodiffeq(RootOf(_Z^5+_Z-x), y(x) ):\nres2:=\{(D@@2)(y)(0) = 0, (D@@3)(y)(0) = 0, D(y)(0) = 1, y(0) = 0, \n-1155*y(x)+31875*x*D(y)(x)+73125*x^2*(D@@2)(y)(x)+31250*x^3*(D@@3)(y )(x)\n+(3125*x^4+256)*(D@@4)(y)(x)\}:\nif testdiffeq(res1,res2,y,x) th en ok else res1,res2 fi;\nres1:=holexprtodiffeq(ln((1-x^2)^(1/2)), y(x )):\nres2:=\{D(y)(x)*(-1+x^2)-x, D(y)(0) = 0, y(0) = 0\}:\nif testdiff eq(res1,res2,y,x) then ok else res1,res2 fi;\nres1:=holexprtodiffeq(ar csec(1/x), y(x)):\nres2:=\{x*(D(y))(x)+(-1+x^2)*(D@@2)(y)(x), (D(y))(0 ) = -1, y(0) = 1/2*Pi\}:\nif testdiffeq(res1,res2,y,x) then ok else re s1,res2 fi;\nres1:=holexprtodiffeq(t^(2/3)/x^3+(1-x)^2/x^2, y(x)):\nre s2:=-t^(2/3)+x^3*y(x)-x+2*x^2-x^3:\nif testdiffeq(res1,res2,y,x) then \+ ok else res1,res2 fi;\nres1:=holexprtodiffeq(GAMMA(a), y(z)):\nres2:=y (z)-GAMMA(a):\nif res1=res2 then ok else res1,res2 fi;\nres1:=holexprt odiffeq(z^2 + 2*GAMMA(a), y(z)):\nres2:=y(z)-z^2-2*GAMMA(a):\nif res1= res2 then ok else res1,res2 fi;\ns:='s':\nres1:=holexprtodiffeq((2*x+3 )^(3*s+2),y(x)):\nres2:=\{(-6*s-4)*y(x)+(2*x+3)*(D(y))(x), y(0) = 3^(3 *s+2)\}:\nif testdiffeq(res1,res2,y,x) then ok else res1,res2 fi;\n# u sed to return initial conditions (result is actually 2/Pi/z)\nres1:=ho lexprtodiffeq(BesselJ(v+1,z)*BesselY(v,z)-BesselJ(v,z)*BesselY(v+1,z), \ny(z)):\nres2:=\n(8*z^2+4*v^2+1+4*v)*y(z)+(-4*z^2*v^2+4*z^4+5*z^2-4*v *z^2)*diff(diff(y(z),z),z)\n+(-4*z*v+16*z^3-z-4*z*v^2)*diff(y(z),z)+di ff(diff(diff(diff(y(z),z),z),z),z)*z\n^4+6*diff(diff(diff(y(z),z),z),z )*z^3:\nif testdiffeq(res1,res2,y,z) then ok else res1,res2 fi;\n" }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 432 "# used to be a problem with the or der in algfuntoalgeq\n# pldx comment : trouve \340 l'ordre 10; res2 ne proposait que 8\nf:=-8*(1-sqrt(1-z))^3/z^2:\ng:=subs(z=f,f)-z:\nres1: =holexprtodiffeq(g,y(z)):\nres2:=\{seq(`@@`(D,gk)(y)(0) = 0, gk=2..10) , y(0) = 0, D(y)(0) = 0, (64-z^3+24*z^2-48*z)*y(z)+(z^4-24*z^3+96*z^2- 64*z)*diff(y(z),z)+\n(2*z^5-18*z^4+48*z^3-32*z^2)*diff(diff(y(z),z),z) \}:\nif testdiffeq(res1,res2,y,z) then ok else res1,res2 fi;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 1039 "# diffeqtohomdiffeq and rectohomrec\npr int(`Testing diffeqtohomdiffeq and rectohomrec`);\ndeq:=\{diff(y(x),x, x)=y(x),y(0)=1,D(y)(0)=0\}:\nres:=diffeqtohomdiffeq(deq,y(x)):\nif res =deq then ok else deq,res fi;\n# Test from the help page\ndeq:=diff(y( x),x)*(x-1)+2*y(x)-2*x-3:\nres1:=diffeqtohomdiffeq(deq,y(x)):\nres2:=4 *y(x)+(-4*x-11)*diff(y(x),x)+(-2*x^2-x+3)*diff(diff(y(x),x),x):\nif te stdiffeq(res1,res2,y,x) then ok else res1,res2 fi;\n# Test from the he lp page\nres1:=diffeqtohomdiffeq(\{deq,y(0)=2\},y(x)):\nres2:=\{4*y(x) +(-4*x-11)*diff(y(x),x)+(-2*x^2-x+3)*diff(diff(y(x),x),x),\ny(0) = 2, \+ D(y)(0) = 1\}:\nif testdiffeq(res1,res2,y,x) then ok else res1,res2 fi ;\n# Test from the help page\nrec:=u(n+1)=u(n)+n^2+1:\nres1:=rectohomr ec(rec,u(n)):\nres2:=(-n^2-2*n-2)*u(n)+(2*n^2+2*n+3)*u(n+1)+(-n^2-1)*u (2+n):\nif testrec(res1,res2,u,n) then ok else res1,res2 fi;\n# Test f rom the help page\nres1:=rectohomrec(\{rec,u(0)=1\},u(n)):\nres2:=\{u( 0)=1,(-n^2-2*n-2)*u(n)+(2*n^2+2*n+3)*u(n+1)+(-n^2-1)*u(2+n),u(1)=2\}: \nif testrec(res1,res2,u,n) then ok else res1,res2 fi;" }}{PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 759 "# ratpolytocoeff\nprint(`Testing ratpolytocoe ff`);\n# Test from the help page\nres1:=ratpolytocoeff(1/(1-x-x^2),x,n ):\nres2:=Sum(-(-1/5-2/5*_alpha)/_alpha*_alpha^(-n),_alpha = RootOf(-1 +_Z+_Z^2)):\nif res1=res2 then ok else res1,res2 fi;\n# listtoseries\n print(`Testing listtoseries`);\n# \nres1:=convert(listtoseries([1,1,2, 5,14,42,132,429,1430,4862,16796,58786],\nx,'egf'),polynom):\nres2:=1+1 *x+1*x^2+5/6*x^3+7/12*x^4+7/20*x^5+11/60*x^6+143/1680*x^7+143/4032*x^ \n8+2431/181440*x^9+4199/907200*x^10+4199/2851200*x^11:\nif res1=res2 \+ then ok else res1,res2 fi;\n\n# seriestolist\nprint(`Testing seriestol ist`);\nres1:=seriestolist(series(z-2*t*z^2+5*t^2*z^3-14*t^3*z^4+42*t^ 4*z^5+O(z^6),z),\nrevogf):\nres2:=[0,1,2*t,3*t^2,4*t^3,5*t^4]:\nif res 1=res2 then ok else res1,res2 fi;\n\n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 360 "# listtohypergeom\n# pldx comment : rajout\351 un \"simplify\" \+ sur res2 \nprint(`Testing listtohypergeom`);\n# Test from the help pa ge\nres1:=listtohypergeom([2,5,14,42,132,429,1430],x):\nres2:=simplify ([-16/(1-4*x)^(1/2)/(1+(1-4*x)^(1/2))^3*x-3/(1-4*x)^(1/2)/x+\n3/(1-4*x )^(1/2)/x^2-1/2/(1-4*x)^(1/2)/x^3+1/2/x^3*(1-4*x), ogf]):\nif res1=res 2 then ok else res1,res2 fi;\n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 3737 "# pade2\nprint(`Testing pade2`);\n# Test from the help page\nres1:=pa de2([sin(x),cos(x),exp(x)],x=0,[3,2,5]): \nres2:=[-1275-255*x+45*x^2+5 *x^3, 120+495*x+75*x^2,\n-120+900*x-600*x^2+160*x^3-20*x^4+x^5]:\nif r es1=res2 then ok else res1,res2 fi;\n# Test from the help page\nres1:= pade2([sin(x),cos(x)],x=Pi,7):\nres2:=[-6*(x-Pi)^2+15, (x-Pi)^3-15*x+1 5*Pi]:\nif normal(res1[1]/res1[2])=normal(res2[1]/res2[2]) then ok els e res1,res2 fi;\n# Test from the help page\nff:=[cos(2*x)*(x+1)+3,cos( x)^2+x*cos(x)+1,cos(2*x)+1,cos(x)]:\ngg:=pade2(ff,x=0,20):\nres1:=simp lify(ff[1]*gg[1]+ff[2]*gg[2]+ff[3]*gg[3]+ff[4]*gg[4]):\nres2:=0:\nif r es1=res2 then ok else res1,res2 fi;\n\n# listtoratpoly\nprint(`Testing listtoratpoly`);\n# Test from the help page\nres1:=listtoratpoly([1,1 ,2,3,5,8,13],x):\nres2:=[-1/(-1+x+x**2), ogf]:\nif res1=res2 then ok e lse res1,res2 fi;\n\n# listtorec\nprint(`Testing listtorec`);\n# Test \+ from the help page\nres1:=listtorec([1, 1, 2, 5, 14, 42, 132, 429, 143 0, 4862, 16796, 58786],u(n)):\nres2:=[\{(-2-4*n)*u(n)+(n+2)*u(n+1), u( 0) = 1\}, ogf]:\nif op(2,res1)=op(2,res2) and testrec(op(1,res1),op(1, res2),u,n)\n then ok else res1,res2 fi;\n# from \nll:=[0, 0, 1, 0, 5/6, 0, 13/18, 0, 325/504 , 0, 2665/4536, 0, 162565/299376, 0, \n1062925/2095632, 0, 24022105/50 295168, 0, 204894425/452656512, 0, 7417178185/\n17200947456, 0, 163919 6378885/3973418862336, 0, 434387040404525/\n1096663606004736, 0, 41834 8134297281/1096663606004736, 0, 152697069018507565/\n41453884306979020 8, 0]:\nres1:=listtorec(ll,a(n)):\n# used to give [\{a(0)=0, a(1)=0, ( -2*n-2*n^2-n^3)*a(n)+(2*n+3*n^2+n^3)*a(n+2)\}, ogf]\n# where the recur rence contains the factor n so that a(2) is not defined\nres2:=\{a(0)= 0,a(1)=0,a(2)=1,(-2-2*n-n^2)*a(n)+(2+3*n+n^2)*a(n+2)\}:\nif testrec(re s1[1],res2,a,n) then ok else res1,res2 fi;\n# used to give \{a(0)=1,a( 1)=0,a(n)\}\nll:=[1,0,1/2!,0,1/4!,0,1/6!,0,1/8!]:\nres1:=listtorec(ll, a(n)):\nres2:=\{a(n)+(-3*n-2-n^2)*a(n+2), a(1) = 0, a(0) = 1\}:\nif te strec(res1[1],res2,a,n) then ok else res1,res2 fi;\n\n# listtodiffeq\n print(`Testing listtodiffeq`);\n# Test from the help page\nres1:=listt odiffeq([1,2,6,22,91,408,1938,9614,49335,260130,1402440,7702632,\n4297 5796,243035536,1390594458,8038677054,46892282815,275750636070,16332922 29030,\n9737153323590],y(x)):\nres2:=[\{y(0)=1,(D(y))(0)=2,4/9+(-4/9+2 0/9*x)*y(x)+(-2/3*x+4*x**2)*diff(y(x),x)+\n(-4/27*x**2+x**3)*diff(diff (y(x),x),x)\}, ogf]:\nif op(2,res1)=op(2,res2) and testdiffeq(op(1,res 1),op(1,res2),y,x) then\n ok else res1,res2 fi;\n\n# seriestodi ffeq\nprint(`Testing seriestodiffeq`);\n# Test from the help page\nres 1:=seriestodiffeq(series(exp(x)/sqrt(1-x),x,7),y(x)):\nres2:=[\{(3/2-x )*y(x)+(x-1)*diff(y(x),x), y(0) = 1\}, ogf]:\nif op(2,res1)=op(2,res2) and testdiffeq(op(1,res1),op(1,res2),y,x)\n then ok else res1, res2 fi;\n\n# listtoalgeq\nprint(`Testing listtoalgeq`);\n# Test from \+ the help page\nres1:=listtoalgeq([1,1,2,5,14,42,132,429,1430,4862,1679 6,58786],y(x)):\nres2:=[1-y(x)+x*y(x)**2, ogf]:\nif op(2,res1)=op(2,re s2) and type(normal(subs(y(x)=Y,op(1,res1)/op(1,res2))),\n rati onal) then ok else res1,res2 fi;\n\n# seriestoalgeq\nprint(`Testing se riestoalgeq`);\n# Test from the help page\nres1:=seriestoalgeq(series( (1-sqrt(1-4*x)),x,9),y(x)):\nres2:=[4*x-2*y(x)+y(x)**2, ogf]:\nif op(2 ,res1)=op(2,res2) and type(normal(subs(y(x)=Y,op(1,res1)/op(1,res2))), \n rational) then ok else res1,res2 fi;\n\n# guesseqn\nprint(`T esting guesseqn`);\n# Test from the help page\nres1:=guesseqn([1, 4, 3 6, 400, 4900, 63504, 853776, 11778624, 165636900,\n2363904400,34134779 536, 497634306624, 7312459672336],y(z)):\nres2:=\{1/4*y(z)+(2*z-1/16)* diff(y(z),z)+(z^2-1/16*z)*diff(diff(y(z),z),z),\nD(y)(0) = 4, y(0) = 1 \}:\nif testdiffeq(res1[1],res2,y,z) then ok else res1,res2 fi;\n\n" } }{PARA 0 "> " 0 "" {MPLTEXT 1 0 209 "# guessgf\nprint(`Testing guessgf `);\n# Test from the help page\nres1:=guessgf([1,2,4,7,11,16,22],x):\n res2:=[-(1-x+x**2)/(x-1)**3, ogf]:\nif res1[2]=res2[2] and normal(res1 [1]/res2[1])=1 then ok else res1,res2 fi;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 167 "# Test from the help page\nres1:=guessgf([1,1,3,10,4 1,196,1057],x,['lgdegf']):\nres2:=[exp(x)+exp(x)*x,'lgdegf']:\nif expa nd(res1[1]-res2[1])=0 then ok else res1,res2 fi;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 191 "s:=seriestolist(map(collect,series((1/(1-x))^t,x,7), t)):\nres1:=guessgf(s,x):\nres2:=[(x-1)^(-t)/exp(-I*Pi*t), ogf]:\nres3 :=[(1-x)^(-t),ogf]:\nif res1=res2 or res1=res3 then ok else res1,res3 \+ fi;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 134 "res2:=guessgf(s,x,['lgdogf' ]):\nres3:=[-t/(x-1),'lgdogf']:\nif normal(res2[1]/res3[1])=1 and res2 [2]=res3[2] then ok else res2,res3 fi;\n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 201 "res1:=guessgf([ 9,8,7,6,5,4,3,2,1,2,3,4,5,6,7,8,9,10 ,11],x):\nres2:=[-10/(x^2-2*x+1)*x+9/(x^2-2*x+1)+2/(x^2-2*x+1)*x^9, og f]:\nif res1[2]=res2[2] and normal(res1[1]/res2[1])=1 then ok else res 1,res2 fi;\n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 130 "res1:=guessgf([1, \+ 1, 2, 5, 14, 42, 132, 429, 1430, 4862, 16796, 58786],x,[revogf]):\nif \+ res1[1]=[x-x^2] then ok else res1,FAIL fi;\n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 368 "# bug in versions < 2.40 (error message)\n# pldx com ment : cela plante, pourquoi ?\nl:=[1,2,6,22,91,408,1938,9614,49335,26 0130,1402440,7702632,42975796,\n243035536,1390594458,8038677054,468922 82815,275750636070,1633292229030]:\n# res1:=guessgf(l,x,[ogf]):l:='l'; \nif res1=[[RootOf(x^4*_Z^3+(6*x^3+2*x^2)*_Z^2+(1-10*x+12*x^2)*_Z-1+8* x)], ogf] \n then ok else res1,FAIL fi;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}{PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 0 "" }}{PARA 12 "" 1 "" {XPPMATH 20 "6#7S%(Laplace G%.algebraicsubsG%.algeqtodiffeqG%.algeqtoseriesG%.algfuntoalgeqG%&bor elG%.cauchyproductG%.diffeq*diffeqG%.diffeq+diffeqG%,diffeqtableG%2dif feqtohomdiffeqG%,diffeqtorecG%)guesseqnG%(guessgfG%0hadamardproductG%0 holexprtodiffeqG%)invborelG%,listtoalgeqG%-listtodiffeqG%0listtohyperg eomG%+listtolistG%.listtoratpolyG%*listtorecG%-listtoseriesG%2listtose riestableG%,maxdegcoeffG%*maxdegeqnG%,maxordereqnG%,mindegcoeffG%*mind egeqnG%,minordereqnG%*optionsgfG%&pade2G%,poltodiffeqG%)poltorecG%/rat polytocoeffG%(rec*recG%(rec+recG%,rectodiffeqG%,rectohomrecG%*rectopro cG%.seriestoalgeqG%/seriestodiffeqG%2seriestohypergeomG%-seriestolistG %0seriestoratpolyG%,seriestorecG%/seriestoseriesG%(versionG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%2Testing~rectoprocG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%4Testing~diff eqtorecG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%4Testing~rectodiffeqG" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#%[oTesting~diffeq+diffeq,~diffeq*diffe q,~cauchyproduct,~poltodiffeqG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#ok G" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%RTesting~rec+rec,~rec*rec,~cauchyproduct,~poltorecG" } }{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%8Testing~bore l,~invborelG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#%6Testing~algeqtodiffeqG" }}{PARA 11 " " 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%6Testing~algebraicsubsG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%6Testing~algeqtoseriesG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%6Testing~algfuntoalgeqG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%8Testing~holexprtodiffeqG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%JTesting~diffeqtohomdiffeq~and~rectohomrecG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%7Testing~ratpolytocoeffG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%5Testing~listtoseriesG " }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%5Testing~seriestolistG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%8Testing~listtohyperge omG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%.Testing~pade2G" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#o kG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%6Testing~list toratpolyG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 " " {XPPMATH 20 "6#%2Testing~listtorecG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%5Testing~list todiffeqG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 " " {XPPMATH 20 "6#%7Testing~seriestodiffeqG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%4Testing~list toalgeqG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%6Testing~seriestoalgeqG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%1Testing~guesseqnG" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%0Testing~guessgfG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%#okG" }} {PARA 11 "" 1 "" {XPPMATH 20 "6$7$7#,&%\"xG\"\"\"*$)F&\"\"#F'!\"\"%'re vogfG%%FAILG" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{MARK "1 0 0" 0 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }