RDR^t

18 views
Skip to first unread message

Chris Kees

unread,
Oct 2, 2014, 7:54:24 PM10/2/14
to sy...@googlegroups.com
Hi,

Does anybody have suggestions on sympy examples for symbolic eigenvector decompositions A=RDR^t where A is symmetric with real positive distinct eigenvalues? Or more specifically symbolic computations of A^{-1/2}.

Chris

Aaron Meurer

unread,
Oct 2, 2014, 8:15:11 PM10/2/14
to sy...@googlegroups.com
SymPy can do it, as long as it can compute the roots of the
characteristic polynomial. Is there any specific use-case you're
looking for? The syntax is Matrix.diagonalize (or sqrt(Matrix) if all
you want is the square root).

Aaron Meurer
> --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sympy+un...@googlegroups.com.
> To post to this group, send email to sy...@googlegroups.com.
> Visit this group at http://groups.google.com/group/sympy.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sympy/CAOVFbFga0%3D%2Bzrx9-NJz2Xttd-_iVK3vzQt7ZuYC26nQWbTEtGw%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

Chris Kees

unread,
Oct 2, 2014, 8:31:48 PM10/2/14
to sy...@googlegroups.com
Thanks. I don't know how I missed sqrt(Matrix).

Yes, the specific  context is solving hyperbolic  systems of PDE's so the matrices are small n-by-n were  n is usually 2,3,4, or 5, but I have to do it  at points on a large 2D or  3D mesh  so I'm looking for a nice way to generate C or Fortran code for symbolic  expressions of the form A^{-1}*B^{-1/2} where A is SPD and B is symmetric with non-negative eigenvalues.  There may be a point when I'm better off computing these with lapack  factorizations, but I'd like to have sympy-generated analytical expressions

Chris

Reply all
Reply to author
Forward
0 new messages