SERVING THE QUANTITATIVE FINANCE COMMUNITY

ISayMoo
Topic Author
Posts: 1127
Joined: September 30th, 2015, 8:30 pm

### Re: Calculate the derivative of exp(A) over A

AFAIK this method is quite slow for larger matrices, and best algorithms are those published by N. Higham and coauthors, as posted above by Farid. NB, TensorFlow also uses a similar algo: https://www.tensorflow.org/api_docs/pyt ... inalg/expm

Cuchulainn
Posts: 57335
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

### Re: Calculate the derivative of exp(A) over A

ISayMoo
Topic Author
Posts: 1127
Joined: September 30th, 2015, 8:30 pm

### Re: Calculate the derivative of exp(A) over A

Yes, but I prefer to ask the experts directly.

katastrofa
Posts: 6597
Joined: August 16th, 2007, 5:36 am
Location: Alpha Centauri

### Re: Calculate the derivative of exp(A) over A

Is the question in physics? Infinitesimal symmetry transformations? exp(a*H) = 1+ a*H + O(H^2)?

ISayMoo
Topic Author
Posts: 1127
Joined: September 30th, 2015, 8:30 pm

### Re: Calculate the derivative of exp(A) over A

No, another thing we talked about

katastrofa
Posts: 6597
Joined: August 16th, 2007, 5:36 am
Location: Alpha Centauri

### Re: Calculate the derivative of exp(A) over A

Oh, OK. That's just 99 topics to parse (from this month)...

Cuchulainn
Posts: 57335
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

### Re: Calculate the derivative of exp(A) over A

Is the question in physics? Infinitesimal symmetry transformations? exp(a*H) = 1+ a*H + O(H^2)?
https://www.tu-braunschweig.de/Medien-D ... cture6.pdf

ISayMoo
Topic Author
Posts: 1127
Joined: September 30th, 2015, 8:30 pm

### Re: Calculate the derivative of exp(A) over A

Would differentiating a Pade approximation of exp(H) over H_{kl} give a good approximation of d exp(H) / dH_{kl}? I suppose not...

katastrofa
Posts: 6597
Joined: August 16th, 2007, 5:36 am
Location: Alpha Centauri

### Re: Calculate the derivative of exp(A) over A

Certainly better than the Taylor series I suggested above It's (not) funny, but the only time I actually used a Padé approximant was at the exam to the course in algorithmics by a Professor who looked a bit like Stallman, if you recollect the (in-)famous toe jam eating. Then I turned a physicist and my world was truncated at the first order term of the power series expansion. I once ventured an order farther and I still keep receiving inquiries if I've seen any dragons and sea monsters.

Cuchulainn
Posts: 57335
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

### Re: Calculate the derivative of exp(A) over A

Would differentiating a Pade approximation of exp(H) over H_{kl} give a good approximation of d exp(H) / dH_{kl}? I suppose not...
No.

ISayMoo
Topic Author
Posts: 1127
Joined: September 30th, 2015, 8:30 pm

### Re: Calculate the derivative of exp(A) over A

Then I turned a physicist and my world was truncated at the first order term of the power series expansion. I once ventured an order farther and I still keep receiving inquiries if I've seen any dragons and sea monsters.
One respected (?) Polish professor of physics said in my presence "if the 2nd order expansion is not enough then the 4th order one won't suffice either, and you should just give up"

ISayMoo
Topic Author
Posts: 1127
Joined: September 30th, 2015, 8:30 pm

### Re: Calculate the derivative of exp(A) over A

Would differentiating a Pade approximation of exp(H) over H_{kl} give a good approximation of d exp(H) / dH_{kl}? I suppose not...
No.
I thought so...

Cuchulainn
Posts: 57335
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

### Re: Calculate the derivative of exp(A) over A

Would differentiating a Pade approximation of exp(H) over H_{kl} give a good approximation of d exp(H) / dH_{kl}? I suppose not...
No.
I thought so...
Take the Pade (0,1) (or was it (1,0) ?) $e^x$ approximate by $1+x$ on [-1,1]

1: Compute maximum error using 101 calculus
2. Compute derivative
3. GOTO 1

Gets worser and worser.

ISayMoo
Topic Author
Posts: 1127
Joined: September 30th, 2015, 8:30 pm

### Re: Calculate the derivative of exp(A) over A

I know. I was hoping for some \$MAGIC cancellation.

Cuchulainn
Posts: 57335
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

### Re: Calculate the derivative of exp(A) over A

Thinking out loud (don't know if it will work, but it might). Differentiate

du./dt = Au in time to get

d^2u/dt^2 = d(Au)/dt (A = A(t) in general

Then write as an ODE system

dv/dt = Bv  where B is a nested matrix.

Only(?) issue is to compute du/dt at t = 0 (usually by heuristic handwaving) (*)

Boost odeint could test it..

(*) this is the trick used in Keller's box scheme
https://wwwf.imperial.ac.uk/~ajacquie/I ... uffyCN.pdf