a1=((1+sqrt(5))/2)^(1/3)
a2=(abs(1-sqrt(5))/2)^(1/3)*sign(1-sqrt(5))
a=a1+a2
x=(a^2+a+1)
p=x^4+3*x^2-9*x+1
produces what is presumably wanted:
a =
0.322185354626085
x =
1.42598875736162
p =
-1.59867276653908
alternatively the critical line could be
a2=(nthroot(1-sqrt(5))/2,3)
Without the absolute value and sign functions, or using the nthroot function, taking a negative number to the 1/3 power results in a complex cube root:
a1=((1+sqrt(5))/2)^(1/3)
a2=((1-sqrt(5))/2)^(1/3)
a=a1+a2
x=(a^2+a+1)
p=x^4+3*x^2-9*x+1
a =
1.59988481774495 + 0.737680128975117i
x =
4.615344275111 + 3.09808660637397i
p =
-686.277403993008 + 727.277075162423i
|
Posted by Charlie
on 2023-06-27 13:18:55 |