5
$\begingroup$

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 Simplifying 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

$\endgroup$
9
  • $\begingroup$ With version 11.0.1, Simplify[y^100] yields 1. $\endgroup$
    – bbgodfrey
    Dec 2, 2016 at 1:49
  • 2
    $\begingroup$ Put a 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$
    – wxffles
    Dec 2, 2016 at 2:02
  • $\begingroup$ @bbgodfrey Same here. However Simplify[y^100] does not. $\endgroup$
    – A.G.
    Dec 2, 2016 at 2:06
  • $\begingroup$ @wxffles Thanks for your comment. In the present case the appearent simplicity of $y$ may be misleading. Do you suggest applying Simplify or FullSimplify on a systematic basis, even before testing something like $y^{2000}==1$ ? $\endgroup$
    – A.G.
    Dec 2, 2016 at 2:10
  • $\begingroup$ @wxffles FullSimplify[y^2000] does not give 1 for me. $\endgroup$
    – bbgodfrey
    Dec 2, 2016 at 2:21

1 Answer 1

4
$\begingroup$

I think the easiest way to proceed is:

{a, b} = x /. Solve[x + 1/x == (1 + Sqrt[5])/2, x];
s = ArcTan[FullSimplify[#2/#1 & @@ ReIm[a]]]
t = ArcTan[FullSimplify[#2/#1 & @@ ReIm[b]]]

Now s and t are: $-\pi/5$ and $\pi/5$ respectively and $x=e^{\pm i \pi/5}$, hence $x^{2000}=x^{-2000}=1$ and the RHS follows.

Or perhaps even simpler by noting: for $|z|=1$, $(z+1/z)/2=\cos(z)$:

z = FullSimplify[ArcCos[(1 + Sqrt[5])/4]]

yields the $z=\pi/5$ with same implication.

$\endgroup$
1
  • $\begingroup$ Thanks! Another useful step is ToPolarCoordinates@ReIm[{a, b}] // FullSimplify $\endgroup$
    – A.G.
    Dec 2, 2016 at 19:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.