# How can students self-check derivatives?

It is a good thing for students to self-check their work.

The results of some calculations can be checked easily. For example, the solutions to an equation can be substituted back into the original to see if they really work, and integrals can be differentiated to see if it comes to the original function.

In having trouble coming up with effective ways to self-check derivatives.

I am not looking for general advice like "look for minus-sign errors", but methods that will indicate that a mistake has occurred somewhere. Note also I am not talking about differentiation by first principles using limits, but using the rules of differentiation (powers, product rule etc). I would also prefer at least some things that don't require the use of a graphics calculator/computer algebra system.

• Are the computations table-based (using linearity, chain-rule, and known results) or definition-based (using the definition of derivative and computing limits)? The advice will differ depending on the method. Gerhard "Wonders If Function Looks Smooth" Paseman, 2015.03.24 – Gerhard Paseman Mar 24 '15 at 22:47
• Rule-based. We're not doing first principles here. – DavidButlerUofA Mar 24 '15 at 22:50
• You can tell them to integrate their newly found function to see if they get the original question =) – Trogdor Mar 25 '15 at 10:49
• @Trogdor: from experience, integrating seems to be more complicated to students than integrating. – Taladris Mar 25 '15 at 12:35
• If the problem is an application rather than an artificial textbook exercise, then the variables probably have units, and they can check the units of their result. Examples here lightandmatter.com/fund in section 1.7.3. – Ben Crowell Mar 29 '15 at 22:17

As a student currently taking calculus, something I do is select a couple of arbitrary points, and compare my derivative at those points with a small secant:

$f'(a) \approx \frac{f(a+h) - f(a)}{h}$

To avoid large error, I just make sure I'm not checking near any points where the derivative might be changing very quickly (eg. near 0 of $\frac{1}{x}$).

Usually, with an $h$ of 0.01, the error is extremely small, and after checking at a couple of points, I'm confident I've got it right.

What's nice is that this strategy can be extended to higher order derivatives too!

$f''(a) \approx \frac{f(a+x) - 2f(a) + f(a-x)}{x^2}$

EDIT:

For example, upon being asked to differentiate:

$f(x)=\frac{x^2 + 2}{3x - 5}$

Let's say I come up with the correct answer of:

$f'(x)=\frac{3x^2 - 10x-6}{(3x-5)^2}$

Now I want to check my answer.

First, upon analyzing $f(x)$, I see that there's a vertical asymptote at $x=5/3$. I'll want to be staying away from that region, so I decide to check the value of the derivative at $x=0$ and $x=10$.

Plugging in these values into the derivative function above I came up with:

$f'(0) = \frac{-6}{25} = -0.24$

$f'(10) = \frac{194}{625} = 0.3104$

Now I will approximate my derivative using:

$f'(x) \approx \frac{f(x+0.01) - f(x)}{0.01}$

And plugging in the values, I get:

$f'(0) \approx -0.2434607645875$

$f'(10) \approx 0.3104274870155$

Obviously, the approximations are extremely close to what my derivative function is outputting, so I'm confident I differentiated correctly.

• I like this idea. Can you give an example with an actual function and the numbers you put in? – DavidButlerUofA Mar 25 '15 at 1:53
• @DavidButlerUofA Sure, I've edited my answer. – Aaron Mar 25 '15 at 2:49
• I am awed by your diligence as a calculus student. When I was a student I just plugged the formula into Mathematica and had it take the derivate to check my work. – Atsby Mar 25 '15 at 4:21
• @Aaron This is very nice. You are definitely in the 1% of calculus students (especially for having thoughts like "To avoid large error, I just make sure I'm not checking near any points where the derivative might be changing very quickly (eg. near $0$ of $\frac{1}{x}$)"). One slight improvement to your method, from a numerical analysis perspective, is to use the symmetric difference quotient $\frac{f(x+h)-f(x-h)}{2h}$ instead of the standard difference $\frac{f(x+h)-f(x)}{h}$. This will generally have an error of order $h^2$ instead of $h$. – Steven Gubkin Mar 25 '15 at 14:54

One way (which I strongly encourage students to use), is to plot the original function and the derivative, and see if it makes sense in terms of increasing/decreasing behavior and concavity. This also adds a good conceptual reinforcement to what would otherwise be a mechanical problem.

A very simple example would be $f(x)=\frac{1}{3}x^3−x$. I calculate $f′(x)=x^2$. I plot $f(x)$ and $f′(x)$. Hmm. Looks like $f(x)$ is decreasing on $(−1,1)$ while $f′(x)>0$ there. Must have made a mistake. Go back and check my derivative calculation. Ah, should actually have $f′(x)=x^2−1$. Plot both. Looks good now!

• Can you give a more explicit example? – DavidButlerUofA Mar 25 '15 at 1:58
• +1 for the conceptual reinforcement. But this doesn't apply to a student that knows the rules but doesn't really understand the meaning of differentiation (hopefully, this is temporary). It also takes time, especially in exercises to teach differentiation rules, where the derivative functions can be quite complicated. – Taladris Mar 25 '15 at 12:34
• @Taladris If a student doesn't understand the meaning of differentiation, they have bigger things to worry about than miscalculating a derivative. – Jack M Mar 25 '15 at 12:55
• A great answer, but to a slightly different question. I will try to ask that question at some point if I find the time. – Benoît Kloeckner Mar 25 '15 at 12:57
• @DavidButlerUofA A very simple example would be $f(x) = \frac{1}{3}x^3 - x$. I calculate $f'(x)=x^2$. I plot $f(x)$ and $f'(x)$. Hmm. Looks like $f(x)$ is decreasing on $(-1,1)$ while $f'(x)>0$ there. Must have made a mistake. Go back and check my derivative calculation. Ah, should actually have $f'(x)=x^2-1$. Plot both. Looks good now! – Steven Gubkin Mar 25 '15 at 14:49

One method, which is probably not always applicable, would be to calculate the derivative using multiple different methods. If all methods give the same answer, you've probably got it right. If not, then you've definitely got at least one of them wrong, so keep trying till all of methods give the same answer. Example:

$$\frac{d}{dx}\frac 1 {x^2}=\ ?$$

Chain rule 1:

$$= \frac{d}{dx}\frac 1 {(x^2)}=\left(\frac{d}{dx}x^2\right)\left(\frac{-1}{(x^2)^2}\right)=\frac{-2x}{x^4}=\frac{-2}{x^3}$$

Chain rule 2:

$$= \frac{d}{dx}\left(\frac 1 x\right)^2=\left(\frac{d}{dx}\frac 1 x\right)\left(2\frac 1 x\right)=\frac{-2}{x^3}$$

Quotient rule:

$$= \frac{d}{dx}\frac 1 {x^2}=\frac{0\cdot x^2-2x\cdot1}{(x^2)^2}=\frac{-2}{x^3}$$

Product rule:

$$= \frac{d}{dx} \frac 1 x \frac 1 x=\frac 1 x\frac{-1}{x^2}+\frac{-1}{x^2}\frac 1 x=\frac{-2}{x^3}$$

I still do this sometimes with complicated functions, if I get odd results and suspect I might have dropped a minus sign or something.

They can always check that the value of their computed derivative at a few (preferably easy) points makes sense. This is exactly how I initially attempt to convince Calc I students that $$\frac{d}{dx}e^x \neq x \, e^{x-1}.$$ Such students typically know that the graph of $y=e^x$ has positive slope at all points but the value of the purported derivative is zero at the origin.

I teach students to graph the numerical derivative of the original function as well as what they think the derivative is. If the student is correct, the two graphs should be identical.

We use the TI-Nspire CX, which puts each graph in a different color and makes it pretty easy to see if the graphs overlap. I also spend time on some problem functions, where the numeric derivative is not graphed as expected or where it is easily misunderstood. Students soon learn that the graphic calculator is a great aid but is not to be completely trusted.

• I love the way this teaches conceptual and practical (numeric) calculus at the same time. It is also slightly amusing: instead of estimating to check the calculator answer, we use the calculator to estimate to check our answer! – Richard Mar 25 '15 at 0:31
• Can you give an example with an actual function/pictures of the graphs? – DavidButlerUofA Mar 25 '15 at 1:58

Well, how about they integrate the answer to see if they get back where they started modulo a constant.

More seriously though, if the derivative is correct then we can see some things in terms of even and odd functions. The derivative of an odd function is even. The derivative of an even function is odd. Beyond that, I suppose some CAS help is the inevitable, but irrelevant, answer.

Other ideas: sometimes there is more than one way to differentiate. If they can compare product to quotient, or logarithmic to other methods that would also provide fairly disparate paths to an answer.

So, in summary, integrals are easy as differentiation to check. But, differentiation is only as safe as the student's algebra is strong. In practice, I see weakness differentiation as a common problem in the students who barely make it through the calculus sequence.