Solve for $x$ where $x$ is a real number: $(x^2-3x+1)^{x+1} = 1$ This question was from a past paper of a highschool senior math competition:


Solve for $x$ where $x$ is a real number: 
$$ (x^2-3x+1)^{x+1} = 1$$



I've gone through multiple ways of attempting to solve it for example taking logs on both sides and manipulating and that got me no where.
I am really stuck on this...could someone please help :)
My working as shown after the hints in comments:
$$ (x^2-3x+1)^{x+1} = 1$$
$$ \leftrightarrow (x+1)\ln(x^2-3x+1) = ln(1)$$
$$ \leftrightarrow (x+1)\ln(x^2-3x+1) =0$$
$$ \leftrightarrow (x+1)=0 , \ln(x^2-3x+1) = 0 $$
Case 1 :$$ x=-1 $$
Case 2 $$\ln(x^2-3x+1) = 0$$
$$ x^2 - 3x + 1 = e^0 $$
$$ x^2 - 3x = 0 $$
$$ x(x-3) = 0 $$
$$ x = 3,0 $$
So $ x=-1,3,0$ but I am missing 1?
 A: *

*$x^2-3x+1=1$ 

*$x+1=0 \cap x^2-3x+1\ne 0$

*$x^2-3x+1=-1 \cap x+1$ is an even integer.
The solutions of the equation $A(x)^{B(x)}=1$ come from 


*

*$A(x)=1$ independently of $B(x)$

*$B(x)=0$ and $A(x) \ne 0$

*$A(x)=-1$ for some $x$ and for the same $x$, $B(x)=$ an even integer.
A: HINT:
$a^b=1 \iff [a=1] \vee [a=-1 \wedge b\equiv0\pmod2] \vee [a\neq0 \wedge b=0]$
A: There is a problem of definitions. In many textbooks, the exponentiation $x^y$ is defined by
$$
x^y=\exp(y\log x)
$$
(natural logarithm and exponential), so only in the case $x>0$.
Such a definition can be extended to the case where $x=0$ and $y>0$, by declaring that $0^y=0$ when $y>0$. It can also be extended to the case where $x<0$ and $y$ is a rational number that can be represented in the form $y=p/q$, with $p$ and $q$ integers and $q>0$ is odd.
Without specifying the definition of the general exponential that's used, the problem is ill-posed.
Your solution is good if you use the common (not extended) definition of the first paragraph. The solution $x=-1$ only appears if the extended definition is used (so it depends on what textbook one refers to).
The question would have no ambiguity if $x$ is specified to be integer, because $x^y$ is defined for any pair of integers, except when $x=0$ and $y<0$ (some also exclude the case $x=y=0$).

Why don't textbooks agree on the extended definition? The main problem is that the function in the extended domain doesn't have pleasant properties such as
$$
x^{y+z}=x^y\cdot x^z,
\quad
(x^y)^z=x^{yz}
$$
so it is pretty useless. Just think to
$$
((-1)^{\frac{2}{1}})^{\frac{1}{2}}=1^{\frac{1}{2}}=1
$$
whereas
$$
(-1)^{\frac{2}{1}\cdot\frac{1}{2}}=(-1)^1=-1
$$
Also, the domain of the function $x\mapsto(-1)^x$ is very wild in the negative part of the $x$-axis.
A: This partial answer is in response to the OP's continued need:
At the most basic level, if you raise $-1$ to the second power, you get 
$$(-1)^2=(-1)(-1)=1$$
By properties then of exponents, raising $-1$ to any even power yields a result of 1 as
$$(-1)^{2k}=[(-1)^2]^k=1^k=1$$
Thus, let $x^2-3x+1=-1$.  Then 
$$x^2-3x+2=(x-2)(x-1)=0$$
resulting in possible solutions of $1$ and $2$.  But, your exponent is $x+1$ and this needs to be even to satisfy the relation above.  Plugging in $x=2$ yields
$$(-1)^3\neq1$$
But pluggin in $x=1$ yields
$$(-1)^2=1$$
which is true.  Thus, $x=1$ is also a solution.
