Indefinite integrals
Download file: IndefiniteIntegrals.pg
DOCUMENT(); loadMacros( 'PGstandard.pl', 'PGML.pl', 'parserFormulaUpToConstant.pl', 'PGcourse.pl' );
Preamble
The macro parserFormulaUpToConstant.pl
will allow the entry of formula with a general constant like the antiderivative.
# Specific antiderivative: Marks correct e^x, e^x + pi, etc $specific = Formula("e^x"); # General antiderivative: Marks correct e^x + C, e^x + C - 3, e^x + K, etc. $general = FormulaUpToConstant("e^x");
Setup
Examples of specific and general antiderivatives:
e^x, e^x + pi
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 a. Enter a specific antiderivative for [`e^x`]: [_]{ $specific->cmp(upToConstant => 1) }{10} b. Enter the most general antiderivative for [`e^x`]: [_]{$general}{10} END_PGML
Statement
This is the problem statement in PGML.BEGIN_PGML_SOLUTION Solution explanation goes here. END_PGML_SOLUTION ENDDOCUMENT();
Solution
A solution should be provided here.