Exponential Equation with base -1, 0, and 1
You write
The solutions of x can be found by several ways
That sounds strange to me (but my English language knowledge is very limited, so maybe I am wrong). Is seems that you say one can select one of these ways to find the set of solutions. But actually one has to try all ways.
You ask
Is the exponential equation format wrong?
Exponentiation is written as $u^v$, this is exactly the way as your equation is written. So nothing is wrong with it. You should find all values of $x$ such that
$$h(x)^{f(x)}=h(x)^{g(x)} $$
if you substitute $x$ by one of these values.
What happens is that "exponential function" is a definition. You (or your book) give a name to a set of functions that uses exponentiation. If $b>0$ and $b\ne 1$ than a function $$\begin{array}\\ f: &\mathbb{R} &\to &\mathbb{R^+} \\ &x &\mapsto& b^x \end{array} $$ is called an exonential function. Note that I added the domain and the codomain to the function definition.
But not all number pairs u,v that can be exponentiated (= where $u^v$ can be calculated) are covered by "exponential functions". E.g. $(-3)^2$ is not because our definiton does not allow a negative $b$. This has practical reasons that this definiton of "exponential function" is used. Of course we could use a more comrehensive definition of "exponential function", but the functions we exclude are far less interesting nad most theorems are easier formulate if one uses the narrower definition given in the book.
A conflict may arise by the fact that there seems to be some natural definiton of "exponential function":
A function is an exponential function if its formula can be written in the form $b^x$. So maybe if we talk about the function
$$\begin{array}\\ f: &\mathbb{Z} &\to &\mathbb{R} \\ &x &\mapsto& (-2)^x \end{array} $$
we will call this an exponentiation function because its formula consists of an exponentiation. But this is a problem of language and the human mind that he will use such a word in this situation. In the sense of your book's definition this is not an exponentiation function, even if it is a function.
How can we solve the equation $$h(x)^{f(x)}=h(x)^{g(x)} \tag{1}$$ for $x \in \mathbb{R}?$
We know that if $$f(x) \ne g(x) \tag{2},$$ then $$h(x)^{f(x)} \ne h(x)^{g(x)},$$ except in the case that $x \in \{-1,0,1\}.$ Can you prove this? In the latter case it is possible that $(1)$ is true even if $(2)$ holds. These are your 4 steps. In any case you should check if an $x$ that you have found is really a solution of the equation, even in your first step. You did not mention this.
Try to solve the equation
$$(3x+1)^{4x+1}=(3x+1)^{2x-1}$$
Solving $$4x+1=2x-1 \tag{3}$$ gives $x=-\dfrac{1}{2}$, but if we substitute this in $(3)$ we get $$(-\frac{1}{2})^{-\frac{1}{2}}$$ for the LHS and the RHS of the equation and this is not defined. So $x=-\dfrac{1}{2}$ is not a solution. So you should update the step 1 of your recipe.
Let's have a look where $a^b$ is well defined in the context of real numbers:
- For $a>0$ there is no issue, $a^b$ is defined whatever $b$ is.
In this case we define $a^b=\exp(b\ln(a))$
Since $\exp$ and $\ln$ are monotonic thus injective then
$a^b=a^c\iff (b-c)\ln(a)=0\iff \quad b=c\quad$ or $\quad a=1$
When $a=1$ then $1^b=1^c=1$ for any $b,c$.
- For $a=0$ then $0^b=0$ is defined for $b>0$.
In this case $0^b=0^c$ is true whenever $b>0$ and $c>0$
- For $a<0$ then $a^b$ is defined everywhere $(-1)^b$ is defined, that is $b=\frac pq$ where $(p,q)\in\mathbb Z^2$ and $\gcd(p,q)=1$ and $q$ is odd.
The last condition seems a bit complicated, but remember that $a^{\frac 1q}$ is defined as the solution of $x^q=a$.
Since $x^2\ge 0$ then all even powers of $x$ are positive and $x^q=a$ as no solution when $q$ is even.
The other condition $\gcd(p,q)=1$ ensures not only that the rational $\frac pq$ is reduced to the standard form but also that $p$ and $q$ cannot be both even at the same time to avoid issues like $\sqrt[3]{-1}=(-1)^{\frac 13}=(-1)^{\frac 26}$ and we would be puzzled that $6$ is an even $q$...
In this case $a\neq -1$ and $a^b=a^c\iff b=c$
Finally when $a=-1$ the equation $(-1)^b=(-1)^c$ requires that both $b$ and $c$ are rational with the conditions cited above, but also that their numerator has the same parity.
To sumarize solving $$h(x)^{f(x)}=h(x)^{g(x)}$$
Let call $\mathcal Q_{odd}$ the condition:
$x\in\mathcal Q_{odd}\iff x=\frac pq$ and $(p,q)\in\mathbb Z\times \mathbb N^*$ and $\gcd(p,q)=1$ and $q$ is odd.
For $x\in\mathcal Q_{odd}$ let's call $\mathcal N(x)=p$.
We need to check the following cases:
- $h(x)=0$ and $f(x)>0$ and $g(x)>0$
- $h(x)=1$
- $h(x)>0$ and $f(x)=g(x)$
- $h(x)=-1$ and $f(x)\in\mathcal Q_{odd}$ and $g(x)\in\mathcal Q_{odd}$ and $\mathcal N(f(x)),\ \mathcal N(g(x))$ have same parity
- $h(x)<0$ and $f(x)=g(x)\in\mathcal Q_{odd}$
Note that in your solution $x=1$ belongs to bullet $\#5$ and not $\#3$ since $h(x)>0$ requires $x>3$. We can verify that exponents $f(1)=g(1)=7$ are integers (thus indeed odd denominator rationals). So $(-2)^7$ is well defined.