Find all real solutions of $6^x+1=8^x-27^{x-1}$

As you did, let $a=2^x, b=3^x$. We have $$ab+1=a^3-\frac{b^3}{27}$$

Note the standard identity $$u^3+v^3+w^3-3uvw=(u+v+w)\left(\frac{(u-v)^2+(v-w)^2+(w-u)^2}{2}\right)$$

Take $u=a, v=-\frac{b}{3}, w=-1$. Then $u^3+v^3+w^3-3uvw=a^3-\frac{b^3}{27}-1-ab=0$.

Thus $u+v+w=0$ or $(u-v)^2+(v-w)^2+(w-u)^2=0$. In the latter case, we get $u=v=w$ so $a=-\frac{b}{3}=-1$, so $a=-1, b=3$. But clearly $2^x=a \not =-1$, a contradiction.

Thus $u+v+w=0$.

Thus $a-\frac{b}{3}-1=0$, i.e. $2^x=3^{x-1}+1$.

Write $x=y+1$, and rewrite as $1^y+3^y=2^y+2^y$. Finally use the theorem I prove here. (Quoted below)

Theorem: Let $a, b, c, d$ be real numbers such that $0<a<b \leq c<d$. Then the equation $$a^x+d^x=b^x+c^x$$ has

  • Exactly two solutions, $x=0$ and $x=t>0$ for some $t$, if $ad-bc<0$
  • Exactly two solutions, $x=0$ and $x=t<0$ for some $t$, if $ad-bc>0$
  • Exactly one solution, $x=0$, if $ad-bc=0$

with $(a, b, c, d)=(1, 2, 2, 3)$, $ad-bc=-1<0$, and $y$ in place of $x$.

Thus there are exactly two solutions for $y$, given by $y=0$ and $y=t>0$, some $t$. By inspection, $y=1$ is a solution. Thus all real solutions for $y$ are $y=0, 1$.

Thus all real solutions for $x$ are $x=1, 2$.


If you make a plot of the function $f(x) = 27^{x-1} - 8^x + 6^x + 1$, you will notice it has two trivial roots at $x = 1$ and $2$. This sort of function is called Dirichlet polynomial. In 1883, Laguerre has proved a theorem:

Generalized Descartes' rule of signs

Given a Dirichlet polynomial $P(x) = \sum\limits_{j=1}^n a_j b_j^x$ where $a_j, b_j \in \mathbb{R}$ satisfies: $$ a_1, a_2, \ldots, a_n \ne 0,\quad\text{ and }\quad b_1 > b_2 > \cdots > b_n > 0$$ If $N$ is the number of sign changes in the coefficients $a_j$, then the number of real roots of $P(x)$ is bounded by $N$.

Since our Dirichlet polynomial $f(x)$ has two sign changes, the two roots $1$ and $2$ are all the real roots it has.

Notes

For more info, you can either look up the original paper (in French)

  • E Laguerre, Sur la théorie des équations numériques, J. Math. Pures et Appl. 9 (1883)

or a modern introduction of same subject

  • G.J.O Jameson, Counting zeros of generalized polynomials: Descartes' rule of signs and Laguerre's extensions, (Math. Gazette 90, no. 518 (2006), 223-234).
    An online copy can be found here.

The equation $27ab+27=27a^3-b^3$ you have found may be written as $$27a^3-27ab-27-b^3=0,$$ which may be viewed as a cubic in $b$. Its discriminant is $$\Delta_b(a)=-4\cdot(-1)\cdot(-27a)^3-27\cdot(-1)^2=-(a^3+1)^2,$$ which is negative for all $a$ except for $a=-1$, when it is zero. This does not correspond to a real value of $x$, hence for all possible values of $a$ there is a unique real $b$ satisfying the polynomial, which is $$b=3(a-1).$$ By definition we have $b=3^{\log_2a}$. So it remains to solve $3^{\log_2a}=3(a-1)$. By inspection we find the solutions $a=2$ and $a=4$ corresponding to $x=1$ and $x=2$. These are the only solutions, because such an exponential function intersects any line in at most two points.