Prime resets when finding eigenvalues
02-01-2015, 09:17 PM (This post was last modified: 02-01-2015 09:18 PM by eleal.)
Post: #1
 eleal Junior Member Posts: 4 Joined: Nov 2014
Prime resets when finding eigenvalues
Hello all,

I've been having problems trying to calculate the eigenvalues of some matrices with my HP Prime. I perform the following two calculations in Home:

1) When I try to find the eigenvalues of the 3x3 matrix
[0, 1, 0;
1, 0, 1;
0, 1,0]

I get the output : "EIGENVAL(...) Error: Bad Argument Value"

2) When I try to find the eigenvalues of the 5x5 matrix
[0,1,0,0,0;
1,0,1,0,0;
0,1,0,1,0;
0,0,1,0,1;
0,0,0,1,0]

the HP prime resets (it displays the x^2 +y^2=1 image).

I tried running the 5x5 matrix in the virtual calculator and runs fine, but
running the 3x3 matrix in the virtual calculator outputs the same

In case this helps, my HP prime is:
Software Version: 2014 12 3 (6975)
Hardware Version: A

What could be the problem when trying to calculate these eigenvalues?

Eleazar
02-01-2015, 09:38 PM (This post was last modified: 02-01-2015 09:44 PM by Mark Hardman.)
Post: #2
 Mark Hardman Senior Member Posts: 525 Joined: Dec 2013
RE: Prime resets when finding eigenvalues
(02-01-2015 09:17 PM)eleal Wrote:  What could be the problem when trying to calculate these eigenvalues?

Eleazar

Using the CAS command "eigenvals" I immediately get results of:

[0,√(2),-√(2)]

and

[0,√(3),1,-1,-√(3)]

In home mode using EIGENVAL, I get the same approximate results for the 5x5 matrix:

[−1.7320,1.7320,2.7042ᴇ−16,1,−1]

However, the 3x3 matrix results in "Error: Bad argument value".

Ceci n'est pas une signature.
02-01-2015, 09:45 PM (This post was last modified: 02-01-2015 10:21 PM by unigraph.)
Post: #3
 unigraph Junior Member Posts: 4 Joined: Oct 2014
RE: Prime resets when finding eigenvalues
Hi!
In this case problem is not in dimension of square matrix or calculator than in elements of matrix. Matrix 3x3 that you have mentioned is singular and it doesn't have eigenvalues (actually it has one and it is equal 0), matrix 5x5 that you have mentioned isn't singular and it has eigenvalues.
Try for example [[1,1,0],[1,1,1],[0,1,0]] and it will return eigenvalues.

Cheers,
Frane.
02-01-2015, 10:07 PM (This post was last modified: 02-01-2015 10:10 PM by Snorre.)
Post: #4
 Snorre Member Posts: 101 Joined: Dec 2013
RE: Prime resets when finding eigenvalues
Hello,

I get the same results as Marc in home (sw 6975, hw A, too).
But what really makes me wonder, is why I get every time I evaluate it a slightly different result:

Does EIGENVAL contain any nondeterministic component?
02-01-2015, 10:10 PM
Post: #5
 Mark Hardman Senior Member Posts: 525 Joined: Dec 2013
RE: Prime resets when finding eigenvalues
(02-01-2015 09:45 PM)unigraph Wrote:  Hi!
In this case problem is not in dimension of square matrix or calculator than in elements of matrix. Matrix 3x3 that you have mentioned is singular and it doesn't have eigenvalues (actually it has one and it is equal 0), matrix 5x5 that you have mentioned isn't singular and it has eigenvalues.
Try for example [[1,1,0],[1,1,1],[0,1,0]] and it will return eigenvalues.

Cheers,
Frane.

Xcas (see above) and WolframAlpha seem to disagree with your claim:

eigenvalues{{0, 1, 0},{1, 0, 1},{0, 1,0}}

Ceci n'est pas une signature.
02-01-2015, 10:21 PM (This post was last modified: 02-01-2015 10:29 PM by Mark Hardman.)
Post: #6
 Mark Hardman Senior Member Posts: 525 Joined: Dec 2013
RE: Prime resets when finding eigenvalues
(02-01-2015 10:07 PM)Snorre Wrote:  Hello,

Does EIGENVAL contain any nondeterministic component?

Perhaps Home mode is using a Monte Carlo method to converge on a solution:

http://mpra.ub.uni-muenchen.de/15362/

It would appear that using 'eigenvals' in CAS mode is preferable to 'EIGENVAL' in Home mode.

Ceci n'est pas une signature.
02-01-2015, 10:37 PM
Post: #7
 eleal Junior Member Posts: 4 Joined: Nov 2014
RE: Prime resets when finding eigenvalues
I tried again the EIGENVAL command on the 5x5 case in Home and CAS and now the calculator doesn't reset. I don't know what happened that seems to have solved this issue that occurred every time I ran the EIGENVAL on that 5x5 matrix.

I also re-tried the EIGENVAL in HOME on that 3x3 matrix and I still get the "Error: Bad argument value" message just like Mark.
02-01-2015, 10:47 PM
Post: #8
 Snorre Member Posts: 101 Joined: Dec 2013
RE: Prime resets when finding eigenvalues
(02-01-2015 10:21 PM)Mark Hardman Wrote:  [...]
Perhaps Home mode is using a Monte Carlo method to converge on a solution:
[...]

Thank you very much for the link. Didn't even suspect this problem could be tackled that way. What an enlightning experience this forum is...
02-02-2015, 12:59 PM
Post: #9
 parisse Senior Member Posts: 1,313 Joined: Dec 2013
RE: Prime resets when finding eigenvalues
I can't reproduce a crash.
a:=[[0,1,0,0,0],[1,0,1,0,0],[0,1,0,1,0],[0,0,1,0,1],[0,0,0,1,0]];
EIGENVAL(a) returns 5 eigenvalues.
There is normally no random involved in computing eigenvalues, except for some inputs (of measure 0). The numeric eigenvalues are computed by doing a Schur factorization using Francis algorithm.
eigenvals(a) return the exact eigenvalues.
02-02-2015, 08:59 PM (This post was last modified: 02-02-2015 09:12 PM by retoa.)
Post: #10
 retoa Member Posts: 168 Joined: Jan 2015
RE: Prime resets when finding eigenvalues
I tried EIGENVAL in both home and CAS on the 5x5 matrix.
I never had a crash. Every time I got a different answer, but these are the same 5 values in different order. The only one that changes is about 1e-17, practically always zero, so actually it does not change.
Same behaviour on real Prime and on emulator.

Here you see a copy of the display in CAS mode (set to scientific 3 so that you can see all 5 values).

Attached File(s) Thumbnail(s)

07-01-2015, 02:31 PM
Post: #11
 Marcelo Vanti Junior Member Posts: 38 Joined: Jan 2014
RE: Prime resets when finding eigenvalues
I did the steps outlined above under review 8151. When I tried to calculate the eigenvalues ​​of the 5X5 matrix in home mode , the calculator crashed. So I calculated again in the CAS , and the calculator answered as expected. After I returned to the home mode, and the calculator continued calculating correctly.
I powered off and on again, and the calculator did keep the normal functionning . However after a reboot ( On + Symb) , the calculator crashed again .
Now, it resets every time, giving the correct answer after reboot.

Marcelo
 « Next Oldest | Next Newest »

User(s) browsing this thread: 1 Guest(s)