Evaluating the derivative of e^x

Here is an interesting situation.
I have noticed that when using evaluateAt and attempt to evaluate the derivative of e^x something is not working. The first screen evaluates a trig function, but see what happens in the second screen.
Testing derivative of e^x

I first found this situation in this awesome activity by Christopher Sewards @Christophe_Sew. I looked and looked but was unable to find the reason, so I created a small activity (above) to test, and I am finding the same issue.
(Product Rule • Activity Builder by Desmos)

I am wondering if it has to do with e being irrational or something like that.

Any help is greatly appreciated.


In your case here’s what’s happening:

You can see that the second check fails, and you’re right, it’s down to some small error Desmos introduces in its calculations. Here I’ve check the input evaluated at x=3 and the graph version of that same calculation. Not quite the same.

I don’t recommend evaluateAt for this sort of thing. Use a statistical total and allow for some error bound.

Also, the way this question is set up introduces a lot of brittle code. Try to use something more abstracted that works in many situations. It’ll make doing these sorts of things much more template-y and keep it DRY.

Here’s something I use quite often. It does the following:

  • abstracts the function latex to the note itself
  • imports that function into the graph, so that you never need touch the graph ever again - just change the note and everything still works
  • calculates the total number correct for the student
  • persistently shows a check mark on the dashboard if the student gets one - or more - correct.

Derivative Checking

Thank you Mike, I appreciate your feedback. I have notice similar errors now in other compound functions. There is still a lot I have to learn in desmos, but situations like this allow me to move a bit further each time.

1 Like