eigenvalues

eigenvalues - Messaggi

#1 Pubblicato: 13/02/2011 17:19:41
maegrad

maegrad

0 apprezzamenti in 4 post.

Gruppo: User

Is there a default function to solve eigenvalues? Or do I need to write a program to solve for eigenvalues?
#2 Pubblicato: 13/02/2011 17:51:03
Radovan Omorjan

Radovan Omorjan

325 apprezzamenti e 1 disapprezzamenti in 2.052 post.

Gruppo: Moderator

Hello,
Wrote

Is there a default function to solve eigenvalues? Or do I need to write a program to solve for eigenvalues?


There is no a default function for eigenvalues (I think).
Just try this:
[MATH=eng]A←mat(1,2,2,1,3,2,3,1,4,1,7,2,7,1,2,-3,4,4)[/MATH]
[MATH=eng]solve(det(A-identity(rows(A))*λ)≡0,λ)=mat(-4.19,-0.61,1.81,9.99,4,1)[/MATH]
Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#3 Pubblicato: 14/02/2011 16:51:34
maegrad

maegrad

0 apprezzamenti in 4 post.

Gruppo: User

That will work for me, thanks.
#4 Pubblicato: 15/02/2011 13:33:48
maegrad

maegrad

0 apprezzamenti in 4 post.

Gruppo: User


I am new to Smath from Mathcad, so this might be obvious but I am running into issues solving for eigenvalues that way. While it work for the matrix you provided, when I switch to something different I get a "no real roots" error. But if I expand it out and solve the quadratic equation in Smath, it gives me the correct values. Can you think of why I might be getting this error?

For example, try A=(49 20;60 100) and you will get the "no real roots" error, yet while using Smath to solve symbolically and then using the quadratic equation will give 117.51 & 31.49.
#5 Pubblicato: 15/02/2011 14:41:03
Radovan Omorjan

Radovan Omorjan

325 apprezzamenti e 1 disapprezzamenti in 2.052 post.

Gruppo: Moderator

Hello,

See this link https://smath.com/wiki/solve.ashx on the Wiki please.

Your problem could be solved with solve(4) with four arguments.
[MATH=eng]A←mat(49,20,60,100,2,2)[/MATH]
[MATH=eng]solve(det(A-identity(2)*λ),λ,0,150)=mat(31.49,117.51,2,1)[/MATH]

Pay attention that solve can fail, especially when the range is rather large (eigenvalues quite distinct). It is based on a numerical searching procedure within a given range.

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#6 Pubblicato: 15/02/2011 16:20:24
maegrad

maegrad

0 apprezzamenti in 4 post.

Gruppo: User


That method will be too specific for what I am trying to solve. I found a eigenvalue program in "Introduction to the use of SMath Studio", Prepared by Gilberto E. Urroz, May 2010 Appendix 7 that works great for what I am trying to do. Thanks again for the help.
#7 Pubblicato: 05/10/2013 04:53:07
mb10

mb10

9 apprezzamenti in 20 post.

Gruppo: User

Wrote


That method will be too specific for what I am trying to solve. I found a eigenvalue program in "Introduction to the use of SMath Studio", Prepared by Gilberto E. Urroz, May 2010 Appendix 7 that works great for what I am trying to do. Thanks again for the help.


I converted the program into a function (see attachment) and it works fine for me. However eigenvectors calculation fails for 2x2 matrices, an error "Array dimensions do not match" being reported.
Did anybody experience the same problem?

mb
eigenAll.sm (22,33 KiB) scaricato 1876 volta(e).
#8 Pubblicato: 05/10/2013 19:28:52
Martin Kraska

Martin Kraska

1.361 apprezzamenti in 2.275 post.

Gruppo: Moderator

I tried to reproduce the results using Maxima. The eigenvectors of the 3x3 example are different from your result. For debugging the function, inspection of the non-simplified result might help.
Section matrix operations.sm (100,83 KiB) scaricato 1765 volta(e).
Technische Mechanik mit SMath Studio: https://link.springer.com/book/10.1007/978-3-658-50592-9
1 utenti hanno apprezzato questo post
ioan92 06/10/2013 03:48:00
#9 Pubblicato: 06/10/2013 03:11:35
mb10

mb10

9 apprezzamenti in 20 post.

Gruppo: User

Wrote

I tried to reproduce the results using Maxima. The eigenvectors of the 3x3 example are different from your result.


You're right: it's confirmed with MathCad. Silly me not having checked before.

Wrote

For debugging the function, inspection of the non-simplified result might help.


Good to know, thanks!

In conclusion the program, in its current implementation, is not recommended for eigenvectors computations.
  • Nuovi post
  • Nessun nuovo post