Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Generalised Eigenvalue Problem in Mathematica

  1. Sep 11, 2011 #1

    Hootenanny

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    I have a generalised eigenvalue problem of the form

    [tex]A\boldsymbol{u} = \lambda B\boldsymbol{u}\;,[/tex]

    where A and B are symmetric matrices with real symbolic entries. I'm trying to compute the eigenvalues with Mathematica using the command

    Code (Text):
    Eigenvalues[{A,B}]
    which according to the documentation should work. However, when I do, Mathematica returns the following error

    Code (Text):
    Eigenvalues::exnum: Eigenvalues has received a matrix with non-numerical or exact elements.
    The documentation is of no help. Does anyone have any suggestions?
     
  2. jcsd
  3. Sep 11, 2011 #2
    This
    Eigenvalues[{{{1, 2}, {4, 3}}, {{5, 6}, {4, 3}}}]
    fails.

    This
    Eigenvalues[{{{1, 2}, {4, 3}}, {{5, 6}, {4, 3.}}}]
    succeeds. Note that lone ".' means that at least one machine precision value shows up in every calculation and thus not all items are exact.

    Is it possible that all the entries you have are exact integers or rationals or complex?

    Toss in a few decimal points or add 0. to few entries and see if your error message disappears.
     
  4. Sep 11, 2011 #3
    Since you want to do the calculation with symbolic entries, try

    Code (Text):
    Eigenvalues[Inverse[ B].A]
    It's a little bit slower for real, nonexact matrices - but it will work for matrices with symbolic entries.

    Of course, it might be better if you calculate the adjugate instead of the inverse (dividing by the determinant is unnecessary).

    Or even just calculate the characteristic polynomial det(A - x B)=0 and solve for x.

    I'm not sure why the generalized eigenvector command in Mathematica only works for non-exact (complex) numbers. http://en.wikipedia.org/wiki/Eigendecomposition_of_a_matrix#Generalized_eigenvalue_problem". You'd think that this would at least get a mention in the "Possible Issues" section...
     
    Last edited by a moderator: Apr 26, 2017
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Generalised Eigenvalue Problem in Mathematica
  1. Mathematica problems (Replies: 2)

  2. Mathematica Problem (Replies: 3)

  3. Mathematica problem (Replies: 4)

  4. Mathematica problem (Replies: 2)

Loading...