Difference between revisions of "VectorParametricLines1"

From WeBWorK_wiki
Jump to navigation Jump to search
(Created page with '<h2>Vector Parametric Lines</h2> 300px|thumb|right|Click to enlarge <p style="background-color:#f9f9f9;border:black solid 1px;padding:3px;"> …')
 
(add historical tag and give links to newer problems.)
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
  +
{{historical}}
  +
  +
<p style="font-size: 120%;font-weight:bold">This problem has been replaced with [https://openwebwork.github.io/pg-docs/sample-problems/Parametric/VectorParametricLines.html a newer version of this problem]</p>
  +
 
<h2>Vector Parametric Lines</h2>
 
<h2>Vector Parametric Lines</h2>
   
Line 5: Line 9:
 
This PG code shows how to require students to enter a parametrized line that must go through certain points when t=0 and t=1, or allow them to enter an equation for any parametric line through two points.
 
This PG code shows how to require students to enter a parametrized line that must go through certain points when t=0 and t=1, or allow them to enter an equation for any parametric line through two points.
 
</p>
 
</p>
* Download file: [[File:VectorParametricLines1.txt]] (change the file extension from txt to pg when you save it)
 
  +
* File location in OPL: [https://github.com/openwebwork/webwork-open-problem-library/blob/master/OpenProblemLibrary/FortLewis/Authoring/Templates/Parametric/VectorParametricLines1.pg FortLewis/Authoring/Templates/Parametric/VectorParametricLines1.pg]
* File location in NPL: <code>FortLewis/Authoring/Templates/Parametric/VectorParametricLines1.pg</code>
 
  +
* PGML location in OPL: [https://github.com/openwebwork/webwork-open-problem-library/blob/master/OpenProblemLibrary/FortLewis/Authoring/Templates/Parametric/VectorParametricLines1_PGML.pg FortLewis/Authoring/Templates/Parametric/VectorParametricLines1_PGML.pg]
   
 
<br clear="all" />
 
<br clear="all" />
Line 141: Line 145:
 
Context()->texStrings;
 
Context()->texStrings;
 
BEGIN_SOLUTION
 
BEGIN_SOLUTION
${PAR}SOLUTION:${PAR}
 
 
Solution explanation goes here.
 
Solution explanation goes here.
 
END_SOLUTION
 
END_SOLUTION
Line 164: Line 167:
   
 
[[Category:Top]]
 
[[Category:Top]]
[[Category:Authors]]
+
[[Category:Sample Problems]]
  +
[[Category:Subject Area Templates]]

Latest revision as of 07:52, 18 July 2023

This article has been retained as a historical document. It is not up-to-date and the formatting may be lacking. Use the information herein with caution.

This problem has been replaced with a newer version of this problem

Vector Parametric Lines

Click to enlarge

This PG code shows how to require students to enter a parametrized line that must go through certain points when t=0 and t=1, or allow them to enter an equation for any parametric line through two points.


Templates by Subject Area

PG problem file Explanation

Problem tagging data

Problem tagging:

DOCUMENT();

loadMacros(
"PGstandard.pl",
"MathObjects.pl",
"parserVectorUtils.pl",
"parserParametricLine.pl",
);

TEXT(beginproblem());

Initialization: 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);

$Q = Point($P + $V);

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

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.

Context()->texStrings;
BEGIN_TEXT
(a) Find a vector parametric equation for the 
line that goes through the point \( $P \) 
when \( t = 0 \) and the point \( $Q \) when
\( t = 1 \).
$BR
\( \vec{L}(t) = \)
\{ ans_rule(30) \}
$BR
$BR
(b) Find any vector parametric equation for the 
line that goes through the points \( $P \) and 
\( $Q \).
$BR
\( \vec{L}(t) = \)
\{ ans_rule(30) \}
END_TEXT
Context()->normalStrings;

Main Text:

$showPartialCorrectAnswers = 1;

ANS( $particular->cmp() );
ANS( $general->cmp() );

Answer Evaluation:

Context()->texStrings;
BEGIN_SOLUTION
Solution explanation goes here.
END_SOLUTION
Context()->normalStrings;

COMMENT('MathObject version.');

ENDDOCUMENT();

Solution:

Templates by Subject Area