multiple correct answers | topic started 11/5/2003; 1:10:53 PM last post 11/5/2003; 10:19:20 PM |
|
|
|
Michael Gage - Re: multiple correct answers 11/5/2003; 10:19:20 PM (reads: 1132, responses: 0) |
Another
approach is to make sure that the answer is constant on the level
curves of your function f(x,y). I use this approach in checking answers
to exact differential equations. See for example: http://webhost.math.rochester.edu/webworkdocs/ww/pgView/setDiffEQ7Exact/ur_de_7_1.pg or http://webhost.math.rochester.edu/webworkdocs/ww/listLib?command=listSet&set=setDiffEQ7Exact Part of the source code is below: DOCUMENT() ; # This should be the first executable line in the problem.
The answer evaluator "level_curve_check" is in PGdiffeqmacros.pl which is in the the courseScripts directory. (Or you can view it from the CVS at http://cvs.webwork.rochester.edu/viewcvs.cgi/pg/macros/PGdiffeqmacros.pl) As written the level_curve_check is incomplete, although it was good enough to handle my differential equation class. The idea is to create one or more curves satisfying the ODE f_x dx + f_y dy = 0. The students answer should be constant on these curves. If they enter a function g(f(x,y)) instead of f(x,y) it will still be constant. As written the level_curve_check can be fooled by entering a constant function (e.g. F(x,y) =1) but it wouldn't be hard to modify the answer evaluator to check that the function is not constant as you stray off a level curve. I'll do that before I use those problems again in a course. The first entry of level curve check is the RHS of dy/dx = g(x,y)=- f_x/f_y. The second entry is the instructor's expected answer (serves as a check) and the initial t = x value and the initial y value for the level curve. Much could be done to improve this answer evaluator. Check more than one level curve for example, and of course check that the function is not constant along non-level curves -- but it it's a reasonable start. --Mike |