Discussion:
[fricas-devel] eigenvalues
Riccardo GUIDA
2018-07-27 14:21:53 UTC
Permalink
Hi

does anybody know how to compute the eigenvalues of

(1) -> m:= matrix [[%p, %i *%e],[-%i*%e,%pi^2]]

┌ %p %i %e┐
(1) │ │
│ 2 │
└- %i %e %pi ┘

with one of friCAS eigenvalues function?

Thanks in advance, Riccardo
--
You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fricas-devel+***@googlegroups.com.
To post to this group, send email to fricas-***@googlegroups.com.
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.
Prof. Dr. Johannes Grabmeier privat
2018-07-27 14:34:22 UTC
Permalink
I think you have to do "by hand":  I assume the first %p ist meant to be
%pi as well:



(5) -> m:= matrix [[%pi, %i *%e],[-%i*%e,%pi^2]]

        +  %pi    %i %e+
   (5)  |              |
        |            2 |
        +- %i %e  %pi  +
                                                          Type:
Matrix(Expression(Complex(Integer)))


(6) -> cP := characteristicPolynomial(m,x)

            2    2         2              3
   (6)  - %e  + x  + (- %pi  - %pi)x + %pi
                                                                  Type:
Expression(Complex(Integer))

(7) -> solve(cP, x)

   (7)
         +----------------------------+
         |    2      4        3      2       2
        \|4 %e  + %pi  - 2 %pi  + %pi   + %pi  + %pi
   [x = --------------------------------------------,
                              2
           +----------------------------+
           |    2      4        3      2       2
        - \|4 %e  + %pi  - 2 %pi  + %pi   + %pi  + %pi
    x = ----------------------------------------------]
                               2
                                                  Type:
List(Equation(Expression(Complex(Integer))))
Post by Riccardo GUIDA
Hi
does anybody know how to compute the eigenvalues of
(1) -> m:= matrix [[%p, %i *%e],[-%i*%e,%pi^2]]
        ┌  %p     %i %e┐
   (1)  │              │
        │            2 │
        └- %i %e  %pi  ┘
with one of friCAS eigenvalues function?
Thanks in advance, Riccardo
--
Mit freundlichen Grüßen

Johannes Grabmeier

Prof. Dr. Johannes Grabmeier
Köckstraße 1, D-94469 Deggendorf
Tel. +49-(0)-991-2979584, Tel. +49-(0)-151-681-70756
Tel. +49-(0)-991-3615-141 (d), Fax: +49-(0)-32224-192688
--
You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fricas-devel+***@googlegroups.com.
To post to this group, send email to fricas-***@googlegroups.com.
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit
Waldek Hebisch
2018-07-27 15:12:46 UTC
Permalink
Post by Riccardo GUIDA
does anybody know how to compute the eigenvalues of
(1) -> m:= matrix [[%p, %i *%e],[-%i*%e,%pi^2]]
â %p %i %eâ
(1) â â
â 2 â
â - %i %e %pi â
with one of friCAS eigenvalues function?
Well, exposed functions expect polynomial or rational entries.
You can cheat

(3) -> eigenvalues(map(numer, m))

2 2 2 2
(3) [%C | %C + (- %pi - %p)%C - %e + %p %pi ]
Type: List(Union(Fraction(Polynomial(SparseMultivariatePolynomial(Complex(Integer),Kernel(Expression(Complex(Integer)))))),SuchThat(Symbol,Polynomial(SparseMultivariatePolynomial(Complex(Integer),Kernel(Expression(Complex(Integer))))))))

or use unexposed one:

(4) -> eigenvalues(m)$InnerEigenPackage(Expression(Complex(Integer)))

2 2 2 2
(4) [? + (- %pi - %p)? - %e + %p %pi ]
Type: List(Union(Expression(Complex(Integer)),SparseUnivariatePolynomial(Expression(Complex(Integer)))))

Or, follow Johannes advice.
--
Waldek Hebisch
--
You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fricas-devel+***@googlegroups.com.
To post to this group, send email to fricas-***@googlegroups.com.
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.
Riccardo GUIDA
2018-07-27 15:53:05 UTC
Permalink
I see, thanks both of you!

@Waldek

What's wrong in trying to "honestly" convert eg Expression(Integer) to a Polynomial(Expression(Integer)) or a Fraction (Polynomial(Expression(Integer)))?


1) -> Expression(Integer) has Ring

(1) true
Type: Boolean
(2) -> Expression(Integer) has Field

(2) true
Type: Boolean
(3) -> Expression(Integer) has PolynomialFactorizationExplicit

(3) true
Type: Boolean
(4) -> exi:=%pi+%e^2

2
(4) %e + %pi
Type: Expression(Integer)

(5) -> exi::Polynomial(Expression(Integer))

Polynomial(Expression(Integer)) is not a valid type.

(5) ->
--
You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fricas-devel+***@googlegroups.com.
To post to this group, send email to fricas-***@googlegroups.com.
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.
Loading...