Post Reply 
Short & Sweet Math Challenge #21: Powers that be
11-08-2016, 06:52 PM
Post: #19
RE: Short & Sweet Math Challenge #21: Powers that be
(11-08-2016 02:03 PM)J-F Garnier Wrote:  
(11-08-2016 01:38 PM)Paul Dale Wrote:  If there is one real root > 1 and all of the remaining (possibly complex) roots have |root| < 1, then the polynomial is of the required form.
It may be the element I was missing, but can you explain or justify this statement?
J-F

The following is a test for 4-th order polynomials, using Pauli's and Mike's conditions. I have assumed the solutions given by PROOT are ordered by magnitude, but I am not sure about that. But this implementation is probably wrong since it gives only two solutions (three when the program is modified for 3-rd order polynomials).

Hopefully no typing errors since the EMU71 version I have doesn't work on Windows 10 64-bit and I don't know how to copy and paste the listing in DosBox.

------------------
3 DESTROY ALL
5 INTEGER A,B,C,D,E,N,T
7 A=1 @ E=-1
10 OPTION BASE 1
15 INTEGER P(5)
20 COMPLEX R(4)
25 FOR B=-1 TO 1
30 FOR C=-1 TO 1
35 FOR D=-1 TO 1
40 P(1)=A @ P(2)=B @ P(3)=C @ P(4)=D @ P(5)=E
45 MAT R=PROOT(P)
50 IF IMPT(R(4))=0 THEN GOSUB 1000
55 NEXT D
60 NEXT C
70 NEXT B
75 END
1000 IF REPT(R(4))>1 THEN GOSUB 2000
1005 RETURN
2000 T=0
2005 FOR N=1 TO 3
2010 IF ABS(R(N))<1 THEN T=T+1
2015 NEXT N
2020 IF T=3 THEN PRINT REPT(R(4));A;B;C;D;E
2025 RETURN

>RUN

1.92756197548 1 -1 -1 -1 -1
1.3802775691 1 -1 0 0 -1
--------------

3-rd order polynomial solutions:

1.83928675521 1 -1 -1 -1
1.46557123188 1 -1 0 -1
1.32471795721 1 0 -1 -1

-------------
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Short & Sweet Math Challenge #21: Powers that be - Gerson W. Barbosa - 11-08-2016 06:52 PM



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