Parametric Lines

Parametric equations: vector parametric lines

Complete Code

Download file: VectorParametricLines.pg

PG problem file

Explanation

DOCUMENT();

loadMacros(
    'PGstandard.pl',        'PGML.pl',
    'parserVectorUtils.pl', 'parserParametricLine.pl',
    'PGcourse.pl'
);

Preamble

We load parserVectorUtils.pl which provides the Line() subroutine for a particular parametrization of a line, as well as parserParametricLine.pl which provides a subroutine ParametricLine() that allows students to enter any parametrization.

Context('Vector')->variables->are(t => 'Real');

$P = non_zero_point3D(-9, 9, 1);
$V = non_zero_vector3D(-9, 9, 1);

$Q1 = Point($P + $V);
$Q2 = Point($P + 2 * $V);

$general    = ParametricLine($P, $V);
$particular = Line($P, $V, '2t');

Setup

For the answer which is a particular parametrization through two points at times t=0 and t=1, we use Line(). To allow students to enter any equation for a parametric line through two points, we use ParametricLine() The syntax is fairly self-explanatory.

BEGIN_PGML
a. Find any vector parametric equation for the
line that goes through the points [`[$P]`] and
[`[$Q1]`].

    [`\vec{L}(t) =`] [_]{$general}{20}

b. Find a vector parametric equation for the
line that goes through the point [`[$P]`]
when [`t = 0`] and the point [`[$Q2]`] when
[`t = 1`].

    [`\vec{L}(t) =`] [_]{$particular}{20}
END_PGML

Statement

This is the problem statement in PGML.
BEGIN_PGML_SOLUTION
Solution explanation goes here.
END_PGML_SOLUTION

ENDDOCUMENT();

Solution

A solution should be provided here.