alex wrote: > This seems to work: > given a symbolic matrix P of dimension 2x2 do: > > EVECP = maxima(P).eigenvectors() > EVEC1 = EVECP.part(2) > (first eigenvector) > EVEC2 = EVECP.part(3) > (second eigenvector) > EIGENVECT = (matrix(SR, 2,2, [EVEC1.sage(), EVEC2.sage()])).transpose > () (matrix of eigenvectors) > > for the inverse: > EIGENVECTINV = EIGENVECT.inverse() > (EIGENVECTINV * EIGENVECT).simplify_rational() > gives identity matrix. > > the eigenvalues of P with multiplicity (!) can be read with > EVECP.part(1) > > Is this correct ? > > Is there a way to symbolically compute the matrix exponential > directly ? > THX !
There should be a matrix exponential function: sage: var('a,b,c,d') (a, b, c, d) sage: A=matrix([[a,0],[0,d]]) sage: A.exp() [e^a 0] [ 0 e^d] sage: A=matrix([[a,2],[0,d]]) sage: A.exp() [ e^a (2*e^d - 2*e^a)/(d - a)] [ 0 e^d] Jason --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---