#HomeWork#21 #Please do not post homework #Abrar Almahmeed, April 12 ################################# #Question 2: #I have not started significant work on my project yet. #But I have thinking about possible directions and plan to begin exploring it soon. ##################################################################################### #Question 3: eknVC := proc(k,n,x) local f,t,i: f:=expand(mul(1+x[i]*t,i=1..n)): coeff(f,t,k): end: #Check: eknVC(2,4,x); x[1] x[2] + x[1] x[3] + x[1] x[4] + x[2] x[3] + x[2] x[4] + x[3] x[4] ekn(2,4,x); x[1] x[2] + x[1] x[3] + x[1] x[4] + x[2] x[3] + x[2] x[4] + x[3] x[4] evalb(%=%%); true ########################################################################################## #Question 4: Using the Maple commands "mul", "taylor", and "expand", write a procedure hkn := proc(k,n,x) local f,t,i: f:=expand(taylor(1/mul(1-t*x[i],i=1..n),t=0,k+1)): f: end: #Check: hkn(2,3,x); 1 + (x[1] + x[2] + x[3]) t / 2 2 2\ + \x[1] + x[1] x[2] + x[1] x[3] + x[2] + x[2] x[3] + x[3] / 2 / 3\ t + O\t / #To obtain the coefficient of t^k (eg. in our example t^2) we use the Maple command "coeff" hkn := proc(k,n,x) local f,t,i: f:=expand(taylor(1/mul(1-t*x[i],i=1..n),t=0,k+1)): coeff(f,t,k): end: #Check: hkn(2,3,x); 2 2 2 x[1] + x[1] x[2] + x[1] x[3] + x[2] + x[2] x[3] + x[3] ################################################################################################## #Question 5: CheckNewton:=proc(k,n) local LHS,RHS,i: LHS:=k*ekn(k,n,x): RHS:=add((-1)^(i-1)*ekn(k-i,n,x)*pkn(i,n,x),i=1..k): evalb(expand(LHS)=expand(RHS)): end: #Check: CheckNewton(2,4); true #Run for all 5>=n>=k>=1: [seq(seq(CheckNewton(k,n),k=1..n),n=1..5)]; [true, true, true, true, true, true, true, true, true, true, true, true, true, true, true]