■正多角形の作図と原始根(その194)
3次方程式:x^3=px+qの解は
x=3√A+3√B
A=q/2+√((q/2)^2−(p/3)^3)
B=q/2−√((q/2)^2−(p/3)^3)
で与えられる.
y^3-3y+1=0,p=3,q=-1
A=-1/2+{(1/2)^2-1}^1/2
B=-1/2-{(1/2)^2-1}^1/2
A=-1/2+(i√3)/2
B=-1/2-( i√3)/2
y=3√A+3√B
===================================
カルダノの解に対してもファンデルモンド行列を用いると
w={-1+i√3}/2
w^2={-1-i√3}/2
に対して
z0=α+β
z1=wα+w^2β
z2=w^2α+wβ
z0z1z2=α^3+β^3
2cos(2π/9)=α+β
2cos(4π/9)=w^2α+wβ
2cos(6π/9)=1
2cos(8π/9)=wα+w^2β
===================================
以下に、右辺と左辺を別個に計算するプログラムと計算結果を示す。
r(cost+isint)の3乗根といっても一意には定まらず
r^1/3(cos(t+2nπ)/3+isin(t+2nπ)/3)となること
arctan(x)の組み込み関数の性質の取り扱いに注意
1.53209 3.8147E-06
1.53209 1.43051E-06
.347293 7.86781E-06
.347298 -5.24521E-06
-.999997 8.58307E-06
-1.87939 0
-1.87938 1.23978E-05
===================================
1000 PI=3.14159
1010 A=-1/2
1020 B=1/2*SQR(3)
1030 W0=0:W1=PI*2/3:W2=PI*4/3
1040 DIM W(10)
1050 '
1060 PFILE$="scrn:":'pfile$="b:12345.txt"
1070 OPEN PFILE$ FOR OUTPUT AS #1
1080 W(1)=W0:W(2)=W0:GOSUB *CALC1
1090 Y=2*COS(PI*2/9)
1100 PRINT #1,Y,Y^3-3*Y+1
1110 '
1120 W(1)=W2:W(2)=W1:GOSUB *CALC1
1130 Y=2*COS(PI*4/9)
1140 PRINT #1,Y,Y^3-3*Y+1
1150 '
1160 'W(1)=W0:W(2)=W0:GOSUB *CALC1
1170 PRINT #1," "
1180 Y=2*COS(PI*6/9)
1190 PRINT #1,Y,(Y^3-3*Y+1)*(Y+1)
1200 '
1210 W(1)=W1:W(2)=W2:GOSUB *CALC1
1220 Y=2*COS(PI*8/9)
1230 PRINT #1,Y,Y^3-3*Y+1
1240 '
1250 CLOSE #1
1260 END
1270 '
1280 *CALC1:
1290 SS=0:TT=0
1300 REA=A:IMA=B :WA= PI/3:WZ=W(1):GOSUB *CALC2
1310 REA=A:IMA=-B :WA=-PI/3:WZ=W(2):GOSUB *CALC2
1320 Y=SS
1330 PRINT #1," "
1340 PRINT #1,Y,Y^3-3*Y+1
1350 RETURN
1360 '
1370 *CALC2:
1380 ZA=SQR(REA^2+IMA^2)
1390 TANA=IMA/REA
1400 TH=ATN(TANA)
1410 'PRINT COS(TH/3+WA)*ZA^(1/3)
1420 'PRINT SIN(TH/3+WA)*ZA^(1/3)
1430 REZ=COS(TH/3+WA+WZ)*ZA^(1/3)
1440 IMZ=SIN(TH/3+WA+WZ)*ZA^(1/3)
1450 'PRINT REZ
1460 SS=SS+REZ
1470 TT=TT+IMZ
1480 RETURN
===================================