Find value of $x$ for which $x^p(1-x)^q$ has a maximum value? The function $f$ is defined by $f(x)=x^p(1-x)^q$ for all $x \in \mathbb{R}$,where $p,q$ are positive integers has a maximum value at what value of $x$?
 A: The other answers posted are great. You can also simplify the algebra a little using logarithms. The logic is that if $f(x)$ continuous and has an extrumum, then $\ln f(x)$ will at the same point because $\ln x$ is a monatonically increasing function. 
$$\begin{align} \ln f(x) & = p \ln x + q\ln(1 - x) \\
\frac{\operatorname{d} \ln f(x)}{\operatorname{d} x} & = \frac{p}{x} - \frac{q}{1-x} \Rightarrow \\
x &= \frac{p}{q+p} \\
\frac{\operatorname{d}^2 \ln f(x)}{\operatorname{d} x^2} & = -\frac{p}{x^2} - \frac{q}{(1-x)^2}.
\end{align}$$ That second derivative is, clearly, less than zero everywhere, so the critical point at $x=\frac{p}{p+q}$ is a maximum.
A: You're searching for a maximum, hence the procedure is:


*

*First derivative

*Impose it equal to zero, solve it and find the critical points

*Second derivative and check.
Let's see.
$$f(x) = x^p(1-x)^q$$
$$f'(x) = px^{p-1}(1-x)^q + qx^p(1-x)^{q-1}(-1) = \frac{px^p(1-x)^q}{x} - \frac{qx^p(1-x)^{q}}{(1-x)} = \frac{(1-x)px^p(1-x)^q - xqx^p(1-x)^{q}}{x(1-x)}$$
Namely
$$f'(x) = \frac{px^p(1-x)^{q+1} - qx^{p+1}(1-x)^q}{x(1-x)}$$
Then
$$f'(x) = 0 ~~~~~ \to ~~~~~ px^p(1-x)^{q+1} = qx^{p+1}(1-x)^q$$
Namely if (remembering that $x\neq0$, $x\neq 1$):
$$p(1-x) = qx$$
$$p - px - qx = 0$$
Hence
$$x = \frac{p}{p+q}$$
That is your critical point $x_0$.
Now to see if it's a max or a min, you shall evaluate the second derivative, and evaluate it at $x_0$, and:
$$f''(x_0) > 0 ~~~~~ \text{it's a min}$$
$$f''(x_0) < 0 ~~~~~ \text{it's a max}$$
Clearly, since $p, q$ are generic but positive, you might get various results. (?)
The second derivative is:
$$f''(x) = (p-1) p x^{p-2} (1-x)^q-2 p q x^{p-1} (1-x)^{q-1}+(q-1) q x^p (1-x)^{q-2}$$
And
$$f''(x_0) = (p-1) p \left(1-\frac{p}{p+q}\right)^q \left(\frac{p}{p+q}\right)^{p-2}-2 p q \left(1-\frac{p}{p+q}\right)^{q-1} \left(\frac{p}{p+q}\right)^{p-1}+(q-1) q \left(1-\frac{p}{p+q}\right)^{q-2} \left(\frac{p}{p+q}\right)^p$$
Since the quantity $\frac{p}{p+q}$ is positive by definition, we can basically ignore those terms, remaining with a quantity that will be negative, hence the point $x_0 = \frac{p}{p+q}$ we found is a local maximum
A: Solution: Let $$f(x)=x^p(1-x)^q$$ then $$f^{'}(x)=px^{p-1}(1-x)^q-q(1-x)^{q-1}x^p$$ Setting the derivative equal to $0$ we get :$$px^{p-1}(1-x)^q=q(1-x)^{q-1}x^p$$ $$\Rightarrow p(1-x)=qx \Rightarrow x=p/(p+q)$$ Notice that $$f^{'}(x)=f(x)\left(\frac{p}{x}-\frac{q}{1-x}\right)\Rightarrow f^{''}(x)=f^{'}(x)\left(\frac{p}{x}-\frac{q}{1-x}\right)+f(x)\left(\frac{-p}{x^2}-\frac{q}{(1-x)^2}\right)$$ Now $$f^{'}(p/(p+q))=0$$ So, $$f^{''}(p/(p+q)=0-f(p/(p+q)) \left(\frac{(p+q)^2}{p}+\frac{(p+q)^2}{q}\right)<0$$ Thus for $x=p/(p+q)$, $f(x)$ is maximum. 
A: The derivative is
$$
f'(x)=px^{p-1}(1-x)^q-qx^p(x-1)^{q-1}=x^{p-1}(1-x)^{q-1}(p-(p+q)x)
$$
The derivative can only vanish at $0$, $1$ and $p/(p+q)$ (not at $0$ if $p=1$, not at $1$ if $q=1$).
Since the function is positive on $(0,1)$ and vanishes at $0$ and $1$, neither $0$ and $1$ can be points of local maximum. So the only local maximum is at $p/(p+q)$.
This is an absolute maximum when both $p$ and $q$ are odd.
