Lab #2: Vectors, Vector Operations, Lines, Planes and GraphingNote: Each section has a series of commands. You must execute the commands in a section in order to be assured that everything works properly. The sections all start with a restart command so that they are independent of each other.
<Text-field layout='Heading 1' style='Heading 1'>Vectors and Vector Operations in Maple</Text-field>In this section you will learn how to: define a vector using the Vector command compute dot, cross and triple products of vectors determine the norm (length or magnitude) of vectors determine the angle between two vectorsWe begin by loading the LinearAlgebra package which contains useful commands for vector manipulationrestart:with(LinearAlgebra);In the list of commands above we note the following that apply specifically to vectors: &x (easier version of CrossProduct); . (easier version of DotProduct); Norm or more specifically, VectorNorm; Normalize; SubVector; UnitVector; . (easier version of VectorMatrixMultiply); . (easier version of VectorScalarMultiply); ZeroVector.There is more than one way to define a vector: we can write it directly; we can use the Vector( ) command.v:=<1,2,3>;w:=Vector([-1,3,4]);To compute the dot product of v and w, the easiest way is just to put a dot . between themv.w;To compute the cross product of v and w, the easiest way is just to put &x, with spaces on either side, between themz:=v &x w;It turns out that there are many ways to measure the length or magnitude of a vector (or a matrix).Most generally, the p-norm or L-p norm of a vector u is defined as: Two particular cases of this general norm are most frequently used: the 1-norm or L-1 norm NiMtJSRzdW1HNiQtJSRhYnNHNiMmJSJ1RzYjJSJpRy8lImlHOyIiIiUibkc= the 2-norm, L-2 norm, Euclidean or Frobenius norm NiMpLSUkc3VtRzYkKiQmJSJ1RzYjJSJpRyIiIy8lImlHOyIiIiUibkcqJiIiIiIiIiIiIyEiIg==There is another norm, called the infinity norm, given as The norm that we use in this course is the 2-Norm or Euclidean norm`Norm(z,2)`=Norm(z,2);To compute the triple product we just combine the dot and cross productx:=<-2,0,4>;x.v &x w;To multiply a vector by a scalar we can also use the ., but this time with a space on either side5 . x;However, for more complex usage, we use either VectorScalarMultiply( ) or just ScalarMultiply( )ScalarMultiply(x,5);
<Text-field layout='Heading 1' style='Heading 1'>Lines & Planes</Text-field>In Maple we can represent straight lines and planes in several ways restart:with(LinearAlgebra):Straight line in vector parametric form: let L1 be the line through the point NiMmJSJQRzYjIiIh (1,2,3) with direction vector a = (-2,1,-1)a:=<-2,1,-1>;L1v:=<1,2,3> + ScalarMultiply(a,t);Straight line in parametric form: let L1 be the line through the point NiMmJSJQRzYjIiIh (1,2,3) with direction vector a = (-2,1,-1)L1p:=[x=1-2*t,y=2+t,z=3-t];To compute some points on the line, we can substitute values for t using the subs( ) commandP[1]:=subs(t=1,L1v);P[2]:=subs(t=2,L1v);P[-1]:=subs(t=-1,L1v);Plane in general form: let Pl1 be the plane through the point NiMmJSJQRzYjIiIh (1,2,3) with normal vector n = (-2,1,-1)n:=<-2,1,-1>;X:=<x,y,z>;OP:=<1,2,3>;Pl1:=n.(X-OP);
<Text-field layout='Heading 1' style='Heading 1'>Graphing in 3D</Text-field>Suppose that we want to plot vectors, lines and planes in three dimensional space.There are two libraries of commands related to plotting: plots and plottoolsrestart:with(LinearAlgebra):with(plots);with(plottools);Note that we load plots before plottools because this means that the weaker arrow( ) command of plots is replaced by the stronger one in plottools.The simplest example would be to plot a vector let v = (2, 1, -1)Remember that vectors are free floating in space. When we want to plot v we must choose where it should start. Then the plot will be an "instance" of the vector.First look at the arrow( ) command in plottools,arrow? arrowv:=<2,1,-1>;Define the point we start the vector image atOri:=[0,0,0];Define a vector that will serve as normal to a plane that the vector v lies in. This could be any vector perpendicular to v.n:=<1,-1,1>;n.v;plt1:=arrow(Ori,v,n,1,.1,.1,arrow,color=black):We use the display3d( ) command to get Maple to show us the plot that it has created.Warning: You probably need to click and drag the image, rotating it, so that the axes are in the usual position, and the vector is shown more clearly.display3d(plt1,axes=normal,labels=[x,y,z]);We can even plot several instances of v together.P[2]:=[1,1,-1];P[3]:=[2,-1,2];plt2:=arrow(P[2],v,n,1,.1,.1,arrow,color=blue):plt3:=arrow(P[3],v,n,1,.1,.1,arrow,color=red):display3d(plt1,plt2,plt3,axes=normal,labels=[x,y,z]);How do we plot lines? Clearly we only plot line segments since a line is infinite. We can do this using the spacecurve( ) commandLet L1 be the line through the point NiMmJSJQRzYjIiIh (1,2,3) with direction vector a = (-2,1,-1)a:=<-2,1,-1>;P[0]:=<1,2,3>;L1v:=P[0] + ScalarMultiply(a,t);plt4:=spacecurve(L1v,t=-3..3,axes=normal,labels=[x,y,z],color=red):display3d(plt4);Of course, we can plot multiple lines.P[1]:=<1,-1,2>;L2v:=P[1] + ScalarMultiply(a,t);b:=<-3,1,2>;L3v:=P[1] + ScalarMultiply(b,t);plt5:=spacecurve(L2v,t=-3..3,axes=normal,labels=[x,y,z],color=blue):plt6:=spacecurve(L3v,t=-3..3,axes=normal,labels=[x,y,z],color=green):display3d(plt4,plt5,plt6);How about drawing a plane? Depending how we define the plane we can plot it two different ways.If we define the plane by solving for z in terms of x and y, then we use the plot3d( ) command.If we define the plane in standard form, ax + by + cz = d, then we use the implicitplot3d( ) command.Let Pl1 be the plane through the point NiMmJSJQRzYjIiIh (1,2,3) with normal vector n = (-2,1,-1)n:=<-2,1,-1>;X:=<x,y,z>;OP:=<1,2,3>;Pl1:=n.X=n.OP;Now we solve for z as a function of x and y.solnPl1:=solve(Pl1,z);plt7:=plot3d(solnPl1,x=-4..4,y=-4..4,axes=normal,labels=[x,y,z],color=blue):display3d(plt7);I leave it to you to explore the implicitplot3d( ) command on your own.How about plotting two or three planes?Let Pl2 be the plane through the point NiMmJSJQRzYjIiIh (1,2,3) with normal vector n = (-1,2,1)n:=<-1,2,1>;X:=<x,y,z>;OP:=<1,2,3>;Pl2:=n.X=n.OP;Now we solve for z as a function of x and y.solnPl2:=solve(Pl2,z);plt8:=plot3d(solnPl2,x=-4..4,y=-4..4,axes=normal,labels=[x,y,z],color=red):Let Pl3 be the plane through the point NiMmJSJQRzYjIiIh (2,1,2) with normal vector n = (2,-1,-1)n:=<2,-1,-1>;X:=<x,y,z>;OP:=<2,1,2>;Pl3:=n.X=n.OP;Now we solve for z as a function of x and y.solnPl3:=solve(Pl3,z);plt9:=plot3d(solnPl3,x=-4..4,y=-4..4,color=green):display3d(plt7,plt8,plt9,scaling=constrained,axes=boxed,labels=['x','y','z']);Often drawing such graphs helps us to visualize such things as the intersection of planes, lines, or planes and lines.display3d(plt4,plt7);
<Text-field background='[255,255,255]' bold='true' executable='false' family='Times New Roman' font_style_name='Text' foreground='[0,0,0]' italic='false' layout='Heading 1256' opaque='false' placeholder='false' readonly='false' selection-placeholder='false' size='10' style='Text' subscript='false' superscript='false' underline='false'><Font bold='false'> </Font><Font size='18'>Solved problems</Font></Text-field>
<Text-field background='[255,255,255]' bold='true' executable='false' family='Times New Roman' font_style_name='Text' foreground='[0,0,0]' italic='true' layout='Heading 2' opaque='false' placeholder='false' readonly='false' selection-placeholder='false' size='14' style='Text' subscript='false' superscript='false' underline='false'>Solved problem 1</Text-field>Given vectors u = [1,4,7], v = [2,5,8] and w = [1,2,5]i) Determine the dotproduct of u and v, the cross product of v and w, and the triple product of u, v and w.ii) Determine the angle between vectors u and viii) Determine a unit vector ub in the direction of uiv) Determine the projection of v onto u (same as projection of v onto ub) as well as the orthogonal projection of v onto uv) Draw a graph showing u, v, w, n = v x w, z = projection of v onto u, and zo = orthogonal projection of v onto urestart:with(LinearAlgebra):with(plots):with(plottools):u:=Vector([1,4,7]);v:=Vector([2,5,8]);w:=Vector([1,2,5]);Solution for i)`u.v` = u.v;`v x w` = v &x w;n:=v &x w;`u.(v x w)` = u.(v &x w);Solution for ii)Recall that u . v = ||u|| ||v|| cos( NiMlJnRoZXRhRw== ), where NiMlJnRoZXRhRw== is the angle between u and v.Rewriting this we obtain: cos( NiMlJnRoZXRhRw== ) = NiMqJiUkdS52RyIiIiUsfGdyfGdydXxncnxncn58Z3J8Z3J2fGdyfGdyRyEiIg== or NiMlJnRoZXRhRw== = arccos( NiMqJiUkdS52RyIiIiUsfGdyfGdydXxncnxncn58Z3J8Z3J2fGdyfGdyRyEiIg== )theta:= arccos( u.v/(Norm(u,2)*Norm(v,2)));theta:= simplify(arccos( u.v/(Norm(u,2)*Norm(v,2))));theta:= evalf(simplify(arccos( u.v/(Norm(u,2)*Norm(v,2)))),20);Note that using evalf we lose accuracy so it should be avoided except as a last step in calculation where we want to get a sense of the number or vector computed.Solution for iii)We create a unit vector ub in the direction of vector u by dividing u by + or - its length.ub:=(1/Norm(u,2))*u;Solution for iv)Recall that NiMvLSYlJVByb2pHNiMlInVHNiMlInZHKiYlJHUudkciIiIlLHxncnxncnV8Z3J8Z3J+fGdyfGdydXxncnxnckchIiI= u = NiMtJSIuRzYkKiYlInVHIiIiJSZ8Z3J8Z3J1fGdyfGdyRyEiIiUidkc=NiMqJiUidUciIiIlJnxncnxncnV8Z3J8Z3JHISIi = (ub . v) ub That is, the projection of v onto u does not depend upon the length of u, just the direction of u. This is what the term ||u|| ||u|| in the denominator is about, that is, removing any influence of the length of u. The last way of writing it essentially says that if we project v instead onto a unit vector ub in the direction of u, we no longer need to correct for the length of ub, since ||ub|| ||ub|| = 1 . 1 = 1Since we have computed ub above, we use this shorter version of the formula for projection here.Finally, the orthogonal projection is just the difference between the original vector v and the projection of v onto u.z:=(ub.v)*ub;zo:=v-z;Solution for v)A single image with all of these vectors will be overpowering. Instead, we display several vectors at a time.Ori:=[0,0,0];p1:=arrow(Ori,u,<-3,-1,1>,2,.1,.1,arrow,color=black):p2:=arrow(Ori,ub,<-3,-1,1>,4,.1,.1,arrow,color=red):p3:=arrow(Ori,v,n,2,.1,.1,arrow,color=blue):p4:=arrow(Ori,w,n,2,.1,.1,arrow,color=green):p5:=arrow(Ori,n,v,2,.1,.1,arrow,color=brown):p6:=arrow(Ori,z,<-3,-1,1>,2,.1,.1,arrow,color=yellow):It makes most sense to display the orthogonal projection starting from the tip of the projection, so that together with v, the three vectors form a right triangle.p7:=arrow(z,zo,<-3,-1,1>,2,.1,.1,arrow,color=orange):First, u and ub.display(p1,p2,axes=normal,labels=['x','y','z']);Next, u, v, z and zo.display(p1,p3,p6,p7,axes=normal,labels=['x','y','z']);Now v, w, and n = v x wdisplay(seq(p||i,i=3..5),axes=normal,labels=['x','y','z']);And just to show how foolish it would be to show them all togetherdisplay(seq(p||i,i=1..7),axes=normal,labels=['x','y','z']);
<Text-field background='[255,255,255]' bold='true' executable='false' family='Times New Roman' font_style_name='Text' foreground='[0,0,0]' italic='true' layout='Heading 2' opaque='false' placeholder='false' readonly='false' selection-placeholder='false' size='14' style='Text' subscript='false' superscript='false' underline='false'>Solved problem 2</Text-field>Let l be the line with parametric equation x = (1,2,3) + t (-1,1,1).i) Which of R (0,3,4) and S (7,0,-10) are on l ?ii) Plot l from t = -3 to t = -1.iii) Plot l from P (2,1,2) to Q (-1,4,5).restart:with(LinearAlgebra):with(plots):with(plottools):Solution for 1)To determine if a point R (0,3,4) lies on the given line, we substitute x = 0, y = 3, z = 4 in the equations for the line and solve the resulting system for t. If there is no solution (inconsistent), then the point does not lie on the line. If there is one solution, then that value of t is the "t-coordinate" of the point R on the line. That is, the point R is that number of multiples of the direction vector from the "origin" of the line. Given three equations in one unknown t, could there be infinitely many solutions for t? What would this mean?solve({1-t=0,2+t=3,3+t=4},t);Since there was one solution, the point R lies on the line.solve({1-t=7,2+t=0,3+t=-10},t);No response from Maple? Does this mean that there is no solution? To check we do it with matrices (a bit of overkill perhaps).ReducedRowEchelonForm(Matrix(3,2,[[1,6],[1,-2],[1,-13]]));Remember that this is the augmented matrix, so the 1 in the second column tells us that the system is inconsistent.Clearly this was overkill, we could see immediately that there is no solution (the first equation yields t = 6, the second t = -2 and the third t = -13).spacecurve([1-t,2+t,3+t],t=-3...-1,axes=normal,color=COLOR(RGB,.2,.2,.99),labels=['x','y','z']);Solution to iii)This is essentially the same problem as above in ii), but first we must solve for the values of t that correspond to the points P and QLet l be the line with parametric equation x = (1,2,3) + t (-1,1,1).i) Which of R (0,3,4) and S (7,0,-10) are on l ?ii) Plot l from t = -3 to t = -1.iii) Plot l from P (2,1,2) to Q (-1,4,5).solve({1-t=2,2+t=1,3+t=2},t);solve({1-t=-1,2+t=4,3+t=5},t);spacecurve([1-t,2+t,3+t],t=-1...2,axes=normal,color=COLOR(RGB,.9,.2,.2),labels=['x','y','z']);
<Text-field background='[255,255,255]' bold='true' executable='false' family='Times New Roman' font_style_name='Text' foreground='[0,0,0]' italic='true' layout='Heading 2' opaque='false' placeholder='false' readonly='false' selection-placeholder='false' size='14' style='Text' subscript='false' superscript='false' underline='false'>Solved problem 3</Text-field>i) Determine an equation of a plane containing the points A=(1,2,-1), B=(2,0,3) and C=(-2,1,2).ii) Determine 2 points P and Q, P on and Q off, the plane.iii) Plot the plane, as well as P and Qrestart:with(LinearAlgebra):Solution for i)There are two obvious methods: use the geometry of the situation, that is, construct vectors AB and AC, compute n = AB x AC as a normal vector to the plane, and then use n and any one of the three points to generate an equation for the plane; use the algebra of the situation, that is, substitute the three points A, B and C into the general linear equation in three variables x, y, z, namely ax + by + cz + d = 0, thus generating three equations in the four unknowns, a, b, c and d, then solve the system.Method 1: GeometricOA:=<1,2,-1>;OB:=<2,0,3>;OC:=<-2,1,2>;AB:=OB-OA;AC:=OC-OA;n:=AB &x AC;eqn:=n.<x,y,z> = n.OA;For purposes of plotting, we solve for zz:=solve(eqn,z);Method 2: Algebraicrestart:with(LinearAlgebra):eq0:= a*x+b*y+c*z+d = 0;eq1:=subs(x=1,y=2,z=-1,eq0);eq2:=subs(x=2,y=0,z=3,eq0);eq3:=subs(x=-2,y=1,z=2,eq0);syseqns:=[eq1,eq2,eq3];vars:=[a,b,c,d];soln:=solve(syseqns,vars);soln:=subs(c=7,soln);eqn:=subs(soln[1][1],soln[1][2],c=op(soln[1][3])[1],soln[1][4],eq0);zsol:=solve(eqn,z);We note that the answer is the same, but the work and code in Maple more difficult this second way.Solutions for ii)A point P lies on the plane if it satisfies the equation that we have for zA point Q does not lie on the plane if it fails to satisfy the equation that we have for zBy inspection, if y = 1 the equation reduces to z = NiMsJiooIiIjIiIiIiIoISIiJSJ4RyIiIiEiIiomIiM1IiIiIiIoISIiIiIi and we can see that if we choose x = 5 this will make z = 0, so the point P (5,1,0) lies on the plane.By inspection, again if y = 1 the equation reduces to z = NiMsJiooIiIjIiIiIiIoISIiJSJ4RyIiIiEiIiomIiM1IiIiIiIoISIiIiIi and we can see that if we choose x = 5 this will make z = 0, so the point Q (5,1,1) wherez = 1 instead of 0 does not lie on the plane.Solution for iii)with(plots): with(plottools):p1:=plot3d(zsol,x=-1..6,y=-1..2):p2:=plot3d([5,1,0],x=-1..6,y=-1..2,color=red,style=point,symbol=cross,symbolsize=30):p3:=plot3d([5,1,1],x=-1..6,y=-1..2,color=blue,style=point,symbol=cross,symbolsize=30):display3d(seq(p||i,i=1..3),axes=normal,labels=['x','y','z']);
<Text-field background='[255,255,255]' bold='true' executable='false' family='Times New Roman' font_style_name='Text' foreground='[0,0,0]' italic='true' layout='Heading 2' opaque='false' placeholder='false' readonly='false' selection-placeholder='false' size='14' style='Text' subscript='false' superscript='false' underline='false'>Solved problem 4</Text-field>Determine all unit vectors in NiMqJCUiUkciIiQ= that make an angle of 1 radian with both u = (1,2,3) and v = (2,1,1). restart:with(LinearAlgebra):u:=<1,2,3>;v:=<2,1,1>;w:=<a,b,c>;eq1:=Norm(w,2)=1; eq2:=arccos(w.u/(Norm(w,2)*Norm(u,2)))=1;eq3:=arccos(w.v/(Norm(w,2)*Norm(v,2)))=1;Because of the ugliness of these equations, instead of solving them exactly with the solve( ) command, we use the approximate solution command, fsolve( ).soln:=fsolve({eq1,eq2,eq3},{a,b,c});The rule is: Never retype answers given by Maple because this inevitably reduces the accuracy of your answers.In this case, to extract the numerical answers that we go from the set of solutions, we use nops( ) which tells us how many parts a name represents, and op( ) which lets us access parts that a name represents. Because soln is already a list of equations, albeit very simple ones, we can just access the three equations using [ ], but once we have the equation, the op( ) command helps us to separate the number of the right hand side from the letter on the left hand side.nops(soln);soln[1];nops(soln[1]);op(2,soln[1]);w:=<op(2,soln[1]),op(2,soln[2]),op(2,soln[3])>;Checking that our answer actually works, approximately.The length of w should be 1, and the difference between cos( NiMlJnRoZXRhRw== ) and cos(1), where NiMlJnRoZXRhRw== is the angle between w and u or between w and v, should be 0.Norm(w,2);evalf(u.w/Norm(u,2)-cos(1));evalf(v.w/Norm(v,2)-cos(1));
<Text-field layout='Heading 2' style='Heading 2'><Font background='[255,255,255]' bold='true' executable='false' family='Times New Roman' font_style_name='Text' foreground='[0,0,0]' italic='true' opaque='false' placeholder='false' readonly='false' selection-placeholder='false' size='14' style='Text' subscript='false' superscript='false' underline='false'>Solved problem </Font>5</Text-field>i) Given vectors u = (1,2,3), v = (2,1,1) and x = (3,1,2), if possible determine a vector w such that the projection of w on any of u, v or x is twice the length of u, v or x respectively.ii) Plot a graph showing all of u, v, x and w.restart:with(LinearAlgebra):Solution for i)u:=<1,2,3>;v:=<2,1,1>;x:=<3,1,2>;w:=<a,b,c>;We generate an equation from each condition that the projection must be twice the length of the vector projected onto.For example, the projection of w onto u is NiMqJiUkdy51RyIiIiUkdS51RyEiIg== u and this is suppose to equal 2u, which means that NiMqJiUkdy51RyIiIiUkdS51RyEiIg== = 2 or w.u = 2u.ueqn1:=1*a+2*b+3*c=2*(u.u);eqn2:=2*a+1*b+1*c=2*(v.v);eqn3:=3*a+1*b+2*c=2*(x.x);syseq:=[eqn1,eqn2,eqn3];vars:=[a,b,c];Aaug:=GenerateMatrix(syseq,vars,augmented=true);R:=ReducedRowEchelonForm(Aaug);w:=<R[1,4],R[2,4],R[3,4]>;Now to check that w does as expectedScalarMultiply(u,(w.u)/(u.u))-ScalarMultiply(u,2);ScalarMultiply(v,(w.v)/(v.v))-ScalarMultiply(v,2);ScalarMultiply(x,(w.x)/(x.x))-ScalarMultiply(x,2);Solution for ii)with(plots): with(plottools):Ori:=[0,0,0];p1:=arrow(Ori,u,<1,1,-1>,2,.1,.1,arrow,color=black):p2:=arrow(Ori,v,<1,-1,-1>,2,.1,.1,arrow,color=red):p3:=arrow(Ori,x,<1,-1,-1>,2,.1,.1,arrow,color=blue):p4:=arrow(Ori,w,<-2,1,1>,2,.1,.1,arrow,color=green):display(seq(p||i,i=1..4),axes=normal,labels=['x','y','z']);
<Text-field background='[255,255,255]' bold='true' executable='false' family='Times New Roman' font_style_name='Text' foreground='[0,0,0]' italic='true' layout='Heading 2' opaque='false' placeholder='false' readonly='false' selection-placeholder='false' size='14' style='Text' subscript='false' superscript='false' underline='false'>Solved problem 6</Text-field>Determine all planes that pass through the points NiMmJSJQRzYjIiIh (4,1,5), NiMmJSJQRzYjIiIi (2,5,3) and whose distance from the point NiMmJSJQRzYjIiIj (1,2,4) is 2.restart:with(LinearAlgebra):If the general equation of the plane is ax + by + cz + d = 0, then by substituting the coordinates of points NiMmJSJQRzYjIiIh and NiMmJSJQRzYjIiIi into this equation for x, y and z, we obtain two equations in the four unknowns a, b, c and d. eq1:=4*a+b+5*c+d=0;eq2:=2*a+5*b+3*c+d=0;How do we use the information that the point NiMmJSJQRzYjIiIj is 2 units from the plane that we want to generate another equation involving a, b, c and d?Truly, the first question is, how do we compute the distance from a point to a plane (assuming the point does not lie in the plane for then the distance is 0)?What we mean by distance in this situation, is the length of the shortest line segment connecting the point to the plane.Let n = (a,b,c) be the normal vector of the plane. Let NiMmJSJQRzYjIiIk ( NiMmJSJ4RzYjIiIk, NiMmJSJ5RzYjIiIk, NiMmJSJ6RzYjIiIk ) be the point off the plane. Let Q ( NiMmJSJ4RzYjIiIh, NiMmJSJ5RzYjIiIh, NiMmJSJ6RzYjIiIh ) be any point on the plane. Then the vector joining Q to NiMmJSJQRzYjIiIk can be projected onto n, and the length of that projection is the distance between the point NiMmJSJQRzYjIiIk and the plane.Now QNiMmJSJQRzYjIiIk = ( NiMmJSJ4RzYjIiIk - NiMmJSJ4RzYjIiIh, NiMmJSJ5RzYjIiIk - NiMmJSJ5RzYjIiIh, NiMmJSJ6RzYjIiIk - NiMmJSJ6RzYjIiIh ) and the projection of this vector on n is given as NiMtJiUlUHJvakc2IyUibkc2IyYlI1FQRzYjIiIk = NiMqJi0lIi5HNiQmJSNRUEc2IyIiJCUibkciIiIpLCgqJCUiYUciIiMiIiIqJCUiYkciIiMiIiIqJCUiY0ciIiMiIiIqJiIiIiIiIiIiIyEiIiEiIg==NiMqJiUibkciIiIpLCgqJCUiYUciIiMiIiIqJCUiYkciIiMiIiIqJCUiY0ciIiMiIiIqJiIiIiIiIiIiIyEiIiEiIg==The length of NiMtJiUlUHJvakc2IyUibkc2IyYlI1FQRzYjIiIk is just NiMqJi0lJGFic0c2Iy0lIi5HNiQmJSNRUEc2IyIiJCUibkciIiIpLCgqJCUiYUciIiMiIiIqJCUiYkciIiMiIiIqJCUiY0ciIiMiIiIqJiIiIiIiIiIiIyEiIiEiIg== because NiMqJiUibkciIiIpLCgqJCUiYUciIiMiIiIqJCUiYkciIiMiIiIqJCUiY0ciIiMiIiIqJiIiIiIiIiIiIyEiIiEiIg== is of unit length (this is just the vector n divided by its own length, hence a unit vector).Now NiMtJSRhYnNHNiMtJSIuRzYkJiUjUVBHNiMiIiQlIm5H = NiMtJSRhYnNHNiMsKComJSJhRyIiIiwmJiUieEc2IyIiJCIiIiYlInhHNiMiIiEhIiIiIiIhIiIqJiUiYkciIiIsJiYlInlHNiMiIiQiIiImJSJ5RzYjIiIhISIiIiIiISIiKiYlImNHIiIiLCYmJSJ6RzYjIiIkIiIiJiUiekc2IyIiISEiIiIiIiEiIg== = NiMtJSRhYnNHNiMsLiomJSJhRyIiIiYlInhHNiMiIiQiIiIhIiIqJiUiYkciIiImJSJ5RzYjIiIkIiIiISIiKiYlImNHIiIiJiUiekc2IyIiJCIiIiEiIiomJSJhRyIiIiYlInhHNiMiIiEiIiIiIiIqJiUiYkciIiImJSJ5RzYjIiIhIiIiIiIiKiYlImNHIiIiJiUiekc2IyIiISIiIiIiIg==But the point Q lies on the plane, so NiMvLCoqJiUiYUciIiImJSJ4RzYjIiIhIiIiIiIiKiYlImJHIiIiJiUieUc2IyIiISIiIiIiIiomJSJjRyIiIiYlInpHNiMiIiEiIiIiIiIlImRHIiIiIiIh or NiMvLCgqJiUiYUciIiImJSJ4RzYjIiIhIiIiIiIiKiYlImJHIiIiJiUieUc2IyIiISIiIiIiIiomJSJjRyIiIiYlInpHNiMiIiEiIiIiIiIsJCUiZEchIiI=So we can rewrite NiMtJSRhYnNHNiMtJSIuRzYkJiUjUVBHNiMiIiQlIm5H = NiMtJSRhYnNHNiMsKiomJSJhRyIiIiYlInhHNiMiIiQiIiIiIiIqJiUiYkciIiImJSJ5RzYjIiIkIiIiIiIiKiYlImNHIiIiJiUiekc2IyIiJCIiIiIiIiUiZEciIiI= and NiMqJi0lJGFic0c2Iy0lIi5HNiQmJSNRUEc2IyIiJCUibkciIiIpLCgqJCUiYUciIiMiIiIqJCUiYkciIiMiIiIqJCUiY0ciIiMiIiIqJiIiIiIiIiIiIyEiIiEiIg== = NiMqJi0lJGFic0c2IywqKiYlImFHIiIiJiUieEc2IyIiJCIiIiIiIiomJSJiRyIiIiYlInlHNiMiIiQiIiIiIiIqJiUiY0ciIiImJSJ6RzYjIiIkIiIiIiIiJSJkRyIiIiIiIiksKCokJSJhRyIiIyIiIiokJSJiRyIiIyIiIiokJSJjRyIiIyIiIiomIiIiIiIiIiIjISIiISIiIn this problem, we then obtain a third equation in a, b, c and d of NiMvKiYtJSRhYnNHNiMsKiUiYUciIiIqJiIiIyIiIiUiYkciIiIiIiIqJiIiJSIiIiUiY0ciIiIiIiIlImRHIiIiIiIiKSwoKiQlImFHIiIjIiIiKiQlImJHIiIjIiIiKiQlImNHIiIjIiIiKiYiIiIiIiIiIiMhIiIhIiIiIiM= which we rewrite as NiMvLSUkYWJzRzYjLColImFHIiIiKiYiIiMiIiIlImJHIiIiIiIiKiYiIiUiIiIlImNHIiIiIiIiJSJkRyIiIiomIiIjIiIiKSwoKiQlImFHIiIjIiIiKiQlImJHIiIjIiIiKiQlImNHIiIjIiIiKiYiIiIiIiIiIiMhIiIiIiI=eq3:=abs(a+2*b+4*c+d)=2*Norm(<a,b,c>,2);Since this last equation is pretty ugly, we would like to use fsolve( ) rather than solve( ) to obtain our solution, but fsolve( ) requires as many equations as there are unknowns, and we have 3 equations and seemingly 4 unknowns. If we assume for the moment that the plane we are looking for does not pass through the origin, then d is not 0. Then we could divide all equations by d, obtaining three equations in only three unknowns, which would be NiMqJiUiYUciIiIlImRHISIi, NiMqJiUiYkciIiIlImRHISIi and NiMqJiUiY0ciIiIlImRHISIi.Instead of using these ugly variable names, we will just use a, b and c, recognizing that they are new versions of those variables.d:=1;soln:=fsolve({eq1,eq2,eq3},{a,b,c});So we now have our plane.
<Text-field background='[255,255,255]' bold='true' executable='false' family='Times New Roman' font_style_name='Text' foreground='[0,0,0]' italic='false' layout='Heading 2' opaque='false' placeholder='false' readonly='false' selection-placeholder='false' size='18' style='Text' subscript='false' superscript='false' underline='false'>Problems</Text-field>These problems, using Maple, are due Friday November 16, 2007.Please add your name (lastname_firstname) to the filename and then e-mail the completed lab to me at rosenfis@vaniercollege.qc.ca, with the subject heading "Maple Lab2 completed".Let u = NiMtJSdtYXRyaXhHNiM3JTcjIiIiNyMiIiQ3IyIiIw== v = NiMtJSdtYXRyaXhHNiM3JTcjLCQiIiIhIiI3IyIiIjcjIiIj w = NiMtJSdtYXRyaXhHNiM3JTcjIiIjNyMiIiI3IywkIiIlISIi r = NiMtJSdtYXRyaXhHNiM3JjcjIiIjNyMsJCIiJCEiIjcjIiIiNyMsJCIiJSEiIg==1. Where possible, compute: a) u + v b) u - v c) 10 u d) u - 2 v + 3 w e) u+ v - r2. Compute: a) ||u|| + ||v|| b) ||u + v|| c) u . v - v . u d) the angle between u and v e) the orthogonal projection of v onto w and verify your answer 3. Plot u, v, and w in separate graphs and then on the same graph.4. Verify Jacobi's identity: (u x v) x w + (v x w) x u + (w x u) x v = 0 5. Let l be the line with parametric equation x = (-1,2,1) + t (-4,1,5) Which of R (-9,4,1) and S (7,0,-10) are on l ? Plot l from t = -2 to t = 3. Plot l from P (-13,5,16) to Q (-21,7,26).6. Show that the four points P (0,4,3), Q (-1,-5,-3), R (-2,-2,1) and S (1,1,-1) are coplaner, i.e., all lie on the same plane. Determine two other points M and N, with M on and N off the plane. Plot this plane and the points M and N.7. Determine the angle between the planes 2x - 3y + z = 4 and 3x - 4y + 2 = 0.8. Determine all vectors of length 2 that make an angle of 1 radian with both u = (1,3,1) and v = (2,1,3).9. Determine a vector s whose projections onto u = (1,2,3), v = (2,1,4), and w = (3,1,1) are respectively, (3,6,9), (-2,-1,-4) and (6,2,2).10. Determine the equations of all planes that pass through the points P (3,2,1), Q (4,1,1) and are a distance 3 from R (6,2,7).11. Let L denote the line through the origin and the point P (1,2,3). Determine parametric equations of all lines that pass through the point Q (7,2,1) and meet L at an angle of 1 radian.12. Determine all points on the intersection of the planes 3 x + 7 y - 9 z = 8 and 2 x - 3 y + 4 z = 5 that are a distance 6 from the point P (1,2,3).13. Determine parametric equations of the line through the point P (1,-2,3) and parallel to the two planes 2x - 4y + z = 3 and x + 2y - 6z + 4 = 0. Plot the line and the two planes.14. Determine an equation for the plane which is perpendicular to the two planes x - 2y + 3z + 4 = 0 and 2x - 3y + 4z - 7 = 0, and passes through the point P (1,-1,1). Plot the three planes.15. Determine if the following pairs of lines are parallel, intersecting or skew. If they intersect, determine the point of intersection. If they are parallel or skew, determine the distance between them. a) {x = 1 + 11t , y = 2 + 5t , z = 13t} and {x = 2 + s , y = -1 + 3s , z = 1 - 2s} b) {x = 1 + 2t , y = 2 - 3t , z = 5 + 6t} and {x = 1 - 3s , y = 2 + 176s , z = 5 + 89s} c) {x = -4 + t , y = (1/3)t , z = -(1/2) + (3/2)t} and {x = 6s , y = -1 + 2s , z = 4 + 9s}16. Given lines L {x = 3 + 2t , y = 4 + 3t , z = 3 + 4t} and M {x = 1 + 4s , y = 3 + 5s , z = 1 + 8s}, determine an equation for the plane which contains the line L and which is parallel to M. Plot a graph showing segments of the lines L and M, as well as your plane.17. Determine parametric equations for the line M that passes through the point P (2,-1,4) and intersects the line L {x = 3 + t , y = -5 + t , z = 7 - t} at right angles. Plot a graph showing L, M and P.