A Vector-value parametric line segment for a specific values of the parameter.
Download file: VectorLineSegment2.pg
DOCUMENT();
loadMacros('PGstandard.pl', 'PGML.pl', 'parserVectorUtils.pl', 'PGcourse.pl');
Preamble
The parserVectorUtils.pl
macro is loaded for the non_zero_point3D and
non_zero_vector3D methods.
Context("Vector");
Context()->variables->are(t => "Real");
$P = non_zero_point3D();
$disp = non_zero_vector3D();
$speed = random(3, 9, 1);
$ans = Compute("$P + $speed * t * $disp / norm($disp)");
Setup
A random point is generated with the non_zero_point3D
method, a random displacement vector is generated with the
non_zero_vector3D method, and a random speed is
generated.
Then the answer is computed from those values.
BEGIN_PGML
A particle starts at the point [`P = [$P]`] when [`t = 0`] and moves along a
straight line toward [`Q = [@ Point($P + $disp) @]`] at a speed of [`[$speed]`]
centimeters per second. Assume that [`x`], [`y`], and [`z`] are measured in
centimeters.
Find a vector equation for the position of the object.
[` \vec{r}(t) = `] [_]{$ans}{10}
_Do not include units in your answer._
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.