Maximize $\prod_{k=1}^m x_i^{n_i} $ subject to $c =\sum_{k=1}^m a_ix_i $ This is another one
of my attempts
to generalize 
a frequently asked
type of question.
Two of these questions are
Inequality based on AM/GM Inequality
and
If $a+b+c=3$, find the greatest value of $a^2b^3c^2$.
Here is my generalization:
Maximize
$\prod_{k=1}^m x_i^{n_i}
$
subject to
$c
=\sum_{k=1}^m a_ix_i
$
with
$c > 0, a_i > 0, n_i \in \mathbb{N}
$.
I will post my answer in two days
if no one has answered it.
 A: Let $N = \sum n_i$ (omitting the indices of sums and products as they are obvious).  It is enough to consider $x_i > 0$, and then instead of $P = \prod x_i^{n_i}$ , we may instead maximize the log of:
$$P \times \prod \left(\frac{a_i}{n_i}\right)^{n_i} = \prod\left(\frac{a_i}{n_i}x_i\right)^{n_i}$$
Now Jensen's inequality with the concave function $t \mapsto \log t$ immediately gives:
$$\sum n_i\log\left(\frac{a_i}{n_i} x_i\right) \leqslant N\log\left(\frac{\sum a_i x_i}N \right) = N\log\left(\frac{c}N \right)$$
Thus we get
$$P \times \prod \left(\frac{a_i}{n_i}\right)^{n_i} \leqslant \left(\frac{c}N \right)^N \implies P \leqslant  \left(\frac{c}N \right)^N \prod \left(\frac{n_i}{a_i}\right)^{n_i}$$
with maximum when Jensen's inequality attains equality, i.e. when all $\dfrac{a_i x_i}{n_i}$ are equal.

It may be noted $n_i $ being positive reals is sufficient, need not be integers for this to work. Weighted AM-GM should also give the result for real $n_i > 0$, with careful choice of weights.
