##DESCRIPTION ##KEYWORDS('integrals', 'trigonometric','substitution') ##ENDDESCRIPTION DOCUMENT(); # This should be the first executable line in the problem. loadMacros( "PGstandard.pl", "PGcourse.pl", "MathObjects.pl", # "source.pl", ); TEXT(beginproblem()); $showPartialCorrectAnswers = 1; ################### # # Setup $a = random(1,10,1); $b = random(1,6,1); $c1 = random(2,6,1); $c = $b+$c1; $d = random(2,100,1); $a1 = $c*$c-$b*$b; $a2 = $a*$a; $ab2 = 2*$a*$b; # The answer checker needs to be given a domain for this antiderivative to prevent it testing values for x such that the antiderivative is undefined. $rend = $c1/$a; $lend = 0; $Funct = Formula("$d/sqrt($a1 - $ab2 x - $a2 x^2)")->reduce; $Antideriv = Formula("$d*arcsin(($a*x+ $b)/$c)/$a "); ################### # # Text Context()->texStrings; BEGIN_TEXT Evaluate the indefinite integral. $PAR \[ \int $Funct dx \] $BR \{ans_rule(30) \} END_TEXT Context()->normalStrings; ################### # # Answers ANS($Antideriv->cmp(domain=>[$lend,$rend]),(upToConstant=>1)); # domain: makes sure that test points only lie in a certain interval, this # is useful for antiderivatives or general functions with restricted domains. # upToConstant: Checks student's formula up to a constant, essentially asking # the student to find 'an' antiderivative. # For example, given Int(x^2), both (x^3)/3 and (x^3)/3 + 9 would both be # marked correct. ENDDOCUMENT(); # This should be the last executable line in the problem.