Find maximum of $f(x)=\frac{x^m(1-x)^n}{x(1-x)} $ on $0< x< 1$ I would appreciate if somebody could help me with the following problem:
Q: Find maximum $f(x)$ on $0< x< 1$  ($n,m \in \mathbb{N}$)
$$f(x)=\frac{x^m(1-x)^n}{x(1-x)} $$
I try 
$$f'(x)=(m-1) x^{m-2} (1-x)^{n-1}-(n-1) x^{m-1} (1-x)^{n-2}$$
...
 A: If $m=n=1$, then $f(x)=1$ is a constant function. Thus suppose $m>1$ or $n>1$.
Factoring $f'(x)$,
\begin{align}
f'(x)&=x^{m-2}(1-x)^{n-2}((m-1)(1-x)-(n-1)x)\\
&=x^{m-2}(1-x)^{n-2}((m-1)-(m+n-2)x)
\end{align}
and so $x=\frac{m-1}{m+n-2}$ satisfies $f'(x)=0$. Is $\frac{m-1}{m+n-2}$ between $0$ and $1$? If $m>1$ and $n=1$, then it is $1$ and not in $(0,1)$. If $m=1$ and $n>1$, then it is $0$ and not in $(0,1)$. In fact, $f(x)=(1-x)^{n-1}$ and $f(x)=x^{m-1}$ do not have the maximum in $(0,1)$. However, if $n\ge 2$ and $m\ge 2$, $0<\frac{m-1}{m+n-2}<1$, so $f(x)$ has a extreme value at $x=\frac{m-1}{m+n-2}$, and there exists a maximum value $f(\frac{m-1}{m+n-2})$.
$$
\therefore(\text{maximum of $f(x)$})=\begin{cases}
1,&\text{if }m=1\text{ and } n=1\\
\text{doesn't exist},&\text{if only one of $m$ and $n$ is $1$}\\
\left(\frac{m-1}{m+n-2}\right)^{m-1}\left(\frac{n-1}{m+n-2}\right)^{n-1},&\text{if }m\ge 2\text{ and }n\ge 2\\
\end{cases}
$$
A: Put $$f'(x)=0$$
$$(m-1) x^{m-2} (1-x)^{n-1}-(n-1) x^{m-1} (1-x)^{n-2}=0$$
$$(m-1)(1-x)=(n-1)x$$
$$m-mx-1+x=nx-x$$
$$m-1=(m+n-2)x$$
If $m+n\ne2$,
$$x=\frac{m-1}{m+n-2}$$
$m-1\lt m+n-2$, so this value of $x$ lies in its domain.
After cancelling out factors, at $x=0$ and $x=1$ (where the original function is not defined), the function $x^{m-1}(1-x)^{n-1}$ becomes $0$. Moreover, at $x=\frac{m-1}{m+n-2}$, the value of the function is positive. Thus, by the first derivative test, it is a point of maximum.
$m+n=2$ can happen only if $m=n=1$. Then, $f(x)=1$ and there is no point of maximum in the domain.
