text: ## DESCRIPTION
  ## Calculus: The Fundamental Theorem of Calculus
  ## ENDDESCRIPTION
  
  ## DBsubject(Calculus - single variable)
  ## DBchapter(Integrals)
  ## DBsection(Fundamental theorem of calculus)
  ## Date(6/2/2005)
  ## Institution(UVA)
  ## Author(Jeff Holt)
  ## MLT(FTC_01)
  ## Level(3)
  ## TitleText1('Calculus: Early Transcendentals')
  ## AuthorText1('Stewart')
  ## EditionText1('5')
  ## Section1('5.3')
  ## Problem1('49')
  ## TitleText2('Calculus: Early Transcendentals')
  ## AuthorText2('Stewart')
  ## EditionText2('6')
  ## Section2('5.3')
  ## Problem2('')
  ## KEYWORDS('calculus', 'integrals', 'fundamental theorem of calculus')
  
  DOCUMENT();        # This should be the first executable line in the problem.
  
  loadMacros(
    "PGstandard.pl",
    "PGcourse.pl",
    "MathObjects.pl",
    "AnswerFormatHelp.pl"
  );
  
  TEXT(beginproblem());
  $showPartialCorrectAnswers = 1;
  
  Context("Numeric");
  
  $halfp1 = random(1,4,1);
  $p1 = 2*$halfp1;
  $halfp2 = random(1,3,1);
  $p2 = 2*$halfp2;
  
  BEGIN_TEXT
  Find the derivative of the function:
  
  \[ y = \int_{\sqrt{x}}^{x^$p1} {\sqrt{t} \sin t^{$p2}} dt \]
  
  $BR \( \displaystyle{\frac{dy}{dx}} \) = \{ans_rule(80)\} $BR
  ${BBOLD}NOTE:$EBOLD Enter a function as your answer.  \{AnswerFormatHelp("formulas")\}
  END_TEXT
  
  $p1p2 = $p1*$p2;
  $p11 = $p1-1;
  $exp1 = $halfp1+$p1-1;
  $f = Compute("$p1*x^$exp1*sin(x^($p1p2))-sin(x^($halfp2))/(2*x^(1/4))");
  $f->{limits}=[0,2];
  #@ans=(fun_cmp("$p1*x**($p1-1)*x**($p1/2)*sin(x**($p1*$p2))-1/2*x**(-.25)*sin(x**($p2/2))", vars=>"x"));
  
  ANS($f->cmp());
  
  ENDDOCUMENT();        # This should be the last executable line in the problem.
  