Quadratic equation with different indices My maths teacher gave me a worksheet to work through as I was getting slightly bored in lessons. However, there was one question which I cannot do. The worksheet gives the answer, but you are supposed to show how you did it. Here is the question:  
$729 + 3^{2x+1} = 4\times3^{x+2}$
The sheet said that the answer was $x=2$ or $x=3$
Here is my working - I 'solved' by completing the square, as you will see:
\begin{align}
 3^{2x+1}-4\times3^{x+2}+729& = 0 \\
 3(3^{2x})-4\times(3^2)(3^x)+729& = 0\\ 
 3(3^x)^2-36(3^x)+729& = 0\\ 
 y  &= 3^x\\
 3y^2-36y+729 & = 0\\
 3(y^2-12y+243) &= 0\\
 (y-6)^2-36+243 &= 0\\
 (y-6)^2+207 &= 0\\
 (y-6)^2&=-207\\
 y-6 &= \sqrt{207}i\\
 y &= 6+\sqrt{207}i\\
 3^x &= 6+\sqrt{207}i\\
 x &= \log_3(6+\sqrt{207}i)\\
\end{align} 
Clearly, this is not the answer as stated on the sheet. Have I answered this question wrong, or is the answer on the sheet wrong? Thank you in advance.

Hint:
This seems to be a problem in arithmetic. Note that $729=3^6$, and rewrite the equation as
$$3^{2x+1}+3^6=4\cdot 3^{x+3}.$$
Some details
If $x$ is a natural number this implies $4$ divides the left-hand side. Depending on the values of $x$, factor out $3^6$ or $3^{2x+1}$. $4$  must divide the other factor. Now


*

*if $2x+1>6$, we factor out $3^6$, obtaining
$$3^6(3^{2x-5}+1)=4\cdot 3^{x+3},$$
so necessarily $\;x+3=6$ and $3^{2x-5}+1=4\iff 2x-5=1$. The first equality yields $\color{red}{x=3}$ and so does the second.

*if $2x+1<6$, factoring out  $3^{2x+1}$, we get
$$3^{2x+1}(3^{5-2x}+1)=4\cdot 3^{x+3},$$
so $\,2x+1=x+3\,$ and $\,5-2x=1$. Both equations yield $\,\color{red}{x=2}$.

