New Features in Maple 17: Multivariate Calculus for Students
 

Next Feature

Maple Student packages are designed explicitly for teaching and learning concepts in mathematics. In Maple 17, the student package for multivariate calculus has been expanded to provide more tools for exploring problems involving lines and planes.

  • Work with lines and planes in two and three dimensions.
  • Specify objects in a variety of ways, such as defining a line 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.
  • Define lines and planes using specific values or unknown variables.  

  • Calculate the distance to other objects, relative position, the intersection between multiple objects, and many other values of interest.
  • Visualize lines, planes, intersections, and more.

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 and .

Examples

> with(Student:-MultivariateCalculus); -1
 

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))
 

Student:-MultivariateCalculus:-Line([1, 0, 2], Vector(3, {(1) = 2, (2) = -2, (3) = 1}), variables = [x, y, z], parameter = t, id = 1)

> l2 := Line([5, -3, 1], [3, -3, 6])
 

Let us see if l1 intersects l2.

> Intersects(l1, l2)
 

true

> pt := GetIntersection(l1, l2)
 

[4, -3, `/`(7, 2)]

The intersection is a point.

> Contains(l1, pt)
 

true

> Contains(l2, pt)
 

true

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')
 

{`+`(x, y) = 1, `+`(`-`(`*`(`/`(1, 2), `*`(x))), z) = `/`(3, 2)}

> eqns2 := GetRepresentation(l2, 'form = equations')
 

{y = -3, `+`(`*`(`/`(5, 2), `*`(x)), z) = `/`(27, 2)}

> solve(`union`(eqns1, eqns2))
 

{x = 4, y = -3, z = `/`(7, 2)}

We can obtain various other representations of a line with the GetRepresentation command.

> GetRepresentation(l1)
 

`+`(Typesetting:-delayDotProduct(t, Vector[column](%id = 18446744078088537382)), Vector[column](%id = 18446744078088537502))

> GetRepresentation(l1, 'form = combined_vector')
 

Vector[column](%id = 18446744078088537622)

> GetRepresentation(l1, 'form = parametric')
 

[x = `+`(1, `*`(2, `*`(t))), y = `+`(`-`(`*`(2, `*`(t)))), z = `+`(2, t)]

> GetRepresentation(l1, 'form = symmetric')
 

`and`(`+`(`*`(`/`(1, 2), `*`(x)), `-`(`/`(1, 2))) = `+`(`-`(`*`(`/`(1, 2), `*`(y)))), `+`(`-`(`*`(`/`(1, 2), `*`(y)))) = `+`(z, `-`(2)))

We construct a third line, parallel to l1.

> l3 := Line([0, 0, 0], [2, -2, 1])
 

Student:-MultivariateCalculus:-Line([0, 0, 0], Vector(3, {(1) = 2, (2) = -2, (3) = 1}), variables = [x, y, z], parameter = t, id = 3)

> AreParallel(l1, l3)
 

true

What is the relative position of l3 with respect to l2?

> AreParallel(l2, l3)
 

false

> Intersects(l2, l3)
 

false

> AreSkew(l2, l3)
 

true

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)
 

`+`(`*`(`/`(1, 3), `*`(`^`(29, `/`(1, 2)))))

> Distance(l2, l3)
 

`+`(`*`(`/`(9, 65), `*`(`^`(65, `/`(1, 2)))))

The GetPlot command shows a visualization of the line.

> GetPlot(l1)
 

Plot_2d

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'), `in`(line, [l1, l2, l3])), 'caption' =
 

Plot_2d

Let's consider the plane containing l1 and l2.

> p1 := Plane(l1, l2)
 

Student:-MultivariateCalculus:-Plane(Vector(3, {(1) = -10, (2) = -12, (3) = -4}), [4, -3, `/`(7, 2)], variables = [x, y, z], id = 1)

What is the relative position of l3 and p1?

> Intersects(p1, l3)
 

false

> AreParallel(p1, l3)
 

true

> Distance(p1, l3)
 

`+`(`*`(`/`(9, 65), `*`(`^`(65, `/`(1, 2)))))

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)
 

Student:-MultivariateCalculus:-Plane(Vector(3, {(1) = -4, (2) = -3, (3) = 2}), [1, 0, 2], variables = [x, y, z], id = 2)

> Intersects(p2, l2)
 

true

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))
 

Student:-MultivariateCalculus:-Line([1, 2, -2], Vector(3, {(1) = a, (2) = b, (3) = 1}), variables = [x, y, z], parameter = t, id = 4)

> Intersects(l4, l2)
 

false

> dist_4_2 := Distance(l4, l2)
 

`/`(`*`(abs(`+`(`*`(25, `*`(a)), `*`(26, `*`(b)), 10))), `*`(`^`(`+`(`*`(29, `*`(`^`(abs(b), 2))), `*`(`^`(abs(`+`(2, `*`(5, `*`(a)))), 2))), `/`(1, 2))))

> dist_4_3 := Distance(l4, l3)
 

`/`(`*`(abs(`+`(`*`(2, `*`(a)), `*`(5, `*`(b)), 6))), `*`(`^`(`+`(`*`(`^`(abs(`+`(b, 2)), 2)), `*`(`^`(abs(`+`(`-`(2), a)), 2)), `*`(`^`(abs(`+`(`*`(2, `*`(b)), `*`(2, `*`(a)))), 2))), `/`(1, 2))))

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.

> intersect_2_3 := solve({numer(dist_4_2) = 0, numer(dist_4_3) = 0})
 

{a = `/`(106, 73), b = -`/`(130, 73)}

We now let l5 be the particular line with these values for a and b.

> l5 := eval(l4, intersect_2_3)
 

Student:-MultivariateCalculus:-Line([1, 2, -2], Vector(3, {(1) = `/`(106, 73), (2) = -`/`(130, 73), (3) = 1}), variables = [x, y, z], parameter = t, id = 5)

> GetRepresentation(l5)
 

`+`(Typesetting:-delayDotProduct(t, Vector[column](%id = 18446744078177345894)), Vector[column](%id = 18446744078177346014))

> GetIntersection(l2, l5)
 

[`/`(66, 13), -3, `/`(21, 26)]

> GetIntersection(l3, l5)
 

[`/`(57, 4), -`/`(57, 4), `/`(57, 8)]