1205 Binomial Expansion Theorem

3002 days ago by MATH4R2012

for n in range(5): expand((x+1)^n) 
       




for n in range(10): factorial(n) 
       









#p851(45) (1/4+3/4)^5 
       
def combo(n,r): return factorial(n)/factorial(r)/factorial(n-r) combo(5,3) 
       
(100*combo(5,0)*(1/4)^5*(3/4)^0).n() 
       
for r in range(5): show((100*combo(5,r)*(1/4)^(5-r)*(3/4)^r).n()) 
       




#10) 60 C 20 combo(60,20) 
       
#20) (x^2-y^2)^6 var('y') expand((x^2-y^2)^6) 
       
combo(6,0)*(x^2)^6*(-y^2)^0 
       
combo(6,1)*(x^2)^5*(-y^2)^1 
       
combo(6,2)*(x^2)^4*(-y^2)^2 
       
combo(6,3)*(x^2)^3*(-y^2)^3 
       
combo(6,4)*(x^2)^2*(-y^2)^4 
       
combo(6,5)*(x^2)^1*(-y^2)^5 
       
combo(6,6)*(x^2)^0*(-y^2)^6 
       
for r in range(7): combo(6,r) 
       






#30) expand((2*x-3)^9) 
       
combo(9,7)*(2*x)^2*(-3)^7 
       
combo(9,5)*(2*x)^4*(-3)^5