Indefinite Integrals

Indefinite integrals

Complete Code

Download file: IndefiniteIntegrals.pg

POD for Macro Files

PG problem file

Explanation

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:

  • 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 first answer blank in the 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

In the first answer blank, we look for the answer with an additive constant using the option upToConstant => 1 in the cmp method.

The second is a standard answer blank, but $general is created with. FormulaUpToConstant

BEGIN_PGML_SOLUTION
Solution explanation goes here.
END_PGML_SOLUTION

ENDDOCUMENT();

Solution

A solution should be provided here.