## DESCRIPTION ## Parametric equations: parametric curve in space ## ENDDESCRIPTION ## KEYWORDS('parametric', 'curve in space') ## DBsubject('WeBWorK') ## DBchapter('WeBWorK Tutorial') ## DBsection('Fort Lewis Tutorial 2011') ## Date('01/30/2011') ## Author('Paul Pearson') ## Institution('Fort Lewis College') ## TitleText1('') ## EditionText1('') ## AuthorText1('') ## Section1('') ## Problem1('') ########################### # Initialization DOCUMENT(); loadMacros( "PGstandard.pl", "MathObjects.pl", "parserMultiAnswer.pl", "AnswerFormatHelp.pl", ); TEXT(beginproblem()); ########################## # Setup Context("Numeric"); Context()->variables->are(t=>"Real"); Context()->variables->set(t=>{limits=>[0,10]}); $a = random(-5,-2,1); $x = Formula("$a * t**2"); $y = Formula("0"); $z = Formula("t"); $multians = MultiAnswer($x, $y, $z)->with( singleResult => 1, checker => sub { my ( $correct, $student, $self ) = @_; my ( $xstu, $ystu, $zstu ) = @{$student}; return 0 unless $xstu->isFormula; if (($xstu==$a*$zstu**2) && ($ystu==0)) { return 1; } else { return 0; } } ); ########################## # Main Text Context()->texStrings; BEGIN_TEXT Find a parametrization of the curve \( x = $a z^2 \) in the \(xz\)-plane. Use \( t \) as the parameter for all of your answers. $BR $BR \( x(t) = \) \{$multians->ans_rule(20)\} \{ AnswerFormatHelp("formulas") \} $BR \( y(t) = \) \{$multians->ans_rule(20)\} \{ AnswerFormatHelp("formulas") \} $BR \( z(t) = \) \{$multians->ans_rule(20)\} \{ AnswerFormatHelp("formulas") \} END_TEXT Context()->normalStrings; ######################## # Answer Evaluation $showPartialCorrectAnswers = 0; ANS($multians->cmp()); ############################ # Solution Context()->texStrings; BEGIN_SOLUTION ${PAR}SOLUTION:${PAR} Solution explanation goes here. END_SOLUTION Context()->normalStrings; COMMENT('MathObject version.'); ENDDOCUMENT();