> # hw 4 11.4\ # 22\ with(linalg): Warning: new definition for norm Warning: new definition for trace > p:=[1,0,-1];q:=[2,4,5];r:=[3,1,7];\ orthogonal:=crossprod(add(q,p,1,-1),add(r,p,1,-1));\ areaoftriangle:=norm(orthogonal,2)/2; p := [1, 0, -1] q := [2, 4, 5] r := [3, 1, 7] orthogonal := [ 26, 4, -7 ] 1/2 areaoftriangle := 1/2 741 -------------------------------------------------------------------------------- > # 26\ a:=[1,0,6];b:=[2,3,-8];c:=[8,-5,6];\ volume:=abs(dotprod(a,crossprod(b,c))); a := [1, 0, 6] b := [2, 3, -8] c := [8, -5, 6] volume := 226 -------------------------------------------------------------------------------- > #11.5\ # 12\ dotprod(add([0,1,1],[1,-1,6],1,-1),add([-4,2,1],[-1,6,2],1,-1)); 0 -------------------------------------------------------------------------------- > #23\ n:=[1,1,-1];\ dotprod([x,y,z],n) = dotprod([6,5,-2],n); n := [1, 1, -1] x + y - z = 13 -------------------------------------------------------------------------------- > # 38\ eqns:={x=1-t,y=t,z=1+t,z=1-2*x+y};\ solve(eqns,{x,y,z,t}); eqns := {y = t, x = 1 - t, z = 1 + t, z = 1 - 2 x + y} {x = 0, y = 1, z = 2, t = 1} -------------------------------------------------------------------------------- >