IndefiniteIntegrals1

From WeBWorK_wiki
Jump to navigation Jump to search
This article has been retained as a historical document. It is not up-to-date and the formatting may be lacking. Use the information herein with caution.

This problem has been replaced with a newer version of this problem


Indefinite Integrals and General Antiderivatives

Click to enlarge

This PG code shows how to check answers that are indefinite integrals or general antiderivatives.


Templates by Subject Area

PG problem file Explanation

Problem tagging data

Problem tagging:

DOCUMENT();

loadMacros(
  'PGstandard.pl',
  'MathObjects.pl',
  'parserFormulaUpToConstant.pl',
  'PGML.pl',
  'PGcourse.pl'
);

TEXT(beginproblem());

Initialization:

Context("Numeric");

$specific = Formula("e^x");

$general = FormulaUpToConstant("e^x");

Setup: Examples of specific and general antiderivatives:

  • Specific antiderivatives: e^x, e^x + pi
  • General antiderivatives: e^x + C, e^x + C - 3, e^x + K

The specific antiderivative is an ordinary formula, and we check this answer, we will specify that it be a formula evaluated up to a constant (see the Answer Evaluation section below). For the general antiderivative, we use the FormulaUpToConstant() constructor provided by parserFormulaUpToConstant.pl.

BEGIN_PGML
+ Enter a specific antiderivative for [` e^x `]: [____________]{$specific->cmp(upToConstant=>1)}

+ Enter the most general antiderivative for [` e^x `]: [____________]{$general}

[@ helpLink('formulas') @]*
END_PGML

Main Text:

BEGIN_PGML_SOLUTION
Solution explanation goes here.
END_PGML_SOLUTION

ENDDOCUMENT();

Solution:

Templates by Subject Area