HP Forums

Full Version: Prime resets when finding eigenvalues
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
"Bad argument Value" error message.

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: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".
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.
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:
[attachment=1555]
Does EIGENVAL contain any nondeterministic component?
(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}}
(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.
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: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...
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.
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).
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.
Reference URL's