Maximizing a weighted sum of logarithms I'm trying to show that for:
$$p^* \equiv \max_{x} \sum^{k=n}_{k=1} a_k \ln x_k
$$
Where:
$
x \in \mathbb{R}^n \\
x \geq 0 \\
\sum_{k=1}^{k=n} x_k=c \\
c > 0 \\
\forall a_k, a_k > 0 \\
a \equiv \sum_{k=1}^{k=n} a_k
$
That:
$$
p^* = a\ln{\frac{c}{a}}+\sum^{k=n}_{k=1} a_k \ln a_k
$$
I'm really not certain where even to begin with this derivation.
 A: With the Lagrange multiplier method you want to maximize $p(x)=\sum a_k ln(x_k) +\lambda (c-\sum x_k)$.
Differentiating w.r.t. the $x$'s and setting equal to zero gives $\frac{a_k}{x_k}=\lambda$.
Imposing the constraint $c=\sum x_k=\frac{\sum a_k}{\lambda}=\frac{a}{\lambda}$. It follows that $\lambda=a/c$.
So $x_k=\frac{a_k }{ \lambda}=\frac{c a_k}{a}$.
So $p^*=\sum a_k ln(x_k)=\sum a_k ln(\frac{c a_k}{a})=\sum a_k (ln(\frac{c}{a}) + ln(a_k))=aln(\frac{c}{a})+\sum a_k ln(a_k)$
A: I shall come back with a Lagrangian approach tomorrow.  However, I now present a solution using the Weighted AM-GM Inequality.  
We have that
$$\sum_{k=1}^n\,\frac{a_k}{a}\,\left(\frac{a\,x_k}{a_k}\right)=\sum_{k=1}^n\,x_k=c\,,$$
with 
$$\sum_{k=1}^n\,\frac{a_i}{a}=\frac{\sum\limits_{k=1}^n\,a_k}{a}=\frac{a}{a}=1\,.$$
By the Weighted AM-GM Inequality, we have
$$c=\sum_{k=1}^n\,\frac{a_k}{a}\,\left(\frac{a\,x_k}{a_k}\right)\geq \prod_{k=1}^n\,\left(\frac{a\,x_k}{a_k}\right)^{\frac{a_k}{a}}\,.$$
Take logarithm on both sides of the inequality above, we get
$$\ln(c)\geq \sum_{k=1}^n\,\frac{a_k}{a}\,\ln\left(\frac{a\,x_k}{a_k}\right)=\frac{1}{a}\,\sum_{k=1}^n\,\Big(a_k\,\ln\left(x_k\right)-a_k\,\ln\left(a_k\right)+a_k\,\ln(a)\Big)\,.$$
Ergo,
$$\sum_{k=1}^n\,a_k\,\ln\left(x_k\right)\leq a\,\ln(c)-\left(\sum_{k=1}^n\,a_k\right)\,\ln(a)+\sum_{k=1}^n\,a_k\,\ln\left(a_k\right)=a\,\ln\left(\frac{c}{a}\right)+\sum_{k=1}^n\,a_k\,\ln\left(a_k\right)\,.$$
Note that inequality above becomes an equality if and only if $$\frac{x_1}{a_1}=\frac{x_2}{a_2}=\ldots=\frac{x_n}{a_n}=\frac{c}{a}\,,$$
or equivalently,
$$\left(x_1,x_2,\ldots,x_n\right)=\left(\frac{c\,a_1}{a},\frac{c\,a_2}{a},\ldots,\frac{c\,a_n}{a}\right)\,.$$
This shows that $$p^*= a\,\ln\left(\frac{c}{a}\right)+\sum_{k=1}^n\,a_k\,\ln\left(a_k\right)\,.$$ 
