# Determine all real x in x^n+x^(-n)

#### lfdahl

##### Well-known member
Determine all real $x$ such that

$$x^n+x^{-n}$$

is an integer for any integer $n$

Source: Nordic Math. Contest

#### Monoxdifly

##### Well-known member
–1, 0, and 1, because for any other whole numbers, $$\displaystyle x^{–n}$$ will become fraction while for fractions, $$\displaystyle x^n$$ will stay fraction.

##### Well-known member
–1, 0, and 1, because for any other whole numbers, $$\displaystyle x^{–n}$$ will become fraction while for fractions, $$\displaystyle x^n$$ will stay fraction.

zero is not valid. so x = -1 or 1

#### lfdahl

##### Well-known member
–1, 0, and 1, because for any other whole numbers, $$\displaystyle x^{–n}$$ will become fraction while for fractions, $$\displaystyle x^n$$ will stay fraction.
Hi, Monoxdifly

Your conclusion is wrong. Try e.g. the value: $x = 2 + \sqrt{3}$. (and $x=0$ is not valid as pointed out by kaliprasad )

#### Opalg

##### MHB Oldtimer
Staff member
Determine all real $x$ such that

$$x^n+x^{-n}$$

is an integer for any integer $n$

Source: Nordic Math. Contest
If $x+x^{-1} = k$ (where $k$ is an integer) then $x^2+x^{-2} = (x+x^{-1})^2 - 2 = k^2-2$, which is also an integer. Similarly, $x^3+x^{-3} = (x+x^{-1})^3 - 3(x+x^{-1})$ is also an integer, and, by an induction argument using the binomial theorem, $x^n+x^{-n}$ is an integer for all integers $n$.

So it is sufficient to find all $x$ such that $x+x^{-1} = k$. But that is a quadratic equation with solutions $x = \frac12\bigl(k \pm\sqrt{k^2-4}\bigr)$. Those solutions are real for all integers $k$ apart from $k = 0$ or $\pm1$.

Thus the general solution is $x = \frac12\bigl(k \pm\sqrt{k^2-4}\bigr)$ ($k\in\Bbb{Z},\ |k|\geqslant2$).

#### lfdahl

##### Well-known member
Hi, Opalg !

Thankyou for your correct answer! I guess, I could save a lot of time writing down the suggested solution, whenever one of your exemplary solutions appears on the screen! 