#hw10.txt Cole Franks 02/25/2014 Help10:=proc(): print(`BnM(M,n),PnFast(A,B,n,n1,x,a0)`): end: #### Problem 1 ### read(`C10.txt`): #BnM(M,n): the first n terms of the B(n) BnM:=proc(M,n) local i,andrew,x: andrew:=PnMseq(M,n,x): [seq(factor(AM(M,x*andrew[i+1]*andrew[i],x)/AM(M,andrew[i]^2,x)),i=1..n)]: end: #AnM(M,n): the first n terms of the A(n) AnM:=proc(M,n) local i,andrew,x: andrew:=PnMseq(M,n,x): [seq(factor(AM(M,x*andrew[i+1]^2,x)/AM(M,andrew[i+1]^2,x)),i=1..n)]: end: #### problem 2. #M1:=[seq(1/(i+1),i=0..1000)]: M2:=[seq(i!,i=1..200)]: M3=[seq(1/(i+a),i=1..1000)]: # #factor(GuessRF(BnM(M1,200),n)) = (1/4)*n^2/((2*n-1)*(2*n+1)) # #factor(GuessRF(AnM(M1,30),n)) = 1/2 # #no-go for the B_n or A_n of the Laguerre polynomials! # #factor(GuessRF(BnM(M3,15),n)) = n^2*(a-1+n)^2/((a+2*n)*(a-2+2*n)*(-1+a+2*n)^2) # #factor(GuessRF(AnM(M3,15),n)) =(2*n^2+a^2-a+2*a*n)/((1+a+2*n)*(-1+a+2*n)) # #####problem 3 PnFast:=proc(A,B,n,n1,x,a0) local i,j,P0,P1,P,A0,B0: A0:=[seq(subs(n=i,A),i=1..n1)]: B0:=[seq(subs(n=i,B),i=1..n1)]: P0:=1: P1:=x + a0: P:=0: for i from 2 to n1 do #print(i); P:=P1: #P1:=-(subs(n=i-1,A)*P1 + subs(n=i-1,B)*P0 - x*P1): P1:=expand(-(A0[i-1]*P1 + B0[i-1]*P0 - x*P1)): P0:=P: #print(P1, subs(n=i-1,B), subs(n=i-1,A)): od: sort(P1): end: