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.
 A: Here is an explanation which perhaps will help. 
So you want to find the maximum of $f(x) = (1+x)^5(1-x)(2x-1)^2$ for $\frac12< x< 1$.  
First note that we can instead find when we have the  maximum of $F(x) = A^5BC^2\cdot f(x)$ for any positive reals $A, B, C$, as this would give the same point which maximises $f(x)$. Note any monotonic transformation of $f$ would do this, here we are only multiplying by a positive constant.
Now for a product of several positive terms with a constant sum, AM-GM gives that maximum product is when all such terms are the same.  
Now we note that we may view $$F(x) = \underbrace{(A (1+x))^5}_{5 \text{ terms}} \cdot \underbrace{B(1-x)}_{1 \text{ term}} \cdot \underbrace{(C(2x-1))^2}_{2 \text{ terms}}$$ 
as a product of $8$ terms as shown above, (note the terms are positive in the interval desired).  To apply AM-GM, we need the sum of the terms to be constant, viz. the coefficient of $x$ in the sum must vanish, so
$$5A-B+4C=0 \tag{1}$$
Now we may apply AM-GM, which says the maximum is when 
$$A(1+x) = B(1-x)=C(2x-1) \tag{2}$$
Solving $(1)$ and $(2)$ still leaves a lot of possibilities, we just need to choose one solution which ensures $x \in (\frac12, 1)$.  If we choose $(A, B, C) = (2, 30, 5)$ then $x=\frac78 \in (\frac12, 1)$ satisfies, so we have a solution for the AM-GM, and the maximum of $F$ or $f$ is when $x=\frac78$.  
A: 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}}}$.
