Post Reply 
f'' oddities on WP 34S
05-22-2015, 05:44 PM
Post: #1
f'' oddities on WP 34S
On the function 3 root (x-2), f'' at x=2 produces ~353 instead of an infinite error...wondering why it comes up with 353.

Another related oddity...when solving f'' the above function to find its root, it produces a result of 2 which is a sign change, but is the result of a discontinuity.

Are these behaviors intende?
Find all posts by this user
Quote this message in a reply
05-22-2015, 11:35 PM
Post: #2
RE: f'' oddities on WP 34S
Both f' and f" use numerical methods to calculate the derivative. It is always possible to trick them. Not that I think it would help in this case, but you often need to set δx as described in the manual. Like most things numerical, you need some understanding of what is going on to effectively use the methods.


From the documentation in the sources:

Code:
Numeric Differentiation

order 4 equation:

df/dx   = (1/12h).[ f(x-2h) - 8.f(x-h) + 8.f(x+h) - f(x+2h) ] + O(h^4)
d2f/dx2 = (1/12h^2).[ - f(x-2h) + 16.f(x-h) - 30.f(x) +16.f(x+h) - f(x+2h) ] + O(h^4)

exact for polynomials up to quartics.


order 6 equation:

f '(x) ~ [ - f(x-3h) + 9 f(x-2h) - 45 f(x-h) + 45 f(x+h) - 9 f(x+2h) + f(x+3h) ] / ( 60 h )
f ''(x) ~ [ 2 f(x-3h) - 27 f(x-2h) + 270 f(x-h) - 490 f(x) + 270 f(x+h) - 27 f(x+2h) + 2 f(x+3h) ] / ( 180 h^2 )

exact for polynomials of degree < 7


order 10 equation:

df/dx = (1/2520.h).[ 2100.( f1 - f-1 ) - 600.( f2 - f-2 ) + 150.( f3 - f-3 ) - 25.( f4 - f-4 ) + 2.( f5 - f-5 ) ] + O(h^10)
d2f/dx2 = (1/25200.h^2).[ -73766 f0 + 42000.( f1 + f-1 ) - 6000.( f2 + f-2 ) + 1000.( f3 + f-3 ) - 125.( f4 + f-4 ) + 8.( f5 + f-5 ) ] + O(h^10)

where f(x+kh) = fk

exact for polynomials of degree < 11

The code attempts the 10th order equations but will fall back to the 6th and 4th order alternatives if the function fails to return a numeric result at the higher ordered.


- Pauli
Find all posts by this user
Quote this message in a reply
05-23-2015, 07:30 PM
Post: #3
RE: f'' oddities on WP 34S
Hi Dale,

The f" coding on the WP 34S is quite superior to the CASIO 9869gii. It cannot return a result for the equation in question within the range of ~1.87<x<~2.13 !
Find all posts by this user
Quote this message in a reply
05-23-2015, 07:31 PM
Post: #4
RE: f'' oddities on WP 34S
That's CASIO 9860gii.
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)