1205 MrG What is the Binomial Expansion Theorem

2641 days ago by MATH4R2013

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









print "i\ti!" for i in range(7): print i,"\t",factorial(i) 
       
i	i!
0 	1
1 	1
2 	2
3 	6
4 	24
5 	120
6 	720
i	i!
0 	1
1 	1
2 	2
3 	6
4 	24
5 	120
6 	720
#17) p851: (3x+1)^4 expand((3*x+1)^4) 
       
def combo(n,r): return factorial(n)/factorial(r)/factorial(n-r) for r in range(5): combo(4,r) 
       




combo(4,0)*(3*x)^4*(1)^0 
       
combo(4,1)*(3*x)^3*(1)^1 
       
combo(4,2)*(3*x)^2*(1)^2 
       
combo(4,3)*(3*x)^1*(1)^3 
       
combo(4,4)*(3*x)^0*(1)^4 
       
for r in range(5): combo(4,r)*(3*x)^(4-r)*(1)^r