The following warnings occurred:
Warning [2] Undefined array key 134147 - Line: 275 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 275 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 134237 - Line: 275 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 275 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 134240 - Line: 275 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 275 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 134241 - Line: 275 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 275 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $thread - Line: 295 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 295 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Trying to access array offset on value of type null - Line: 295 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 295 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $fid - Line: 295 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 295 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 134241 - Line: 331 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 331 errorHandler->error_callback
/inc/plugins/threaded_mode.php 332 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 332 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 332 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 304 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $theme - Line: 3 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 3 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Trying to access array offset on value of type null - Line: 3 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 3 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $theme - Line: 3 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 3 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Trying to access array offset on value of type null - Line: 3 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 3 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $lang - Line: 5 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 5 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Attempt to read property "messages_in_thread" on null - Line: 5 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 5 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks





HP 50g finding the nth derivative



#3

Is there a way I can find the nth derivative of a function using the hp 50g?


#4

Hi Jonathan -- I don't know if there's a key-sequence that'll do it for you, but I tend to doubt it. I checked the manual and didn't find any f^{(n)} function.

You can write a short program using matrix functions to do it.

Suppose you want the n-th derivative. The brute force way of doing this is to evaluate the function at n+1 points and take the finite differences dividing out (for n>0) some appropriate interval. Eg.

f^{(1)}(x) = \frac{f(h)-f(-h)}{2h} (LaTeX form - should be pretty obvious)

The error in this equation is O(h^2) since we've taken the symmetric diffrence.

Now if we truncate the Taylor expansion for a function f(x) about a point f(x_0) at order n

f(x)-f(x_0)=\sum_{m=1}^n f^{(m)}(x_0) x^m/m!

we can write a linear system of equations for the derivatives f^{(m)} for m>0 in terms of the differences of the function evaluated at x_0 and multiples of some small number h as

f^{(m)}(x_0) = \sum_{j=1}^n A^{-1}_{mj} [f_j-f(x_0)]

where f_j = f(x=j*h) and A^{-1} is the inverse of the matrix

A_{jm} = (j*h)^m/m!

The method is accurate to O(h^(n-j)) for the j-th derivative.

There are some tricks you can play to improve the accuracy of the algorithm, like taking symmetric intervals about x_0, ie. x=+/-h, x=+/-2h, x=+/-3h, ... but the idea is the same.

Of course, as always, you should check any math people tell you yourself.


#5

Why not do it symbolically in RPL?

<< -> fn var n 
<<
fn
1 n START
var
d
NEXT
EVAL
>>
>>
'dN' STO
It can be used on the stack or algebraically like this:
'dN(X^4,X,3)'
EVAL
The latter leads to 24*X as a result.

Marcus

Edited: 10 Mar 2008, 4:13 p.m. after one or more responses were posted


#6

Much nicer. Guess I should learn RPL.


Possibly Related Threads…
Thread Author Replies Views Last Post
  HP PRIME: derivative at a point Alasdair McAndrew 2 1,374 11-19-2013, 06:52 AM
Last Post: parisse
  Finding the largest prime factor on the 15c Evan Gates 2 1,209 10-03-2012, 11:17 AM
Last Post: Thomas Klemm
  WP34S derivative and solver reset Alessandro Castellani (Italy) 6 2,227 03-29-2012, 02:15 PM
Last Post: Dominic Richens
  Finding extremums of function with complex derivate Lukas K. 7 2,229 10-17-2011, 06:06 AM
Last Post: bunuel66
  HP 50g trilogy. The new HP 50g Blue (and II) Pablo P (Spain) 18 5,019 09-19-2011, 03:08 AM
Last Post: BruceH
  Finding prime factors on a "non-programmable" calculator Don Shepherd 6 2,082 09-05-2011, 10:11 AM
Last Post: Allen
  Polynomial Derivative and Integral for the HP 35S Eddie W. Shore 0 1,448 05-24-2011, 10:29 PM
Last Post: Eddie W. Shore
  Need help finding info from ace math folks Namir 16 3,869 08-24-2010, 11:28 PM
Last Post: Namir
  finding Df and variation and calculing limite but ... wassims 0 656 07-25-2010, 06:57 PM
Last Post: wassims
  Producing symbolic derivative on 48G Roger King 4 1,357 07-02-2008, 06:39 PM
Last Post: Roger King

Forum Jump: