Multivariate Calculus for Students
The Student package contains a lot of functionality that is useful in the classroom. For Maple 17, we added several new items of functionality, the most significant of which is maybe the introduction of Line and Plane objects in the MultivariateCalculus subpackage. These are explained in the current page.
The Line and Plane objects are meant for teaching simple high school (affine) geometry in two and three dimensions. The objects can be defined in many different ways; for example, a Line in three-dimensional space can be defined as:
containing two points,
containing a point and a direction,
being the solution of two equations,
having a parametric representation,
containing a point and being orthogonal to a plane, or
being contained in two planes.
Once the objects are constructed, one can find out the distance to other objects, their relative position, or the intersection between multiple objects.
For many applications, the lines and planes that the objects represent will be fully determined. However, Maple supports arbitrary algebraic expressions occurring in the coordinates of the parameters used to define the objects. For example, it can handle the line through the points 2,3,a and 1,a2+b,3.
Examples
with⁡Student:-MultivariateCalculus:
We construct two lines; the first contains the point 1,0,2 and the direction 2,−2,1, the second the points 5,−3,1 and 3,−3,6. The Line and Plane objects understand lists as points and Vectors as directions.
l1:=Line⁡1,0,2,2,−2,1
l1:=<< Line 1 >>
l2:=Line⁡5,−3,1,3,−3,6
l2:=<< Line 2 >>
Let us see if l1 intersects l2.
Intersects⁡l1,l2
true
pt:=GetIntersection⁡l1,l2
pt:=4,−3,72
The intersection is a point.
Contains⁡l1,pt
Contains⁡l2,pt
We can also find pt by obtaining equations for both lines (there are two for each) and solving them simultaneously. The default coordinate variables are x, y, and z; when constructing a line or plane, you can choose different variables.
eqns1:=GetRepresentation⁡l1,'form=equations'
eqns1:=x+y=1,−12⁢x+z=32
eqns2:=GetRepresentation⁡l2,'form=equations'
eqns2:=y=−3,52⁢x+z=272
solve⁡eqns1∪eqns2
x=4,y=−3,z=72
We can obtain various other representations of a line with the GetRepresentation command.
GetRepresentation⁡l1
GetRepresentation⁡l1,'form=combined_vector'
GetRepresentation⁡l1,'form=parametric'
x=1+2⁢t,y=−2⁢t,z=2+t
GetRepresentation⁡l1,'form=symmetric'
x2−12 = −y2 = z−2
We construct a third line, parallel to l1.
l3:=Line⁡0,0,0,2,−2,1
l3:=<< Line 3 >>
AreParallel⁡l1,l3
What is the relative position of l3 with respect to l2?
AreParallel⁡l2,l3
false
Intersects⁡l2,l3
AreSkew⁡l2,l3
We can compute the (Euclidean) distance between a pair of lines using the Distance command. Intersecting lines are at distance 0.
Distance⁡l1,l2
0
Distance⁡l1,l3
13⁢29
Distance⁡l2,l3
965⁢65
The GetPlot command shows a visualization of the line.
GetPlot⁡l1
In order to combine visualizations, one can use plots:-display. With all features of the visualizations turned on, it is a little crowded, so we turn some of them off.
plots:-display⁡seq⁡GetPlot⁡line,'showvector=false','showpoint=false',line∈l1,l2,l3,'caption'=Three lines
Let's consider the plane containing l1 and l2.
p1:=Plane⁡l1,l2
p1:=<< Plane 1 >>
What is the relative position of l3 and p1?
Intersects⁡p1,l3
AreParallel⁡p1,l3
Distance⁡p1,l3
The distance between p1 and l3 is the same as the distance between l2 and l3. This is always the case when l3 is parallel to p1, which contains l2, but l2 is not parallel to l3.
Since l1 and l2 intersect, l2 also intersects the plane containing l1 and l3.
p2:=Plane⁡l1,l3
p2:=<< Plane 2 >>
Intersects⁡p2,l2
Now let us consider a family of lines. We let l4 be a line containing the point 1,2,−2 and the direction a,b,1, for some values a and b.
l4:=Line⁡1,2,−2,a,b,1
l4:=<< Line 4 >>
Intersects⁡l4,l2
Distance⁡l4,l2
25⁢a+26⁢b+1029⁢b2+2+5⁢a2
Distance⁡l4,l3
2⁢a+5⁢b+6b+22+−2+a2+2⁢b+2⁢a2
If we can find values for a and b that make the numerators of both those distances zero, we get a line that intersects both l2 and l3.
solve⁡numer⁡=0,numer⁡=0
a=10673,b=−13073
We now let l5 be the particular line with these values for a and b.
l5:=eval⁡l4,
l5:=<< Line 5 >>
GetRepresentation⁡l5
GetIntersection⁡l2,l5
6613,−3,2126
GetIntersection⁡l3,l5
574,−574,578
Additional examples can be found in the MultivariateCalculus Example Worksheet.
See Also
AreSkew
GetIntersection
GetRepresentation
Intersects
Line
Plane
Download Help Document