## Forum archive 2000-2006

### ymarkov - A problem from derivatives - is there a fix ### ymarkov - A problem from derivatives - is there a fix

by Arnold Pizer -
Number of replies: 0 A problem from derivatives - is there a fix topic started 10/4/2001; 12:27:37 PMlast post 10/4/2001; 2:08:30 PM ymarkov - A problem from derivatives - is there a fix 10/4/2001; 12:27:37 PM (reads: 816, responses: 1) I would like to know if there is a fix/improvement for a problem on Chain rule that we would very much like to use: setDerivatives5ChainRule/ur_dr_5_20.pg It asks for the derivative of f(x) = ($a x^2 +$c)^{$m} ($d x^2 + $e)^{$n} It looks for an answer in the form ($a*x^2+$c)^$exp_1 * ($d*x^2+$e)^$exp_2 * ($coeff_1*x^3 +$coeff_3*x) and it uses "function_cmp" to evaluate the result. I would like to modify this to accept an answer in factorized form , but with any order of the multiples and with the last multiple possibly not simplified. I have a fair idea what to try, but troubleshooting is very difficult because even the original form of the problem accepts a non-simplified answer in about 50% of the cases. And then it rejects on ocasion a fully simplified answer with different order of multiples. I would be glad if anybody has an idea that might work. Thanks a lot. Yavor <| Post or View Comments |> Arnold K. Pizer - Re: A problem from derivatives - is there a fix 10/4/2001; 2:08:30 PM (reads: 1039, responses: 0) Assuming the answer to this problem is correctly given in the pg code (and in at least the current version of the problem it looks correct to me --- see below), WeBWorK using "function_cmp" should accept the correct answer in any form and reject any incorrect answer. Basically function_cmp works by evaluating the answer given in the pg code and the answer input by the student at several "random" points and if these "agree" up to some tolerance, the student's answer is said to be correct. So a "non-simplified" correct answer should always be accepted. Sometimes there can be numerical (floating point) problems. Also the version of function_cmp distributed with WeBWorK 1.6 had some numerical problems. I think these mostly resulted in accepting as correct answers that should have been rejected especially with antiderivatives with a large constant of integration. First check that the answer in the pg code is correct (I assume it is). If you want you can get the current version by clicking on Download WeBWork, Experimental CVS, webwork, ww_prob_lib, ... Second, check to see if this could be a problem with function_cmp. Backup your copy of PGanswermacros.pl (mv PGanswermacros.pl PGanswermacros.pl.new) and then replace PGanswermacros.pl by PGanswermacros.pl.original (mv PGanswermacros.pl.original PGanswermacros.pl). Then test things. Note that the correct answer is complicated. It is easy to make a mistake entering answers. The first time I tried this problem, I used "cut and paste" in an attempt to construct the answer: 3(-3 x^2 + 6)^2(-6x) (-9 x^2 + 9)^14 + (-3 x^2 + 6)^3 *14(-9 x^2 + 9)^13*(-18x) but got it wrong (cut and paste gave me (-3 x2 + 6) leaving out the ^). When I fixed this problem, the answer (given above) was accepted. Arnie <| Post or View Comments |>