       Fwd: Help with minimization of Eigenvalues

• To: mathgroup at smc.vnet.net
• Subject: [mg87801] Fwd: Help with minimization of Eigenvalues
• From: "Jean-Marc Gulliet" <jeanmarc.gulliet at gmail.com>
• Date: Thu, 17 Apr 2008 06:57:59 -0400 (EDT)
• References: <fu4ll6\$sfq\$1@smc.vnet.net> <480602EA.8010102@gmail.com>

```On Wed, Apr 16, 2008 at 5:43 PM, Dario Bressanini
<dario.bressanini at gmail.com> wrote:
>
>
>  Thank you very much for your help
>
>
>
>
> Eig[p_, q_] := Eigenvalues[N@{m, s} /. a -> p /. b -> q] // First
>  Eig[1, 2]
>
>  Yes, I have tried that before writing to the newsgroup. This seems to work,
> however when I call
>
>
>  I still get the same error
>
>
>  Eigenvalues::gfargs:
>     Generalized Eigenvalues
>       arguments accept only matrices with machine real
>        and complex elements. Moreâ?¦
>
>
>
>
> Moreover, though I am not sure to have fully understood what you tried to
> achieved, you might be interested in using the function
> CharacteristicPolynomial[] to compute the eigenvalues in a symbolic form and
> use these results to solve or minimize them.
>
>  I am trying to optimize the parameters of a matrix in order to minimize the
> second (or n-th ) eigenvalue.
>  The matrices in general are  of much higher order, say 6x6 or 10x10, and
> the eigenvalues cannot in g eneral be computed in symbolic form
> unfortunately.

Hi Dario,

The following definitions make certain that the parameters a and b are
passed systematically to both matrices m and s. Indeed, the matrices m
and s are defined as functions of a and b, and we force Mathematica to
express them in machine-size arithmetic.

Also, the function Eig[] is defined to ensure that it will be called
only if both arguments are numeric. This is required, actually, to
guarantee a correct behavior with FindNimimum[].

Clear[Eig, m, s]

m[a_, b_] := N[{{a, b}, {b, -a + 1}}]
s[a_, b_] := N[{{1, 0}, {0, 3*a}}]

Eig[(a_)?NumericQ, (b_)?NumericQ] :=
First[Eigenvalues[{m[a, b], s[a, b]}]]

Eig[1, 2]

FindMinimum[Eig[a, b], {a, 1, 2}, {b, 1, 2}]

1.75831

{0.434259, {a -> 0.434259, b -> 2.14762*10^-10}}

Hope this helps,
-- Jean-Marc

--
Jean-Marc

```

• Prev by Date: Re: mx files
• Next by Date: Re: ListPlot & lots 'o dots.
• Previous by thread: Re: Help with minimization of Eigenvalues
• Next by thread: DifferenitalD vs CapitalDifferenitalD