# Difference between maximize $\sum\limits_{k=1}^Kg_k(\mathbf{x})$ and $\sum\limits_{k=1}^{K}\log(1+g_k(\mathbf{x}))$ in convex optimization

I have a problem of the following form:

maximize $\;\;\;\,\sum\limits_{k=1}^Kg_k(\mathbf{x})$

subject to: $\;\,\,f_i(\mathbf{x})\leq\,1\,\forall\,i\in\{1, 2, \dotsc, m\}$ $\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad(P_1)$

$\quad\quad\quad\quad\quad\mathbf{x}\in\mathbb{R}^n$

where $g_k, f_i\;\forall\;i, k$ are (let say) convex functions.

I want to know is there a difference between $(P_1)$ and $(P_2)$ where $(P_2)$ is defined as follows:

maximize $\;\;\;\,\sum\limits_{k=1}^{K}\log(1+g_k(\mathbf{x}))$

subject to: $\;\,\,f_i(\mathbf{x})\leq\,1\,\forall\,i\in\{1, 2, \dotsc, m\}$ $\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad(P_2)$

$\quad\quad\quad\quad\quad\mathbf{x}\in\mathbb{R}^n$

-
Note: if $g_k$ is convex, this is not a convex optimization problem. When maximizing, you need a concave objective. – Michael Grant Mar 15 '14 at 14:14

Yes, those are two different problems, which very likely two different optimal points $x$.
Your post title is deceiving, really: you're not asking about the difference between $f(x)$ and $g(f(x))$, the scalar case. In that case, there would be no difference. The sum changes things.
If the expressions $g_k(x)$ are all positive (all $\geq -1$, actually), then the objective in your second problem $P_2$ is actually equivalent to this objective: $$\prod_{k=1}^n 1 + g_k(x)\tag{P_3}$$ which is, in turn, equivalent to this objective: $$\left(\prod_{k=1}^n 1 + g_k(x)\right)^{1/n}\tag{P_4}$$ If the functions $g_k$ are concave, then this last objective $P_4$ is also concave, as is your original objectives $P_1$ and $P_2$. As I noted in my comment above, if your intention is for this to be a convex optimization problem, then you must have a concave objective, due to the maximization.