preTEST12A

3115 days ago by MATH4R2012

#1) f(n)=20*(3/4)^(n-1) show(f(n)) show(f(5)) print "n\tf(n)" for n in range(1,6,1): print n,"\t",f(n).n() 
       


n	f(n)
1 	20.0000000000000
2 	15.0000000000000
3 	11.2500000000000
4 	8.43750000000000
5 	6.32812500000000
n	f(n)
1 	20.0000000000000
2 	15.0000000000000
3 	11.2500000000000
4 	8.43750000000000
5 	6.32812500000000
show([20*(3/4)^(n-1) for n in [1,2,3,4,5]]) show(sum([20*(3/4)^(n-1) for n in [1,2,3,4,5]])) 
       

show([20*(3/4)^(n-1).n() for n in range(1,6,1)]) show(sum([20*(3/4)^(n-1).n() for n in range(1,6,1)])) 
       

for i in range(1,100,10): show(sum([20*(3/4)^(n-1).n() for n in range(1,i+1,1)])) 
       









show(20/(1-3/4)) 
       
#2) show valid for n=1 show(sum([i^3 for i in range(1,2,1)])) show(1^2*(1+1)^2/4) 
       

#2) show valid for n=2 show(sum([i^3 for i in range(1,3,1)])) show(2^2*(2+1)^2/4) 
       

#2) assume valid for n to prove valid for n+1 show((n+1)^3) show((n+1)^2*(n+2)^2/4-n^2*(n+1)^2/4) 
       

show(expand((n+1)^3)) show(expand((n+1)^2*(n+2)^2/4-n^2*(n+1)^2/4)) 
       

#3) combo(n,r)=factorial(n)/factorial(r)/factorial(n-r) for r in range(4): show(combo(3,r)*(.5)^(3-r)*(.5)^r) 
       



#4) for r in range(5): show(combo(4,r)*(5)^(4-r)*(-3*I)^r) 
       




[combo(4,r)*(5)^(4-r)*(-3*I)^r for r in range(5)] 
       
sum([combo(4,r)*(5)^(4-r)*(-3*I)^r for r in range(5)]) 
       
#what about calc? f(x)=x^2*cos(x);show(f(x)) g(x)=f(x).diff();show(g(x)) show(f(pi)) show(g(pi)) show(g(pi).n(digits=100)) 
       




show(integrate(1/(1-x^2),x)) show(integrate(1/(1-x^2),x,2,3)) show(integrate(1/(1-x^2),x,2,3).n(digits=100)) 
       


(1/2).n(? 
       

No object '' currently defined.

No object '' currently defined.