At what value of $x$ does the maximum of $\ln(\prod_{i=1}^{k} xe^{-xa_{i}})$ occur?
My initial calculation gave me $\sum_{i=1}^n a_i$. Can someone double check me?
At what value of $x$ does the maximum of $\ln(\prod_{i=1}^{k} xe^{-xa_{i}})$ occur?
My initial calculation gave me $\sum_{i=1}^n a_i$. Can someone double check me?
On
Remember that since $x$ does not depend on $i$, it turns out that $$\sum_{i=1}^k x= x+x+\cdots+x,$$ which is a sum with $k$ terms, all equal because inside the $\sum_{i=1}^k$ there's no $i$, which is the index that changes from term to term. That implies that $$\sum_{i=1}^k x= kx.$$
Also, arguments to guarantee that a certain point is an extremum, whether is a maximum or a minimum, if there's just one or many, are very important, so try to understand the following reasoning and ask if you have any problem.
As $$f(x)=\sum_{i=1}^k \big(\ln(x)-a_ix\big)=k\ln(x)-x\sum_{i=1}^ka_i,$$ and $f$ is defined over $(0,+\infty)$ and differentiable over it's domain (which is open, by the way), the only points where it can have an extremum are points $x^*$ such that $f'(x^*)=0$.
Now, $f'(x)=\frac k x-\sum_{i=1}^ka_i$, and this equals zero only at $$x^*=\frac k{\sum_{i=1}^ka_i},$$ that is, at one over the arithmetic mean of $a_1, \ldots, a_n$.
Also, since $f''(x)=-\frac k {x^2}$, which is negative for all $x$ in the domain, the function is concave down (sad curve) and there can only be a global maximum. Another possible explanation: since you found one extremum only, and $f''$ is negative at it, it is a local maximum, but it also has to be global, since continuity implies that for reaching a higher value at another point, there should be a local minimum between that point and the local maximum.
Hint: $$\ln(\prod_{i=1}^{k} xe^{-xa_{i}})= \sum_{i=1}^{k} \ln(x) -xa_{i}= k\ln(x) -x \sum_{i=1}^{k}a_{i}$$
This is obviouss now