Find the maximum value of $8\cdot27^{\log_6 x}+27\cdot8^{\log_6 x}-x^3$ 
Find the maximum value of $$8\cdot27^{\log_6 x}+27\cdot8^{\log_6 x}-x^3.$$

If I apply AM${}\ge{}$GM, then I can find the minimum value of this expression, but not sure how to find the max value.
 A: Hint:
$\log_6x=y,x=6^y$
$$8\cdot 27^y+27\cdot8^y-(6^y)^3=216(3^{3(y-1)}+2^{3(y-1)}-3^{3(y-1)}2^{3(y-1)}-1)+216$$
$$=216-216(3^{3(y-1)}-1)(2^{3(y-1)}-1)$$
A: prove that $$8\cdot 27^{\log_{6}{x}}+27\cdot 8^{\log_{6}{x}}-x^3\le 216$$ and the equal sign holds for $x=6$
A: For $x=6$ we get a value $216$.
We'll prove that it's a maximal value.
Indeed, we need to prove that
$$x^3+216\geq8\cdot27^{\log_6x}+27\cdot8^{\log_6x}$$ or
$$\left(6^{\log_6x}\right)^3+216\geq8\cdot27^{\log_6x}+27\cdot8^{\log_6x}$$ or
$$27^{\log_6x}\cdot8^{\log_6x}-8\cdot27^{\log_6x}-27\cdot8^{\log_6x}+216\geq0$$ or
$$\left(27^{\log_6x}-27\right)\left(8^{\log_6x}-8\right)\geq0,$$ which is obvious for $x\geq6$ and for $0<x\leq6.$
A: $$y=8\cdot 27^{\log_6{x}}+27\cdot 8^{\log_6{x}}-x^3\Rightarrow \max(y)=8\cdot 27^{\log_6{\max(x)}}+27\cdot 8^{\log_6{\max(x)}}-\max(x)^3\Rightarrow \frac{d}{dx}\bigg[8\cdot 27^{\log_6{x}}+27\cdot 8^{\log_6{x}}-x^3\bigg]=\frac{27\cdot 8^{\frac{\ln(x)}{\ln(6)}}\ln(8)+8\cdot 27^{\frac{\ln(x)}{\ln(6)}}\ln(27)}{x\ln(6)}=0\Rightarrow \max(x)=6\Rightarrow \max(y)=216$$
