Post Reply 
Derivatives on HP 42S
08-29-2018, 01:52 PM (This post was last modified: 08-27-2019 10:07 PM by Albert Chan.)
Post: #24
RE: Derivatives on HP 42S
A blog from the inventor of Complex Step Differentiation Algorithm.
It had a fully worked out example, showing very stable and accurate estimates:

https://blogs.mathworks.com/cleve/2013/1...entiation/

Real part of f(x + h*I) is also useful, for getting second derivative (involve subtraction):

http://ancs.eng.buffalo.edu/pdf/ancs_pap..._gnc06.pdf

Since we already have the value of y = f(x + h*I) of approximate extremum x, we can improve it:

Code:
from cmath import *
f = lambda x: sin(x) ** exp(x)  # rework post 3
x, h = 14.137167, 1e-6          # try to improve extremum x
y = f(complex(x, h))

# Newton's method, using f''(x) = 2/(h*h) * (f(x).real - y.real)
x -= h/2 * y.imag / (f(x).real - y.real)

2nd order x = 14.137167
3rd order x = 14.1371669412
    Actual x = 14.137166942003920 ...
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Derivatives on HP 42S - lrdheat - 08-20-2018, 03:03 AM
RE: Derivatives on HP 42S - Thomas Klemm - 08-20-2018, 04:38 AM
RE: Derivatives on HP 42S - Thomas Klemm - 08-20-2018, 07:43 AM
RE: Derivatives on HP 42S - Albert Chan - 08-20-2018, 11:54 PM
RE: Derivatives on HP 42S - lrdheat - 08-20-2018, 10:57 PM
RE: Derivatives on HP 42S - Thomas Klemm - 08-20-2018, 11:43 PM
RE: Derivatives on HP 42S - Thomas Klemm - 08-21-2018, 12:34 AM
RE: Derivatives on HP 42S - Thomas Klemm - 08-21-2018, 01:35 AM
RE: Derivatives on HP 42S - lrdheat - 08-21-2018, 02:24 AM
RE: Derivatives on HP 42S - Thomas Klemm - 08-21-2018, 06:14 AM
RE: Derivatives on HP 42S - RMollov - 08-23-2018, 12:58 PM
RE: Derivatives on HP 42S - lrdheat - 08-24-2018, 02:51 AM
RE: Derivatives on HP 42S - Thomas Klemm - 08-24-2018, 05:52 AM
RE: Derivatives on HP 42S - lrdheat - 08-25-2018, 05:19 PM
RE: Derivatives on HP 42S - Albert Chan - 08-25-2018, 07:03 PM
RE: Derivatives on HP 42S - Thomas Klemm - 08-25-2018, 06:05 PM
RE: Derivatives on HP 42S - Thomas Klemm - 08-25-2018, 08:00 PM
RE: Derivatives on HP 42S - Albert Chan - 08-25-2018, 09:20 PM
RE: Derivatives on HP 42S - Thomas Klemm - 08-26-2018, 04:54 AM
RE: Derivatives on HP 42S - Thomas Okken - 08-26-2018, 01:54 PM
RE: Derivatives on HP 42S - lrdheat - 08-26-2018, 04:47 PM
RE: Derivatives on HP 42S - Albert Chan - 08-26-2018, 08:39 PM
RE: Derivatives on HP 42S - Thomas Klemm - 08-26-2018, 08:00 PM
RE: Derivatives on HP 42S - Albert Chan - 08-29-2018 01:52 PM



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