Second derivative with complex numbers

02092021, 06:06 AM
(This post was last modified: 02092021 06:08 AM by peacecalc.)
Post: #1




Second derivative with complex numbers
Hello all,
I'm shure, in former threads has discussed that topic. After programming the first derivative with complex numbers in my DM42, I tried the same with the second derivative. For rememberance, the taylorseries for the first derivative (truncating after the first derivative): \[ f(x+i\cdot h) \approx f(x) + f'(\tau)_{\tau = x}\cdot i h \quad \hbox{ take the imaginary part with}\quad \Im(f(x)) = 0 \quad \hbox{ because it is only real, one gets:} \quad f'(x) \approx \frac{1}{h}\Im(f(x+ih)) \] Now let us see the taylor series until the second derivative (and then truncating further terms): \[ f(x+i\cdot h) \approx f(x) + f'(\tau)_{\tau = x}\cdot i h + \frac{1}{2} f''(\tau)_{\tau = x}\cdot (i h)^2 \quad \hbox{with} \quad i^2 =  1 \Rightarrow f(x+i\cdot h) \approx f(x) + f'(\tau)_{\tau = x}\cdot i h  \frac{1}{2} f''(\tau)_{\tau = x}\cdot h^2 \] now we take the real part: \[ \Re(f(x+i\cdot h)) \approx f(x)  \frac{1}{2} f''(\tau)_{\tau = x}\cdot h^2 \quad\hbox{the term:} \quad f'(\tau)_{\tau = x}\cdot i h \quad \hbox{vanish because it is only imagenary and one gets:} \quad f''(x) \approx  \frac{2}{h^2} \cdot \left( \Re(f(x+i\cdot h))  f(x) \right) \] Maybe it is an advantage, because you only have to calculate one difference instead of three if you calculate the first order derivative without doing that in the complex plane. Please pay attention to, only the real part is taken from f(x+ih). Sincerely peacecalc 

« Next Oldest  Next Newest »

Messages In This Thread 
Second derivative with complex numbers  peacecalc  02092021 06:06 AM
RE: Second derivative with complex numbers  Albert Chan  02092021, 03:45 PM
RE: Second derivative with complex numbers  peacecalc  02112021, 09:49 AM
RE: Second derivative with complex numbers  Werner  02112021, 12:36 PM
RE: Second derivative with complex numbers  Albert Chan  02112021, 02:13 PM
RE: Second derivative with complex numbers  Albert Chan  02122021, 04:55 PM
RE: Second derivative with complex numbers  Werner  02112021, 05:49 PM
RE: Second derivative with complex numbers  Werner  02112021, 07:01 PM
RE: Second derivative with complex numbers  Werner  02112021, 08:53 PM
RE: Second derivative with complex numbers  peacecalc  02132021, 09:00 AM
RE: Second derivative with complex numbers  Werner  02132021, 02:50 PM

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