16
$\begingroup$

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.

$\endgroup$
5
  • 3
    $\begingroup$ 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 $\endgroup$ Mar 24, 2015 at 22:47
  • 1
    $\begingroup$ Rule-based. We're not doing first principles here. $\endgroup$ Mar 24, 2015 at 22:50
  • 2
    $\begingroup$ You can tell them to integrate their newly found function to see if they get the original question =) $\endgroup$
    – Trogdor
    Mar 25, 2015 at 10:49
  • 1
    $\begingroup$ @Trogdor: from experience, integrating seems to be more complicated to students than integrating. $\endgroup$
    – Taladris
    Mar 25, 2015 at 12:35
  • $\begingroup$ 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. $\endgroup$
    – user507
    Mar 29, 2015 at 22:17

6 Answers 6

23
$\begingroup$

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.

$\endgroup$
4
  • $\begingroup$ I like this idea. Can you give an example with an actual function and the numbers you put in? $\endgroup$ Mar 25, 2015 at 1:53
  • $\begingroup$ @DavidButlerUofA Sure, I've edited my answer. $\endgroup$
    – Name
    Mar 25, 2015 at 2:49
  • 10
    $\begingroup$ 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. $\endgroup$
    – Atsby
    Mar 25, 2015 at 4:21
  • 5
    $\begingroup$ @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$. $\endgroup$ Mar 25, 2015 at 14:54
14
$\begingroup$

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!

$\endgroup$
6
  • $\begingroup$ Can you give a more explicit example? $\endgroup$ Mar 25, 2015 at 1:58
  • $\begingroup$ +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. $\endgroup$
    – Taladris
    Mar 25, 2015 at 12:34
  • $\begingroup$ @Taladris If a student doesn't understand the meaning of differentiation, they have bigger things to worry about than miscalculating a derivative. $\endgroup$
    – Jack M
    Mar 25, 2015 at 12:55
  • $\begingroup$ A great answer, but to a slightly different question. I will try to ask that question at some point if I find the time. $\endgroup$ Mar 25, 2015 at 12:57
  • $\begingroup$ @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! $\endgroup$ Mar 25, 2015 at 14:49
10
$\begingroup$

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.

$\endgroup$
8
$\begingroup$

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.

$\endgroup$
4
$\begingroup$

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.

$\endgroup$
2
  • $\begingroup$ 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! $\endgroup$
    – Richard
    Mar 25, 2015 at 0:31
  • $\begingroup$ Can you give an example with an actual function/pictures of the graphs? $\endgroup$ Mar 25, 2015 at 1:58
3
$\begingroup$

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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.