# Evaluating the derivative of e^x

**URL:** <https://cl.desmos.com/t/evaluating-the-derivative-of-e-x/3552>\
**Category:** Questions\
**Created:** [July 23, 2021, 9:41pm UTC](https://cl.desmos.com/t/evaluating-the-derivative-of-e-x/3552 "2021-07-23T21:41:49Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![AlfonsoG](https://avatars.discourse-cdn.com/v4/letter/a/eada6e/32.png) [@AlfonsoG](https://cl.desmos.com/u/AlfonsoG)\
**Post date:** [July 23, 2021, 9:41pm UTC](https://cl.desmos.com/t/evaluating-the-derivative-of-e-x/3552/1 "2021-07-23T21:41:49Z")

</div>

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](https://teacher.desmos.com/activitybuilder/custom/60fb2b65b6bb71a78f4b09a7)

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](https://teacher.desmos.com/activitybuilder/custom/5ec91e85c002ff2d8b01d721))

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

Any help is greatly appreciated.

Saludos,

---

<div class="post-metadata">

**Author:** ![Mike\_Gleeson](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/mike_gleeson/32/650_2.png) [@Mike\_Gleeson](https://cl.desmos.com/u/Mike_Gleeson)\
**Post date:** [July 26, 2021, 2:03pm UTC](https://cl.desmos.com/t/evaluating-the-derivative-of-e-x/3552/2 "2021-07-26T14:03:53Z")

</div>

In your case here’s what’s happening:

 ![image](https://canada1.discourse-cdn.com/flex031/uploads/desmos/original/2X/f/ff6ee2c33fd2ea398b78920ff93cd25672899edf.png)

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](https://teacher.desmos.com/activitybuilder/custom/60febdc294b49c0854584e8c)

---

<div class="post-metadata">

**Author:** ![AlfonsoG](https://avatars.discourse-cdn.com/v4/letter/a/eada6e/32.png) [@AlfonsoG](https://cl.desmos.com/u/AlfonsoG)\
**Post date:** [July 26, 2021, 2:18pm UTC](https://cl.desmos.com/t/evaluating-the-derivative-of-e-x/3552/3 "2021-07-26T14:18:37Z")

</div>

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.  
Saludos,

---

<div class="post-metadata">

**Author:** ![rbrigida](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/rbrigida/32/1449_2.png) [@rbrigida](https://cl.desmos.com/u/rbrigida)\
**Post date:** [December 19, 2022, 12:19pm UTC](https://cl.desmos.com/t/evaluating-the-derivative-of-e-x/3552/4 "2022-12-19T12:19:10Z")

</div>

here is my activity (modified from Alfonso’s and piggybacked off of some of Mike Gleason’s suggestions.)  
The problem gets typed into the top of the table, and that’s it. (“Template-y”)  
It works well for most functions. (Not e^x and ln x)  
I was going to just go with “round”, to see how that works. (Addendum: worked like a charm for e^x - but “ln” is still wonky)  
I also added a check number usage example that works well with quotient rule problems. The code would require an edit each time to check for numbers in the simplified answer.

> **[Finding Derivatives • Activity Builder by Desmos](https://teacher.desmos.com/activitybuilder/custom/63a05125c6d2d05ee88fef33)**
>
> The "check" ges a little inconsistant with some functions.It seems to work for pretty much all functions, except the \`\\ln\` problems.(See notes on those problems) I think the best slide to use over and over as a template is slide 2 . It will pretty...

---

<div class="post-metadata">

**Author:** ![rbrigida](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/rbrigida/32/1449_2.png) [@rbrigida](https://cl.desmos.com/u/rbrigida)\
**Post date:** [December 19, 2022, 7:44pm UTC](https://cl.desmos.com/t/evaluating-the-derivative-of-e-x/3552/5 "2022-12-19T19:44:49Z")

</div>

I added a few slides. I used the rounding for any derivatives involving e^x, and it works.  
But it still is a bit strange on the last slide with ln x. Any ideas on why it does not work for some of the variations, I would much appreciate it.

I tried to enter some functions that might cause trouble. A lot of them just require clear use of parentheses so there is no “ambiguity”

ex: sin x cos x is not accepted, but (sinx)(cosx) and sin(x)cos(x) is fine.

---

<div class="post-metadata">

**Author:** ![pirsquared](https://avatars.discourse-cdn.com/v4/letter/p/4af34b/32.png) [@pirsquared](https://cl.desmos.com/u/pirsquared)\
**Post date:** [December 19, 2022, 8:24pm UTC](https://cl.desmos.com/t/evaluating-the-derivative-of-e-x/3552/6 "2022-12-19T20:24:04Z")

</div>

Isn’t the last slide just ambiguity issues as well? Neither `ln x cos x` nor `cos x ln x` work, but putting brackets around either the initial x or the initial function seem to work just fine:

 ![image](https://canada1.discourse-cdn.com/flex031/uploads/desmos/original/2X/2/2c8520ff7e6818859f695f072921503b351e7507.png)

---

<div class="post-metadata">

**Author:** ![rbrigida](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/rbrigida/32/1449_2.png) [@rbrigida](https://cl.desmos.com/u/rbrigida)\
**Post date:** [December 20, 2022, 1:11am UTC](https://cl.desmos.com/t/evaluating-the-derivative-of-e-x/3552/7 "2022-12-20T01:11:21Z")

</div>

![image](https://canada1.discourse-cdn.com/flex031/uploads/desmos/original/2X/b/b10b2b7c764a89a3c7521fa2e7a2d1f7c1db0433.png)

This was a question from an old AP exam. The **correct** multiple choice is exactly the way this is typed in, and it is saying no…but if I put the parentheses around the `3x` in the two trig functions, it says Yay. I guess my point is, is the AP answer not correctly given? I guess the route to go is to tell students to put the argument of the function in parentheses when in doubt. Probably not a bad habit.

And thanks for replying !

---

<div class="post-metadata">

**Author:** ![rbrigida](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/rbrigida/32/1449_2.png) [@rbrigida](https://cl.desmos.com/u/rbrigida)\
**Post date:** [December 21, 2022, 5:00pm UTC](https://cl.desmos.com/t/evaluating-the-derivative-of-e-x/3552/8 "2022-12-21T17:00:22Z")

</div>

If anyone is still on this thread, here is my template that can be used to crank out a bunch of “find the derivative” problems.  
If anyone has any edits/suggestions/improvements, let me know.

> **[Best Derivative Checker (so far) Template • Activity Builder by Desmos](https://teacher.desmos.com/activitybuilder/custom/63a33036d1f096908f72f269)**
>
> Template that works for pretty much any derivative. Problem goes in table, and that's it. If the numbers 1, 2 and 3 cause issues with div by zero etc, you can just change them in the table. 
> 
> I created two slides. The second slide is good for...

sorry, try as I may, I can’t get rid of the kid in the box. That gif is not anywhere in the activity anymore, and I keep deleting it from the activity home page. That might need a new thread “How to permanently delete the image that displays”
