       Re: Eigenvalue Problem

• To: mathgroup at smc.vnet.net
• Subject: [mg16908] Re: [mg16894] Eigenvalue Problem
• From: Andrzej Kozlowski <andrzej at tuins.ac.jp>
• Date: Tue, 6 Apr 1999 01:27:34 -0400
• Sender: owner-wri-mathgroup at wolfram.com

```There is really no error here and probably no way to radically change the
way Mathematica behaves. In your case Mathematica  gives solutions which
look like complex expressions, but actually they will always give real
values when real numbers are substituted for a, b and c (actually this is
only true up to very tiny imaginary quantities, which appear in numerical
computations and which can be got rid of using the Chop command.). To see
this try evaluating the expression

In:=
m =     {{10 a, 0, b, 0, 0, 0},
{0, -2 a, 0, c, 0, 0},
{b, 0, -8 a, 0,c, 0},
{0, c, 0, -8 a, 0,b},
{0, 0, c, 0, -2 a, 0},
{0, 0, 0,b, 0, 10 a}};

In:=
Eigenvalues[m]/.{a->Random[],b->Random[],c->Random[]}//Chop
Out=
{3.96643,3.96643,-3.21306,-3.21306,-0.753374,-0.753374}

You will always get real eigenvalues however many times you evaluate
this. However, I think it is, in general, impossible  in cases such as
yours  to make sure one obtains  expressions not containing complex
numbers. The reason is that in order to find the eigenvalues Mathematica
has to solve the algebraic equation CharacteristicPolynomial[m]==0. To do
this it uses general algorithms for solving polynomial equations which
(in the cases in which roots can be expressed by radicals) usually give
answers involving complex numbers. Even telling Mathematica that a,b, and
c are real, by using ComplexExpand for example,  won't help much. In
simple cases Mathematica can tell that a general expression which "looks"
complex is actually real. For example if
In:=
v=I*Sqrt[-a^2]

Then
In:=
ComplexExpand[v]
Out=
2
-Sqrt[a ]

However, consider a somewhat more complicated example
In:=
w=I*Sqrt[2a-2-a^2]
Out=
2
I Sqrt[-2 + 2 a - a ]

In:=
ComplexExpand[w]
Out=
2 2 1/4     1                 2
I ((-2 + 2 a - a ) )    Cos[- Arg[-2 + 2 a - a ]] -
2
2 2 1/4     1                 2
((-2 + 2 a - a ) )    Sin[- Arg[-2 + 2 a - a ]]
2
The point is that Mathematica does not notice that -2+2a-a^2 is always
negative for all real a, so it does not give you the answer: -Sqrt[a^2-2a
+2].  There is no way, as far as I can tell, to tell Mathematica to do
this. This sort of problems (and similar ones) will quite often come up
when Mathematica is solving algebraic equations and I do not think that
at present there is any general  way to deal with them.

On Mon, Apr 5, 1999, Peter Haesser <phuesser at bluewin.ch> wrote:

>Hello everybody
>
>I am trying to solve the eigenvalue problem for the following matrix:
>
>m =     {{10 A, 0, B, 0, 0, 0},
>          {0, -2 A, 0, C, 0, 0},
>          {B, 0, -8 A, 0, C, 0},
>          {0, C, 0, -8 A, 0, B},
>          {0, 0, C, 0, -2 A, 0},
>          {0, 0, 0, B, 0, 10 A}}
>
>which is symmetric. Now mathematica returns some complex eigenvalues
>which is not
>possible for a real, symmetric matrix. Can anybody help me ? Maybe the
>error occurs because
>mathematica means that the coefficients are complex but how can I make
>them real ?
>
>Thank's in advance for any help.
>
>
>    Peter Huesser
>

Andrzej Kozlowski
Toyama International University
JAPAN
http://sigma.tuins.ac.jp/
http://eri2.tuins.ac.jp/

```

• Prev by Date: Time Series/Kalman Filter
• Next by Date: Permutations & Computer capacity
• Previous by thread: Re: Eigenvalue Problem
• Next by thread: Re: Eigenvalue Problem