Re: Re: Re: Re: Questions regarding MatrixExp, and its usage
- To: mathgroup at smc.vnet.net
- Subject: [mg63597] Re: [mg63564] Re: [mg63390] Re: [mg63355] Re: [mg63335] Questions regarding MatrixExp, and its usage
- From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
- Date: Fri, 6 Jan 2006 05:24:48 -0500 (EST)
- References: <200601050812.DAA19881@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
On 5 Jan 2006, at 07:01, Michael Chang wrote: > > Hmm ... > > >> Table[KroneckerDelta[i ² j, True] *Derivative[j - i][f][r]/(j - >> i)!, { i, 1, k}, {j, 1, k}] >> > > One symbol doesn't appear to be quite right on my screen (or > perhaps my understanding fails me!), but in the above line, should > this be: > > KroneckerDelta[i<=j,True] (a 'funny' symbol seems to appear in my > message between the i and j) > > and should the Derivative be with respect to 'x', evaluated at > 'r' (maybe that's what's implied, but I just wanted to make sure > that I'm not mis-interpretating this line as the Derivative with > respect to 'r')? > I was in a hurry and when I am in a hurry I think like a mathematician ;-). There is no point using KroneckerDelta here; it is much better to use sim-le If: p[f_, r_, k_] := Table[If[i � j, Derivative[j - i][f][r]/(j - i)!, 0], {i, 1, k}, {j, 1, k}]p[f_, r_, k_] := Table[If[i � j, Derivative[j - i][f][r]/(j - i)!, 0], {i, 1, k}, {j, 1, k}] For example p[f, r, 5] {{f[r], Derivative[1][f][r], Derivative[2][f][r]/2, (1/6)*Derivative [3][f][r], (1/24)*Derivative[4][f][r]}, {0, f[r], Derivative[1][f][r], Derivative[2][f][r]/2, (1/6)*Derivative[3][f][r]}, {0, 0, f[r], Derivative[1][f][r], Derivative[2][f][r]/2}, {0, 0, 0, f[r], Derivative[1][f][r]}, {0, 0, 0, 0, f[r]}} (By the way, I think your e-mail program should be able to render the "funny symbol" correctly if it interprets the encoding of the message as Unicode.) > > >> The important thing is that all the derivatives required to >> define the above matrices should exist! >> If they do f[A] will be well defined. So, if I am right, taking f >> [x_]:= x^z ought to give the definition of power of a matrix for >> provided all the above derivatives are well defined. If z is >> integer certainly here will be no problems, and the definition >> will agree with the usual one. >> > > Perhaps I do *NOT* understand, but here's an example that I > considered with regards to the above definition -- assume that > there is simply one Jordan block, and that A=B (S=I), with > > A = B = {{0,1,0},{0,0,1},{0,0,0}}; > > Suppose that we desire to find Exp[8 A] (MatrixExp[8 A]); the > minimal polynomial in x is x^3, and for i==j, I can see that the > diagonal entries will be Exp[0]==1, and that Exp[A] should be upper > triangular -- but the upper off-diagonal terms don't seem to be > quite right (using the above formula ... for instance, I don't see > how I can get the anticipated '8' and '8^2/2' terms) ... > I think your mistake is that although A is a Jordan block 8 A is not. So the right thing to do is this: A = {{0, 1, 0}, {0, 0, 1}, {0, 0, 0}}; In[4]:= {S, B} = JordanDecomposition[8*A]; f[x_] := Exp[x] S . p[f, 0, 3] . MatrixPower[S, -1] {{1, 8, 32}, {0, 1, 8}, {0, 0, 1}} This seems to be right. Andrzej Kozlowski Tokyo, Japan
- References:
- Re: Re: Re: Questions regarding MatrixExp, and its usage
- From: "Michael Chang" <michael_chang86@hotmail.com>
- Re: Re: Re: Questions regarding MatrixExp, and its usage