#Homework 10 by Ben Miles for Experimental math assigned 2/20 OK to post #Background GuessAlg:=proc(L,P,x, MaxDegP) local g,DegP: for DegP from 1 to MaxDegP do g:=GuessAlg1(L,P,x,DegP): if g<>FAIL then RETURN(g): fi: od: FAIL: end: GuessAlg1:=proc(L,P,x, DegP) local g,Degx: for Degx from 0 while (1+Degx)*(1+DegP)FAIL then RETURN(g): fi: od: FAIL: end: GuessAlg11:=proc(L,P,x, DegP, Degx) local g, F,a, i,j, var,P1,F1,eq, var1,v: F:=add(add(a[i,j]*x^i*P^j,i=0..Degx),j=0..DegP): var:={seq(seq(a[i,j],i=0..Degx),j=0..DegP)}: P1:=add(L[i]*x^(i-1),i=1..nops(L)): F1:=expand(subs(P=P1,F)): eq:={seq( coeff(F1,x,i)=0, i=0..nops(L)-1)}: var1:=solve(eq,var): F:=subs(var1,F): if F=0 then RETURN(FAIL): else F:=subs({seq(v=1, v in var)},F): F:=add(factor(coeff(F,P,i))*P^i,i=0..degree(F,P)): RETURN(F): fi: end: #Homework #Number 2 DiagToAlg:=proc(R,x,y,P,t,MaxDegP) local L,Q: Q:=mtaylor(R,{x,y}, 2*MaxDegP+22): L:=[subs({x=0,y=0},R),seq(coeff(coeff(Q,x^i),y^i),i=1..MaxDegP+10)]: GuessAlg(L,P,t, MaxDegP); end: #DiagToAlg(1/((1-x)*(1-y)),x,y,P,t,6)=1+(-1+t)*P #DiagToAlg(1/(1-x-y),x,y,P,t,6)=-1+(1-4*t)*P^2 #DiagToAlg(1/(1-x-y+3*x*y),x,y,P,t,6)=-1/2+(1/2+t+(9/2)*t^2)*P^2 #DiagToAlg(1/(1-x-x^2-y-y^2),x,y,P,t,10)=FAIL #Number 5. I am not really sure how to do this one. LIF:=proc(F,z,P,n) : end: