DifferenceQuotient1

From WeBWorK_wiki
Revision as of 08:19, 28 June 2023 by Pstaabp (talk | contribs) (added historical tag and gave updated problem link)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
This article has been retained as a historical document. It is not up-to-date and the formatting may be lacking. Use the information herein with caution.

This problem has been replaced with a newer version of this problem

Answer is a Difference Quotient

Click to enlarge

This PG code shows how to require students to simplify a difference quotient.


Templates by Subject Area

PG problem file Explanation

Problem tagging data

Problem tagging:

DOCUMENT();

loadMacros(
  'PGstandard.pl',
  'MathObjects.pl',
  'parserDifferenceQuotient.pl',
  'PGML.pl',
  'PGcourse.pl'
);
TEXT(beginproblem());

Initialization: We need to include the macros file parserDifferenceQuotient.pl.

Context('Numeric');

$limit = DifferenceQuotient('2*x+h','h');

$fp = Compute('2 x');

Setup: The routine DifferenceQuotient("function","variable") takes the simplified function and a variable name. If the variable is omitted, dx is used by default.

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:

Templates by Subject Area