[npl] / trunk / NationalProblemLibrary / Dartmouth / setMTWCh4S2 / problem_1.pg Repository:
ViewVC logotype

View of /trunk/NationalProblemLibrary/Dartmouth/setMTWCh4S2/problem_1.pg

Parent Directory Parent Directory | Revision Log Revision Log


Revision 134 - (download) (annotate)
Wed Mar 22 22:31:23 2006 UTC (7 years, 2 months ago) by jj
File size: 1084 byte(s)
Import of new files.

    1 ## -*- perl -*- ##
    2 ## Line above puts emacs in perl mode
    3 ##
    4 ## Description
    5 ##   Asks for the length of a parametric curve
    6 ## EndDescription
    7 
    8 DOCUMENT();
    9 loadMacros("PG.pl",
   10            "PGbasicmacros.pl",
   11            "PGchoicemacros.pl",
   12            "PGanswermacros.pl",
   13            "PGauxiliaryFunctions.pl",
   14            "PGgraphmacros.pl",
   15            "Dartmouthmacros.pl");
   16 
   17 
   18 ## Do NOT show partial correct answers
   19 $showPartialCorrectAnswers = 1;
   20 
   21 ## Lots of set up goes here
   22 $a = non_zero_random( -5, 5, 1 );
   23 $a_t = clean_scalar_string($a, "t");
   24 $b = non_zero_random( -5, 5, 1 );
   25 $b_sin_t = clean_scalar_string($b, "\sin t");
   26 $b_cos_t = clean_scalar_string($b, "\cos t");
   27 $c = random( -5, -1, 1 );
   28 $d = random( 1, 5, 1 );
   29 
   30 
   31 ## Ok, we are ready to begin the problem...
   32 ##
   33 TEXT(beginproblem());
   34 
   35 
   36 
   37 BEGIN_TEXT
   38 $BR
   39 Find the length of the given curve:
   40 $BR
   41 
   42 \(\mathbf{r} \left( t \right) = \left( $a_t, $b_sin_t, $b_cos_t
   43 \right) \) where \($c \leq t \leq $d \).  $PAR
   44 
   45 \{ans_rule(10)\}
   46 
   47 END_TEXT
   48 
   49 
   50 $ans = ($d - $c) * sqrt( $a**2 + $b**2 );
   51 ANS( std_num_cmp( $ans ) );
   52 
   53 ENDDOCUMENT();
   54 
   55 
   56 
   57 

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9