Difference between revisions of "DifferenceQuotient1"
Jump to navigation
Jump to search
Paultpearson (talk | contribs) |
Paultpearson (talk | contribs) (Add link to PGML version in OPL) |
||
Line 6: | Line 6: | ||
</p> |
</p> |
||
* File location in OPL: [https://github.com/openwebwork/webwork-open-problem-library/blob/master/OpenProblemLibrary/FortLewis/Authoring/Templates/DiffCalc/DifferenceQuotient1.pg NationalProblemLibrary/FortLewis/Authoring/Templates/DiffCalc/DifferenceQuotient1.pg] |
* File location in OPL: [https://github.com/openwebwork/webwork-open-problem-library/blob/master/OpenProblemLibrary/FortLewis/Authoring/Templates/DiffCalc/DifferenceQuotient1.pg NationalProblemLibrary/FortLewis/Authoring/Templates/DiffCalc/DifferenceQuotient1.pg] |
||
− | |||
+ | * PGML location in OPL: [https://github.com/openwebwork/webwork-open-problem-library/blob/master/OpenProblemLibrary/FortLewis/Authoring/Templates/DiffCalc/DifferenceQuotient1_PGML.pg FortLewis/Authoring/Templates/DiffCalc/DifferenceQuotient1_PGML.pg] |
||
<br clear="all" /> |
<br clear="all" /> |
Revision as of 16:04, 7 June 2015
Answer is a Difference Quotient
This PG code shows how to require students to simplify a difference quotient.
- File location in OPL: NationalProblemLibrary/FortLewis/Authoring/Templates/DiffCalc/DifferenceQuotient1.pg
- PGML location in OPL: FortLewis/Authoring/Templates/DiffCalc/DifferenceQuotient1_PGML.pg
PG problem file | Explanation |
---|---|
Problem tagging: |
|
DOCUMENT(); loadMacros( "PGstandard.pl", "MathObjects.pl", "parserDifferenceQuotient.pl", ); TEXT(beginproblem()); |
Initialization:
We need to include the macros file |
Context("Numeric"); $limit = DifferenceQuotient("2*x+h","h"); $fp = Compute("2 x"); |
Setup:
The routine |
Context()->texStrings; BEGIN_TEXT Simplify and then evaluate the limit. $BR $BR \( \displaystyle \frac{d}{dx} \big( x^2 \big) = \lim_{h \to 0} \frac{(x+h)^2-x^2}{h} = \lim_{h \to 0} \big( \) \{ ans_rule(15) \} \( \big) = \) \{ ans_rule(15) \} END_TEXT Context()->normalStrings; |
Main Text: |
$showPartialCorrectAnswers = 1; ANS( $limit->cmp() ); ANS( $fp->cmp() ); |
Answer Evaluation: |
Context()->texStrings; BEGIN_SOLUTION Solution explanation goes here. END_SOLUTION Context()->normalStrings; COMMENT('MathObject version.'); ENDDOCUMENT(); |
Solution: |