Casio fx-991CW: Second Derivative
Calculating Higher Order Derivatives
A general formula to estimate derivatives of order n, where n is a positive integer (see Sources, Wikipedia):
d^n/dx^n = lim h→0 (1÷h^n * Σ((-1)^(k+n) * comb(n,k) * f(x+k*h), k=0, n)
The first, second, and third derivatives are derived from the above formula like so:
n = 1:
d/dx
= lim h→0 (1÷h * Σ((-1)^(k+1) * comb(1,k) * f(x+k*h), k=0 to 1)
= lim h→0 (1÷h * ((-1)^(0+1)*f(x) + (-1)^(1+1)*f(x+h))
= lim h→0 (1÷h * (-f(x) + f(x+h))
= lim h→0 (f(x+h) - f(x)) ÷ h
This is the famous forward difference formula.
n = 2:
d^2/dx^2
= lim h→0 (1÷h^2 * Σ((-1)^(k+2) * comb(2,k) * f(x+k*h), k=0 to 2)
= lim h→0 (1÷h^2 * ((-1)^2*comb(2,0)*f(x) + (-1)^3*comb(2,1)* f(x+h) + (-1)^4*comb(2,2)*f(x+2*h))
= lim h→0 (f(x) - 2*f(x+h) + f(x+2*h)) ÷ h^2
n = 3:
d^3/x^3
= lim h→0 (1÷h^3 * Σ((-1)^(k+3 * comb(3k) * f(x+k*h), k=0 to 3)
= lim h→0 (1÷h^3 * ((-1)^3*comb(3,0)*f(x) + (-1)^4*comb(3,1)*f(x+h) + (-1)^5*comb(3,2)*f(x+2*h)
+ (-1)^6*comb(3,3)*f(x+3*h))
= lim h→0 (-f(x) + 3*f(x+h) - 3*f(x+2*h) + f(x+3*h)) ÷ h^3
Using the fx-991CW
- - - - - - - - - -
Start with a note: Commentary and limitations: The functions f(x) and g(x), along with the calculus functions sum (Σ), integral (∫), and derivative (d/dx), has x as variable. It makes it a challenge that x is the only variable the functions f and g can take.
Example:
f(x)=x^2
g(x)=Σ(f(x),x=0 to 5)
Executing g(x) will take the values x=0 through x=5 no matter what value we put for g. The answer, in this example, will always return 0^2 + 1^2 + 2^2 + 3^2 + 4^2 + 5^2 = 55.
- - - - - - - - - -
We can still use f and g to set up specific derivatives in order n. For the second dervative, set up f and g:
f(x) = <function in terms of x>
g(x) = (f(x+2×A)-2×f(x+A)+f(x))÷A²
Store h in A. We can also choose an h and write in the formula directly.
Remember, this will calculate an approximation. With the most appropriate settings for h, we can get the best approximation.
Examples
For all the examples, A is set as 10^-7. The calculator is set to Radians. g(x) is the second derivative approximation.
Example 1:
f(x) = sin(x), f''(x) = -sin(x)
g(x) = (f(x+2×A)-2×f(x+A)+f(x))÷A²
x = 0.6; g(x): -0.564642551 (actual: -0.5646424734)
x = 2.8; g(x): -0.334988057 (actual: -0.3349881502)
Example 2:
f(x) = 2×e^(0.3×x), f''(x) = 0.18×e^(0.3×x)
g(x) = (f(x+2×A)-2×f(x+A)+f(x))÷A²
x = 0; g(x): 9/50 = 0.18 (actual: 0.18)
x = 1.2; g(x): 0.25799928 (actual: 0.2579992946)
Example 3:
f(x) = 1.1×x^3, f''(x) = 6.6×x
g(x) = (f(x+2×A)-2×f(x+A)+f(x))÷A²
x = 0; g(x): 6.6×10^-7 (actual: 0)
x = 2.2; g(x): 14.52 (actual: 14.52)
Sources
McCarty, George. Calculator Calculus. EduCALC Publications. E. & F.N. Spon: London. 1975, ISBN 0- 419-12910-3
Wikipedia "Numeric differentiation" Wikimedia Foundation, Inc. Last Edited June 17, 2025. Last Accessed July 7, 2025. https://en.wikipedia.org/wiki/Numerical_differentiation
Eddie
All original content copyright, © 2011-2025. Edward Shore. Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited. This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author.
The author does not use AI engines and never will.


