WeBWorK Problems

f prime in student answers

Re: f prime in student answers

by Davide Cervone -
Number of replies: 0
Paul:

Here is a file that implements prime notation for parserFunction objects. See the documentation in the file for details. The basics are that you load this file and then enable it in the context you want:

    loadMacros("parserFunctionPrime.pl");
    Context("Numeric");
    parser::FunctionPrime->Enable();
After that, you can use things like
    parserFunction("f(x)" => "x sin(x^2) - 3x^2");
    parserFunction("g(x)" => "3 cos(1-x^3)");
    $fog_prime = Compute("f'(g(x))g'(x)");
so that students have to enter the chain rule via prime notation.

Hope that does what you need.

Davide