## DESCRIPTION ## Integral calculus: Answer blanks in the limits of integration ## ENDDESCRIPTION ## KEYWORDS('Integrals', 'answer blanks in limits of integration') ## DBsubject('WeBWorK') ## DBchapter('WeBWorK Tutorial') ## DBsection('Fort Lewis Tutorial 2011') ## Date('10/20/2010') ## Author('Paul Pearson') ## Institution('Fort Lewis College') ## TitleText1('') ## EditionText1('') ## AuthorText1('') ## Section1('') ## Problem1('') ############################### # Initialization DOCUMENT(); loadMacros( "PGstandard.pl", "MathObjects.pl", "PGunion.pl", "answerHints.pl", ); TEXT(beginproblem()); ################################ # Setup Context("Numeric"); Context()->variables->are( x=>"Real", dx=>"Real", t=>"Real", dt=>"Real" ); $fpx = Formula("sin(x)"); $fpt = Formula("sin(t)"); # # Display the answer blanks properly in different modes # Context()->texStrings; if ($displayMode eq 'TeX') { $integral = '\(\displaystyle f(x) = '. ans_rule(4). '+ \int_{t = '. ans_rule(4). '}^{t = '. ans_rule(4). '}'. ans_rule(20). '\)'; } else { $integral = BeginTable(center=>0). Row([ '\(f(x)=\)'.$SPACE.ans_rule(4).$SPACE.'\(+\displaystyle\int\)', '\( t = \)'.ans_rule(4).$BR.$BR.'\( t = \)'.ans_rule(4), ans_rule(20)],separation=>2). EndTable(); } Context()->normalStrings; ##################################### # Main text Context()->texStrings; BEGIN_TEXT Find a formula for the function \(f(x)\) such that \( \displaystyle f'(x)= $fpx \) and \( f(2)=5 \). $BR $BR $integral END_TEXT Context()->normalStrings; ##################################### # Answer Evaluation $showPartialCorrectAnswers = 1; ANS( Compute("5")->cmp() ); ANS( Compute("x")->cmp() ); ANS( Compute("2")->cmp() ); ANS( Compute("$fpt * dt")->cmp() ->withPostFilter(AnswerHints( Formula("$fpx") => "Are you using the correct variable?", Formula("$fpx*dx") => "Are you using the correct variable?", Formula("$fpt") => "Don't forget the differential dt", )) ); ##################################### # Solution Context()->texStrings; BEGIN_SOLUTION ${PAR}SOLUTION:${PAR} Solution explanation goes here. END_SOLUTION Context()->normalStrings; COMMENT('MathObject version'); ENDDOCUMENT();