Post Reply 
WP 34S problem in solving f'(x)=0
02-17-2015, 11:21 PM (This post was last modified: 02-17-2015 11:27 PM by Dieter.)
Post: #6
RE: WP 34S problem in solving f'(x)=0
(02-17-2015 05:55 PM)lrdheat Wrote:  Trying to solve f'(x)=0 proves difficult. It really requires a close narrow interval to try solve with. Using an interval as narrow as 2.4 to 2.6 produces error +inf (correct answer is ~2.46675). Keep in mind that f(x) is continuous x>2 to x<4.
...
Any ideas?

As already stated, setting a suitable dx is crucial. Once this is done, everything works nicely:

Code:
LBL"δX"
x=0?
INC X
SDR 004   // set dx=x/10000, resp. 0,0001 for x=0
RTN

LBL"FX"
FILL      // just to be sure - usually not required for SLV
x^2
x<>Y
INC X
x^3
x
x<>Y
2
-
x^2
/
x<>Y
4
-
x^2
x^2
/
RTN

LBL"DER"
f'(x) "FX"
RTN

2,1 [ENTER] 3,9   SLV "DER"
     =>  2,466746549437220

The result agrees with the exact solution in 13 digits. A slight change in the δX routine (SDR 003, RSD 01) even returns the exact 16-digit result +1 ULP.
Not bad for a numeric approximation of the derivative, is it?

Dieter
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: WP 34S problem in solving f'(x)=0 - Dieter - 02-17-2015 11:21 PM



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