While playing with this mathematics.stackexchange.com problem I ran into an intriguing behavior. The problem is about proving that $$ x+ \frac1x=\frac{1+\sqrt5}2\Rightarrow x^{2000}+ \frac1{x^{2000}}=2. $$ The equation on the left admits $$ y=\frac{1}{4} \left(1+\sqrt{5}+i \sqrt{10-2 \sqrt{5}}\right) $$ as a solution. A critical argument in solving the linked problem is the fact that $$ y^5=-1\text{ and therefore }y^{2000}=(-1)^{400}=1. $$ Now, asking Mathematica about all this yields
sol = Solve[x + 1/x == 1/2 (Sqrt[5] + 1), x];
y = x /. sol[[1]]
Simplify[y]
1/4 (1 + Sqrt[5] - I Sqrt[16 - (-1 - Sqrt[5])^2])
1/4 (1 + Sqrt[5] - I Sqrt[10 - 2 Sqrt[5]])
So far, so good, although I wonder why I need to invoque Simplify
. However, computing $y^5$ requires Simplify
ing in order to obtain $-1$:
y^5
Simplify[y^5]
(1 + Sqrt[5] + I Sqrt[10 - 2 Sqrt[5]])^5/1024
-1
and $y^{2000}$ is even more problematic
y^2000
Simplify[y^2000]
Simplify[y^5]^400
(1 + Sqrt[5] + I Sqrt[10 - 2 Sqrt[5]])^2000/1318(...)76
(1 + Sqrt[5] + I Sqrt[10 - 2 Sqrt[5]])^2000/1318(...)76
1
Moreover, just asking
y^2000 == Simplify[y^5]^400
does not return an answer, just
(1 + Sqrt[5] + I Sqrt[10 - 2 Sqrt[5]])^2000/1318(...)76==1
Note that it does not appear to be related to the fact that $2000$ is large, replacing it by $20$ shows the same pattern.
My question is: what is going on? Why do I have to force simplify a complex number in order to get the correct result?
For the sake of conveinience here is my entire code:
sol = Solve[x + 1/x == 1/2 (Sqrt[5] + 1), x];
y = x /. sol[[1]]
Simplify[y]
"Testing y^5"
y^5
Simplify[y^5]
"Testing y^2000"
y^2000
Simplify[y^2000]
Simplify[y^5]^400
y^2000 == Simplify[y^5]^400
ps. I am running 11.0.1.0
Simplify[y^100]
yields1
. $\endgroup$FullSimplify
on your initial definition of y, and it's all clean and obvious. In general Mathematica does the least amount of work to get you your answer on time. Simplification can be a hard task which takes a very long time. It is left to the operator to choose whether or not to do this extra work. $\endgroup$Simplify[y^100]
does not. $\endgroup$Simplify
orFullSimplify
on a systematic basis, even before testing something like $y^{2000}==1$ ? $\endgroup$FullSimplify[y^2000]
does not give 1 for me. $\endgroup$