Numerical Third Derivative

270 views
Skip to first unread message

Nevil Hopley

unread,
Mar 11, 2014, 5:49:35 PM3/11/14
to tins...@googlegroups.com
Here's a challenge for someone....

The Numeric Nspire can do evaluation of first and second derivatives of functions.
Does anyone know how to devise a technique that is quick and able to be done under assessment conditions for evaluating third derivatives?

I've tried reverting to f'(x)=(f(x+h)-f(x))/h for a small h (ie 1E-8) and that's fine for the first derivative
But doing f''(x)=(f'(x+h)-f'(x))/h or f'''(x)=(f''(x+h)-f''(x))/h all start to crumble and you need to make h larger (ie 1E-4) but that then compromises accuracy.

We know the CAS handheld can do this, but we are seeking a Numeric handheld solution, if one exists.....

....anyone?

In hope

Nevil

Sean Bird

unread,
Mar 11, 2014, 11:41:25 PM3/11/14
to tins...@googlegroups.com
Nevil,
Challenge accepted.
nderiv((x^(4),x,2),x,0.001)|x=2
Copy and paste the above line into your Nspire and see if it works.
nderiv now turns itself into the central diff, essentially uses the definition of the derivative that you were describing.
With the derivative template (shortcut: shift -) you can get up to the second derivative.
Using centralDiff or nderiv I've been able to get accurate results with a h of just 0.001. See the attached.
Thanks for asking, I learned something.

- Sean Bird
numeric 3rd deriv.jpg
numeric 5th nderiv.jpg

Nevil Hopley

unread,
Mar 12, 2014, 12:37:40 PM3/12/14
to tins...@googlegroups.com
Hello Sean

Challenge successfully completed!
Your solution works a treat - nice 1.

Your technique may help others doing the IB Maths HL Course with the Calculus Option, where Maclaurin Series were being processed and coefficients of terms were needing to be checked.

Many thanks, great to see you in Vegas and thanks for contributing so well to my Conference Session

Nevil

yasin arik

unread,
Apr 27, 2014, 5:47:36 AM4/27/14
to tins...@googlegroups.com

Instead of changing "h" , the step size, you can use this formulas since they are used by many scientists and mathematicians when calculators didn't exist.
I use them for my "step by step numerical methods" library which is under construction yet. I will release when it is completed hopefully.

BTW, Let me explain how you will use:
the step size is a real number which is absolute less than 1 . So let's pick h=0.5 . What will be happen is the x values evaluaed firstly. We want to find the derivative at the point where x=4. So our forward and backward x and f(x) lists will be like x={3;  3.5;  4;  4.5;  5} and the correspanding f(x) values. It is very simple and it has a very high accuracy.

Best
Yasin
Numerical Differantiation.png
Reply all
Reply to author
Forward
0 new messages