# Prove this function is convex using direct proof.

I have been stuck on trying to prove this without using proof by contradiction. Prove $$g''(x)>0$$ if $$g(x) = xf(x), 1>x>0, f(x)>0, f'(x)>0,$$ $$\lim_{x \to 0} f'(x) =c>0$$, and $$f''(X)$$ exists. I have tried proving it by showing the elasticity of $$g$$ with respect to $$x$$ is greater than 1, i.e. $$\frac{d \ln g}{d \ln x} >1$$, but I'm not sure this result guarantees $$g''(x)>0$$.

Proof by contradiction: Suppose $$x \in [0,1]$$ and $$f: [0,1] \rightarrow (0,\infty)$$ where $$f \in C^2$$ and $$f'(x) >0.$$ Define a function $$g$$ such that $$g(x) = xf(x)$$.

Suppose $$g''(x)<0$$ and define a function $$h(x) = x^2f'(x).$$ It follows $$h'(x) = xg''(x)<0.$$ Then for $$t<1,$$ we have $$h(t)>h(1)$$, which can also be written as $$tf'(t)>\frac{f'(1)}{t}.$$ Thus $$f(1) - f(x) = \int_x^1 f'(t)dt \geq \int_x^1 t f'(t)dt > \int_x^1 \frac{f'(1)}{t}dt= - f'(1) \ln x.$$

The above statement can be written as $$f(x) < f(1) + f'(x) \ln x,$$ which implies $$\lim_{x \rightarrow 0} f(x) = -\infty,$$ which contradicts the assumption that $$f(x)>0$$ for all $$x \in [0,1].$$

You can't, because it isn't.

We have \begin{align*} g'(x) &= xf'(x) + f(x) \\ g''(x) &= xf''(x)+f'(x)+f'(x) = xf''(x)+2f'(x). \end{align*}

Now, let

$$f(x) := -\frac{c}{3}x^3+cx+d.$$

For $$d$$ sufficiently large, we have $$f(x)>0$$ for $$0. We have

$$f'(x) = -cx^2+c,$$

so $$f'(x)>0$$ and $$\lim_{x\to 0}=c$$. Next,

$$f''(x) = -2cx.$$

Thus,

$$g''(x) = xf''(x)+2f'(x) = -2cx^2-2cx^2+2c = -4cx^2+2c,$$

which is negative for $$x\to 1$$.

The key thing you need to look at is your equation

$$g''(x) = xf''(x)+2f'(x).$$

Thus, to control $$g''$$, you need to control both $$f'$$ and $$f''$$ across the entire interval $$0. Controlling $$f'$$ on the entire interval but $$f''$$ only pointwise (as in a limit for $$f''(x)$$ as $$x\to 0$$) is not enough. (If you add another condition on $$\lim_{x\to 1} f''(x)$$, I am confident we can create another counterexample that fails somewhere else on the interval.) Derivatives of well-behaved functions can behave quite badly indeed.

Where does your proposed proof break down? You switch quantifiers in the middle without noticing. Your function $$h$$ indeed satisfies $$h'(x)<0$$, but not for all $$x$$, but only for some $$x$$ near $$1$$. Therefore, your integral inequality

$$\int_x^1tf'(t)\,dt \geq\int_x^1\frac{f'(1)}{t}\,dt$$

does not necessarily hold.

Bottom line: explicitly write out quantifiers and make sure your deductions hold for the quantifiers you actually have.

The following is my original answer to the question pre-edit, where the condition $$\lim_{x\to 0}f'(x)=c>0$$ was not yet imposed.

You can't, because it isn't.

Now, let $$f(x) := -x-\frac{1}{x}+c,$$ which is positive for $$0 if $$c$$ is large enough. We have \begin{align*} f'(x) = & -1+\frac{1}{x^2} \\ f''(x) = &-\frac{2}{x^3}, \end{align*} so $$f'(x)>0$$ for $$0, and $$f''(x)$$ exists, but $$g''(x) = xf''(x)+2f'(x) = -\frac{2}{x^2}-2+\frac{2}{x^2} = -2 <0.$$

Your proposed proof (without the condition added later) breaks down at the very end, where you write that

$$f(x) < f(1) + f'(x) \ln x,$$ which implies $$\lim_{x \rightarrow 0} f(x) = -\infty$$

This implication does not hold unless you can bound the behavior of $$f'(x)$$ as $$x\to 0$$. If you can't, $$f'(x) \ln x$$ can go elsewhere than to $$-\infty$$ as $$x\to 0$$. For instance, if $$f'(x)=x$$, then $$\lim_{x\to 0}x\ln x=0$$ by L'Hôpital's rule.

• Great work. Thanks! Can you please help me see why this proof by contradiction is wrong then? Please see the original question. – dlnB May 11 at 19:29
• I'll happily take a look (promising nothing) if you could include a link to the original question. – Stephan Kolassa May 11 at 19:30
• No problem, I edited with a new proposal. – Stephan Kolassa May 11 at 20:06
• If $\lim_{x\to 0} f'(x)=c>0$ then yes, it looks good (from my cursory look). – Stephan Kolassa May 11 at 20:13
• I edited the answer to address this. In general, I would appreciate it if you didn't change the question substantially after it has been answered, because that invalidates answers. (Edits for clarity are fine.) Much better to ask a new question and link the two. – Stephan Kolassa May 20 at 7:47