Difference between revisions of "IndefiniteIntegrals1"
Jump to navigation
Jump to search
Paultpearson (talk | contribs) (PGML example link) |
|||
(3 intermediate revisions by 2 users not shown) | |||
Line 2: | Line 2: | ||
[[File:IndefiniteIntegrals1.png|300px|thumb|right|Click to enlarge]] |
[[File:IndefiniteIntegrals1.png|300px|thumb|right|Click to enlarge]] |
||
− | <p style="background-color:# |
+ | <p style="background-color:#f9f9f9;border:black solid 1px;padding:3px;"> |
This PG code shows how to check answers that are indefinite integrals or general antiderivatives. |
This PG code shows how to check answers that are indefinite integrals or general antiderivatives. |
||
</p> |
</p> |
||
− | * Download file: [[File:IndefiniteIntegrals1.txt]] (change the file extension from txt to pg when you save it) |
||
+ | * File location in OPL: [https://github.com/openwebwork/webwork-open-problem-library/blob/master/OpenProblemLibrary/FortLewis/Authoring/Templates/IntegralCalc/IndefiniteIntegrals1.pg FortLewis/Authoring/Templates/IntegralCalc/IndefiniteIntegrals1.pg] |
||
− | * File location in NPL: <code>FortLewis/Authoring/Templates/IntegralCalc/IndefiniteIntegrals1.pg</code> |
||
+ | * PGML location in OPL: [https://github.com/openwebwork/webwork-open-problem-library/blob/master/OpenProblemLibrary/FortLewis/Authoring/Templates/IntegralCalc/IndefiniteIntegrals1_PGML.pg FortLewis/Authoring/Templates/IntegralCalc/IndefiniteIntegrals1_PGML.pg] |
||
− | |||
<br clear="all" /> |
<br clear="all" /> |
||
Line 139: | Line 138: | ||
Context()->texStrings; |
Context()->texStrings; |
||
BEGIN_SOLUTION |
BEGIN_SOLUTION |
||
− | ${PAR}SOLUTION:${PAR} |
||
Solution explanation goes here. |
Solution explanation goes here. |
||
END_SOLUTION |
END_SOLUTION |
||
Line 162: | Line 160: | ||
[[Category:Top]] |
[[Category:Top]] |
||
− | [[Category: |
+ | [[Category:Sample Problems]] |
+ | [[Category:Subject Area Templates]] |
Revision as of 13:49, 14 June 2015
Indefinite Integrals and General Antiderivatives
This PG code shows how to check answers that are indefinite integrals or general antiderivatives.
- File location in OPL: FortLewis/Authoring/Templates/IntegralCalc/IndefiniteIntegrals1.pg
- PGML location in OPL: FortLewis/Authoring/Templates/IntegralCalc/IndefiniteIntegrals1_PGML.pg
PG problem file | Explanation |
---|---|
Problem tagging: |
|
DOCUMENT(); loadMacros( "PGstandard.pl", "MathObjects.pl", "AnswerFormatHelp.pl", "parserFormulaUpToConstant.pl", ); TEXT(beginproblem()); |
Initialization: |
Context("Numeric"); $specific = Formula("e^x"); $general = FormulaUpToConstant("e^x"); |
Setup: Examples of specific and general antiderivatives:
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 |
Context()->texStrings; BEGIN_TEXT Enter a specific antiderivative for \( e^x \): \{ ans_rule(20) \} \{ AnswerFormatHelp("formulas") \} $BR $BR Enter the most general antiderivative for \( e^x \): \{ ans_rule(20) \} \{ AnswerFormatHelp("formulas") \} END_TEXT Context()->normalStrings; |
Main Text: |
$showPartialCorrectAnswers = 1; ANS( $specific->cmp(upToConstant=>1) ); ANS( $general->cmp() ); |
Answer Evaluation:
For the specific antiderivative, we must use |
Context()->texStrings; BEGIN_SOLUTION Solution explanation goes here. END_SOLUTION Context()->normalStrings; COMMENT('MathObject version.'); ENDDOCUMENT(); |
Solution: |