Ideas for checking answers involving dy/dx or similar

I’m looking for ways that I might be able to check student answers that involve multiple variables and items like “dy/dx” or “dr/dt”, etc.

I usually use simpleFunction to check answers but that doesn’t work with variables like “dy/dx”.

Currently, the only way I can think of is to check their raw latex. That’s generally messy as there are too many possibilities for an answer.

For example, I want a student to find the derivative V=pir^3 or V=\frac{4}{3}\pi r^{3} with respect to t, so the student input to check would be dV/dt=4pir^2 *dr/dt or \frac{dV}{dt}=4\pi r^{2}\cdot\frac{dr}{dt}.

Any other ideas besides checking raw latex of the input?

Parse equation?



You can treat dy/dx as though it is a function of three variables, d, x and y, and evaluate that way.

I’ve never thought of that!

That is a great solution as I can just set the values I’m not checking equal to “1”. Thanks Daniel!

1 Like

Except that they could just type y/x and get the same result?

1 Like

You could check if evaluating at d=0 is undefined.