# How to show that product over sum function is log concave?

In one of the problem (3.49(c)) of Convex Optimization book (By Boyd and Vandenberghe) it is asked to show that product over sum function $$g(x)=\frac{\prod_{i=1}^nx_i}{\sum_{i=1}^nx_i}$$ is log concave. Now $f(x)=\log(g(x))$ is given as follows $$f(x)=\sum_{i=1}^n\log(x_i)-\log(\sum_{i=1}^nx_i).$$ Now if $g(x)$ is log concave then $f(x+tv)$ should be concave for all values of $t$ which means that the double derivative of $f(x+tv)$ with respect to $t$ should be negative for all values of $t$. The double derivative of $f(x+tv)$ with respect to $t$ is given as follows $$f''(x+tv)=-\sum_{i=1}^n\frac{v_i^2}{(x_i+tv_i)^2}+\frac{(\sum_{i=1}^nv_i)^2}{(\sum_{i=1}^nx_i+t\sum_{i=1}^nv_i)^2}.$$ After this the solution manual proves that $f''(x+tv)<0$ for $t=0$. I do not know why they only check for $t=0$ case and ignore all the other values of $t$. Please help me in understanding this part. Thanks in advance.

• Every term in that sum is a square of a number and is therefore positive... – player100 Sep 19 '18 at 1:10
• @player100 please elaborate. The first term is negative and the second term is positive so how can it be always positive or negative? – Frank Moses Sep 19 '18 at 1:18
• Sister question – Rodrigo de Azevedo Apr 9 at 11:35

At any given point $x$, they are taking an aribitrary $1$-dimensional slice of the domain through $x$: the line of points of the form $x + tv$, where $t$ ranges over $\mathbb{R}$. They then show that the second derivative is negative, at that point, along any arbitrary line. They have to let $t$ range freely initially, so that the function is defined along the line, at least in a neighbourhood of $x$, so that differentiation is meaningful.
They don't have to show it for other values of $t$, because they've already shown this for arbitrary $x$. If you want to know whether this holds true for $x + t_0 v$, for some fixed $t_0 \in \mathbb{R} \setminus \lbrace 0 \rbrace$, then simply redefine $x_0 = x + t_0 v$, consider the function $t \mapsto f(x_0 + tv)$, and do all the above steps, including considering where $t = 0$.
What this means is that every $1$-dimensional slice of the function is log-concave. Since concavity is defined along line segments, this means the entire function is log-concave.
• Thank you so much for your answer. It makes much sense to me. But does this means that we can always put $t=0$ for checking concavity/convexity of any other general function? – Frank Moses Sep 19 '18 at 1:20
• Well, as I said at the end of the first paragraph, we need to let $t$ range over $\mathbb{R}$ in order to take a one-dimensional slice of the function. We need an actual function of $t$ to differentiate, which means it has to be defined at more than just $t = 0$. Once we've gotten our derivatives, then we can always discard the other values, and just consider $t = 0$. – Theo Bendit Sep 19 '18 at 1:24