preTEST11A

2957 days ago by MATH4R2012

#1) f(x)=2*x^2 g(x)=x^4-2*x^2 show(solve(f(x)==g(x),x)) show(g(-2)) show(g(2)) show(g(0)) 
       



var('y') solve([y==2*x^2,y==x^4-2*x^2],x,y) 
       
plot([f(x),g(x)],-3,3) 
       
#2) equ1=7*x+12*y==63;show(equ1) equ2=2*x+3*y==15;show(equ2) equ2=-4*equ2;show(equ2) 
       


equ3=equ1+equ2;show(equ3) show(solve(equ3,x)) solve([equ1,x==-3],x,y) 
       


show(solve(equ1,y)[0].rhs()) show(solve(equ2,y)[0].rhs()) 
       

plot([solve(equ1,y)[0].rhs(),solve(equ2,y)[0].rhs()],-5,5) 
       
#3) by matrix algebra a=matrix([(2,-1),(6,8)]);show(a) b=matrix(2,1,[2,39]);show(b) 
       

show(a^(-1)) 
       
show(a^(-1)*b) 
       
#3) by Cramer's Rule a=matrix([(2,-1),(39,8)]);show(a) b=matrix([(2,2),(6,39)]);show(b) c=matrix([(2,-1),(6,8)]);show(c) 
       


detA=det(a);show(detA) detB=det(b);show(detB) detC=det(c);show(detC) x=detA/detC;show(x) y=detB/detC;show(y) 
       




#3) by augmented matrix a=matrix(QQ,2,2,[(2,-1),(6,8)]);show(a) b=matrix(QQ,2,1,[2,39]);show(b) c=a.augment(b,subdivide=True);show(c) c.rescale_row(0, 1/2);show(c) c.add_multiple_of_row(1,0,-6);show(c) c.rescale_row(1, 1/11);show(c) c.add_multiple_of_row(0,1,1/2);show(c) 
       






#4) var('x,y') equ1=2*x+y==100;show(equ1) show(solve(equ1,y)[0].rhs()) equ2=x+y==75;show(equ2) show(solve(equ2,y)[0].rhs()) 
       



plot([solve(equ1,y)[0].rhs(),solve(equ2,y)[0].rhs()],0,100,fill=true,aspect_ratio=1)