Difference between revisions of "DifferenceQuotient1"
Jump to navigation
Jump to search
(Switch to PGML.) |
(added historical tag and gave updated problem link) |
||
Line 1: | Line 1: | ||
+ | {{historical}} |
||
+ | |||
+ | <p style="font-size: 120%;font-weight:bold">This problem has been replaced with [https://openwebwork.github.io/pg-docs/sample-problems/DiffCalc/DifferenceQuotient.html a newer version of this problem]</p> |
||
<h2>Answer is a Difference Quotient</h2> |
<h2>Answer is a Difference Quotient</h2> |
||
Latest revision as of 08:19, 28 June 2023
This problem has been replaced with a newer version of this problem
Answer is a Difference Quotient
This PG code shows how to require students to simplify a difference quotient.
- 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', 'PGML.pl', 'PGcourse.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 |
BEGIN_PGML [`` \frac{d}{dx} \big( x^2 \big) = \lim_{h \to 0} \frac{(x+h)^2-x^2}{h} = \lim_{h \to 0} \big(``][_______________]{$limit}[`` \big) = ``] [_______________]{$fp} END_PGML |
Main Text: |
BEGIN_PGML_SOLUTION Solution explanation goes here. END_PGML_SOLUTION COMMENT('Uses PGML.'); ENDDOCUMENT(); |
Solution: |