<s>[INST] Using Method of Undetermined coefficients to find maximum value Find the maximum value of ($1$+$x$)$^5$($1$$-$$x$)($1$$-$$2$$x$)$^2$ given that $1/2$$<$$x$$<$$1$.
The solution states the follows 

Consider the maximum value of 
  ($A$($1$$+$$x$))$^5$ $*$ ($B$($1$$-$$x$)) $*$ ($C$($2$$x$$-$$1$)$^2$), where $A$, $B$, $C$ are positive integers satisfying $5$$A$$-$$B$$+$$4$$C$$=$$0$, where 
  ($A$($1$$+$$x$))$^5$$=$ ($B$($1$$-$$x$))$=$($C$($2$$x$$-$$1$)$^2$)----------(1)
This then implies that [$B-A$]$/$[$B+A$]$=$[$B+C$]/[$2C+B$], so plugging in $B=5A+4C$ we would have $2(5A-2C)(A+C)=0$-------------(2)
Let ($A,B,C$)=($2,30,5$), from AM-GM inequality we get ($2$($1$$+$$x$))$^5$ $*$ ($30$($1$$-$$x$)) $*$ ($5$($2$$x$$-$$1$)$^2$)$<$ $(15/4)^8$---------------(3)
where the ineqaulity is achieved when $x=7/8$. As a result, the maximum value is $3^7*5^5/$$2$^$22$.

Could someone explain the steps (1), (2), (3) in detail? 
I'm not particularly familiar with the method of undetermined coefficients.
 [/INST] Since ${\large{\frac{1}{2}}} < x < 1$, it follows that $1+x,\;1-x,\;2x-1$ are positive.

Let $A,B,C$ be fixed positive real numbers, not yet selected.

Applying $\text{AM-GM}$, to $5$ copies of $A(1+x)$, $1$ copy of $B(1-x)$, and $2$ copies of $C(2x-1)$, yields
$$\left(\frac{\;5\bigl(A(1+x)\bigr)+B(1-x)+2\bigl(C(2x-1)\bigr)\!\!}{8}\right)^{\!8}\ge \bigl(A(1+x)\bigr)^5\bigl(B(1-x)\bigr)\bigl(C(2x-1)\bigr)^2\tag{*}$$
with equality if and only if
$$A(1+x)=B(1-x)=C(2x-1)$$
or equivalently (by eliminating $x$ from the above equations), if and only if
$$\frac{B-A}{B+A}=\frac{B+C}{B+2C}\tag{eq1}$$
The idea is to choose $A,B,C$ so that the $\text{LHS}$ of $(\text{*})$ is independent of $x$ (i.e., constant, once $A,B,C$ are selected).

Noting that 
$$5A(1+x)+B(1-x)+2C(2x-1)=(5A-B+4C)x + (5A-B+2C)$$
in order to force the $\text{LHS}$ of $(\text{*})$ to be independent of $x$, we'll select $A,B,C$ so that $5A-B+4C=0$, or equivalently, $B=5A+4C$.

Replacing $B$ by $5A+4C$ in $(\text{eq}1)$, we get
\begin{align*}
&\frac{2(A+C)}{3A+2C}=\frac{5(A+C)}{5A+6C}\\[4pt]
\iff\;&\frac{2}{3A+2C}=\frac{5}{5A+6C}\\[4pt]
\iff\;&C=\frac{5A}{2}\\[4pt]
\end{align*}
Hence, by choosing $A=2$, we get $C=5$, and $B=30$.

With these choices, $(\text{*})$ reduces to
\begin{align*}
\left(\frac{\;5\bigl(2(1+x)\bigr)+30(1-x)+2\bigl(5(2x-1)\bigr)\!\!}{8}\right)^{\!8}&\ge \bigl(2(1+x)\bigr)^5\bigl(30(1-x)\bigr)\bigl(5(2x-1)\bigr)^2\\[4pt]
\implies\;\bigl((2^5)(30)(5^2)\bigr)(1+x)^5(1-x)(1-2x)^2&\le \left({\small{\frac{30}{8}}}\right)^8\\[4pt]
\implies\;(1+x)^5(1-x)(1-2x)^2&\le \frac{(3^5)(5^5)}{2^{22}}\\[4pt]
\end{align*}
with equality if and only if 
$$2(1+x)=30(1-x)=5(2x-1)$$
or equivalently, if and only if $x={\large{\frac{7}{8}}}$.
</s>