LAC01 Trig Identities MrG 2012.0530

3121 days ago by lac2012

#0a) Arithmetic show(2+7) show(2-7) show(2*7) show((2/7).n(digits=10)) show((7//2)) show((7%2)) show(2^7) 
       






#0b) Algebra show(expand((x+2)^2)) show(factor(x^2+4*x+4)) show(((x^2+4*x+4)/(x+2)).simplify_rational()) show(solve(x^2+4*x+4==0,x)) f(x)=(diff(x^2+4*x+4,x)) show(f(x)) show(f(-1)) show(integrate(x^2+4*x+4,x)) show(integrate(x^2+4*x+4,x,0,1)) 
       







#1) Pythagorean f(x)=sin(x)^2+cos(x)^2 show(f(x)) show(f(x).simplify_trig()) show(plot(f(x),xmin=-2,xmax=2,ymin=-2,ymax=2)) show(bool(f(x)==1)) 
       



#2) Pythagorean h(x)=f(x)/cos(x)^2 show(h(x)) show(h(x).simplify_trig()) show(plot(h(x))) show(plot(sec(x)^2)) 
       




#3) Pythagorean g(x)=f(x)/sin(x)^2 show(g(x)) show(g(x).simplify_trig()) show(plot(g(x),0.1,3)) show(plot(csc(x)^2,0.1,3)) 
       




#4) Sum of 2 Angles var('y') show(cos(x+y)) show(cos(x+y).simplify_trig()) show(plot3d(cos(x+y), (x,-2,2), (y,-2,2)),viewer='tachyon') show(plot3d(cos(x)*cos(y)-sin(x)*sin(y), (x,-2,2), (y,-2,2)),viewer='tachyon') 
       


#5) Sum of 2 Angles show(cos(x-y)) show(cos(x-y).simplify_trig()) show(plot3d(cos(x-y), (x,-2,2), (y,-2,2)),viewer='tachyon') show(plot3d(cos(x)*cos(y)+sin(x)*sin(y), (x,-2,2), (y,-2,2)),viewer='jmol') 
       


#6) Sum of 2 Angles show(sin(x+y)) show(sin(x+y).simplify_trig()) show(plot3d(sin(x+y), (x,-2,2), (y,-2,2)),viewer='tachyon') show(plot3d(sin(x)*cos(y)+sin(x)*cos(y), (x,-2,2), (y,-2,2)),viewer='jmol') 
       


#7) Sum of 2 Angles show(sin(x-y)) show(sin(x-y).simplify_trig()) show(plot3d(sin(x-y), (x,-2,2), (y,-2,2)),viewer='tachyon') show(plot3d(sin(x)*cos(y)-sin(y)*cos(x), (x,-2,2), (y,-2,2)),viewer='jmol') 
       


#8) Double Angle show(cos(2*x)) show(cos(2*x).simplify_trig()) show((1+cos(2*x)).simplify_trig()) show(((1+cos(2*x))/2).simplify_trig()) show(plot((1+cos(2*x))/2)) plot(cos(x)^2) 
       






#9) Double Angle show(cos(2*x)) show(cos(2*x).simplify_trig()) show((1-cos(2*x)).simplify_trig()) show(((1-cos(2*x))/2).simplify_trig()) show(plot((1-cos(2*x))/2)) plot(sin(x)^2) 
       






#10) Euler's Identity show(taylor(e^x,x,0,9)) show(taylor(e^(i*x),x,0,9)) show(taylor(cos(x),x,0,9)) show(i*taylor(sin(x),x,0,9)) show(e^(i*x)==cos(x)+i*sin(x)) show(bool(e^(i*x)==cos(x)+i*sin(x))) 
       





#10a) R^R show((2+0*i)^(3+0*i)) 
       
#10b) I^R show((0+2*i)^(3+0*i)) 
       
#10c) C^R show((1+i)^(3+0*i)) show(expand((1+i)^0)) show(expand((1+i)^1)) show(expand((1+i)^2)) show(expand((1+i)^3)) show(expand((1+x)^0)) show(expand((1+x)^1)) show(expand((1+x)^2)) show(expand((1+x)^3)) 
       








#10d) R^I show((2+0*i)^(0+3*i)) show(((2+0*i)^(0+3*i)).n()) show((e^log(2))^(3*i)) show((e^(3*log(2)*i)).simplify_radical()) show((cos(3*log(2))+i*sin(3*log(2))).n()) 
       




#10e) I^I show((0+2*sqrt(3)*i)^(0+3*i)) show(((0+2*sqrt(3)*i)^(0+3*i)).n()) 
       

#10f) C^I show((2+2*sqrt(3)*i)^(0+3*i)) show(((2+2*sqrt(3)*i)^(0+3*i)).n()) 
       

#10g) R^C show((2+0*i)^(3+3*i)) show(((2+0*i)^(3+3*i)).n()) 
       

#10h) I^C show((0+2*sqrt(3)*i)^(3+3*i)) show(((0+2*sqrt(3)*i)^(3+3*i)).n()) 
       

#10i) C^C show((2+2*sqrt(3)*i)^(3+3*i)) show(((2+2*sqrt(3)*i)^(3+3*i)).n())