Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Problems with NSolve

  • To: mathgroup at smc.vnet.net
  • Subject: [mg88214] Re: Problems with NSolve
  • From: "Kshitij Wagh" <kgwagh at gmail.com>
  • Date: Mon, 28 Apr 2008 04:41:01 -0400 (EDT)
  • References: <fuumfl$8dr$1@smc.vnet.net> <48131E36.1090106@gmail.com>

Hi
Sorry for the "fuzziness" :)
chpoly was found by using  Det[A  - x*IdentityMatrix[dim]] (where A is a
matrix function of u with \alpha etc. being some random parameters).  \Alpha
etc are random real numbers between -1 and 1 with working precision 30. Also
please find attached a notebook of a working sample.

[contact the sender to get this attachment - moderator]

So I think  the problem seems here, that instead of getting polynomials, I
am getting rational functions.  The thread Carl sent mentions some
alternatives - I will try them out.
Thanks,
Kshitij

On Sat, Apr 26, 2008 at 8:21 AM, Jean-Marc Gulliet <
jeanmarc.gulliet at gmail.com> wrote:

> kgwagh at gmail.com wrote:
>
>> Hi all
>>
>> I am trying to find the number of eigenvalue crossings for a matrix as
>> a function of the parameter 'u', on which the elements of the
>> (symmetric) matrix depend on linearly. The matrix elements also
>> involve randomly chosen constants. The plan is to find the
>> distribution of the crossings of these type of matrices as I scan over
>> the random numbers.
>>
>> So far I have been using the following :
>>
>> NSolve[{chpoly[u, dim, \[Alpha], \[Gamma], \[Epsilon], x] == 0,
>>  D[chpoly[u, dim, \[Alpha], \[Gamma], \[Epsilon], x], x] == 0}, {x,
>>  u}, WorkingPrecision -> prec]
>>
>> where chpoly is the characteristic polynomial of the matrix (with the
>> eigenvalue variable being x) and \alpha, \gamma and \epsilon are
>> constant parameter arrays of random numbers. For a double (or higher)
>> degeneracy of the eigenvalues both the characteristic equation and its
>> derivative should be zero. This approach has worked successfully only
>> upto 12*12 matrices (where one such computation takes 40 secs on my
>> laptop). For 13*13 my laptop takes 4000 sec. This seems to be somewhat
>> surprising, because these polynomials are of the order 'n'  (where n
>> is dimension of the matrix) in both u and x - and  n=13 does not sound
>> very computationally unreasonable.  So I was wondering if there was a
>> faster approach I could take.
>>
>> Also, the problem essentially entails me to know the number (not the
>> values) of the real solutions to this system of polynomials.
>> CountRoots seemed ideal but it does not work for more than one
>> equation. So is there any alternative along this route?
>>
>> Any other alternatives are also welcome.
>> Thanks,
>> Kshitij.
>>
>>
> Could you post, please, a *fully working* example of what you are doing? It
> is really hard to optimize fuzzy functions (fuzzy not as in fuzzy logic but
> as in fuzzy definitions or concepts :-)
>
> Regards,
> -- Jean-Marc
>
>


  • Prev by Date: Re: FEM contourplotter - conversion completed
  • Next by Date: Re: Change integral variables
  • Previous by thread: Re: Problems with NSolve
  • Next by thread: Re: Re: Problems with NSolve