# Maximize the integral of $f$, knowing the integral of $\frac{1}{f}$, for a Lipschitz function $f$

This question is related to this recent other question, where two intervals $[a,b]$ and $[c,d]$ were considered. Here I ask about a simpler version with just one interval $[a,b]$.

Consider the following optimization problem : $f$ is a positive continuous function $[a,b] \to ]0,+\infty[$, satisfying the Lipschitz condition $|f(x)-f(y)| \leq L|x-y|$ for any $x,y \in [a,b]$. Given the constraint $\int_{a}^{b}\frac{dt}{f(t)}=\alpha$ (where $\alpha$ is a positive constant), the problem is then to find the maximum (or supremum) value $M$ of $\int_{a}^{b}f(t)dt$ under this constraint, and find the functions for which this maximum is attained, if any.

Although my evidence for this is still incomplete, I believe the maximum is attained when $f$ is a decreasing affine function with coefficient $-L$. In this case,

$$f(t)=L\bigg(b-t+\frac{b-a}{e^{L\alpha}-1}\bigg), \ \int_a^{b} f(t)dt= L(b-a)^2\bigg(\frac{1}{2}+\frac{1}{e^{L\alpha}-1}\bigg)$$

By the Stone-Weierstrass theorem, when looking for the maximum we may assume that $f$ is differentiable (we may even assume that $f$ is a polynomial). In this case, one may apply the methods explained in the abovementioned post : $|f'| \leq L$, so $|(f^2)'| =|2ff'| \leq 2L|f|$ and hence $f^2(x) \leq f^2(a)+2LF(x)$, where we put $F(x)=\int_a^x f(t)dt$. So $f(x)=\frac{f^2(x)}{f(x)} \leq \frac{ f^2(a)+2LF(x)}{f(x)}$. Putting $G(x)=f^2(a)+2LF(x)$, we deduce $\frac{G'(x)}{G(x)} \leq \frac{2L}{f(x)}$. integrating between $a$ and $b$, we obtain ${\sf ln}\big(\frac{G(b)}{G(a)}\big) \leq 2L\alpha$. Now $G(a)=f^2(a)$ and $G(b)=f^2(a)+2L\int_a^b f(t)dt$, so that one finally obtains

$$\int_a^b f(t)dt \leq \frac{e^{2L\alpha}-1}{2L}f^2(a)$$

Any feedback appreciated on the following questions : what is the maximum/supremum, which functions attain equality.

-
I think I have answered the question in the original question. And your last inequality will turn out to be an equality iff $f'=L$ a.e. – Yimin May 8 '12 at 4:14
@Yimin : I know about your answer to the older question. (by the way, I was surprised you didn't get any of the bounty. It appears the author of the question did not re-visit the question site, and the bounty was attributed by default). – Ewan Delanoy May 8 '12 at 6:53
@Yimin : but it's not clear to me wether that answer of yours settles my question also. To connect the two, you must set $c=a$ and $d=b$, right? Then your final inequality becomes $\alpha \leq \frac{e^{2L\beta}-1}{2L}$. This is rather different from what happens when $f'=-L$ a.e., where the exponential is in the denominator not the numerator. – Ewan Delanoy May 8 '12 at 6:54
I proved that is if the slope is $L$, then the function $\displaystyle\frac{\int_{a}^t f(s)}{\exp(2L\alpha)-1}$hold unchanged($\displaystyle\frac{f^2(a)}{2L}$), where $\displaystyle\alpha=\int_a^t\frac{1}{f}$. – Yimin May 8 '12 at 15:32
set $c=a$ and $d=b$, our ineq becomes $\alpha\le\frac{\exp(2L\alpha)-1}{2L}$, which is always true, and the equality holds iff $\alpha=0$,which is impossible, unless $a=b$.But your last inequality $\displaystyle\frac{\int_a^b f(s)}{\exp(2L\alpha)-1}\le\frac{f^2(a)}{2L}$ will hold equality when $f$ has slope $L$, and $\displaystyle\frac{\int_a^b f(s)}{\exp(2L\alpha)-1}=f^2(b)/2L$, only if $f$ has slope $-L$. – Yimin May 8 '12 at 15:35

It may be better to make the constraint linear, so work with $g(x) = 1/f(x)$ rather than $f(x)$. The problem is then: maximize $F(g) = \int_a^b \dfrac{dx}{g(x)}$ subject to the constraints $g(x) > 0$ for all $x$, $\int_a^b g(x)\ dx = \alpha$, and $\left| \dfrac{1}{g(x)} - \dfrac{1}{g(y)}\right| \le L |x - y|$, i.e. $\left| g(y) - g(x)\right| \le L g(x) g(y) |x - y|$, for all $x,y \in [a,b]$. A consequence of that is $g(x) (1 - L g(y) |x - y|) \le g(y)$. In particular, if some $g(y) < \epsilon < 1/(L (b-a))$ then $g(x) < \epsilon/(1 - \epsilon L (b-a))$, and then $\int_a^b g(x)\ dx \le \epsilon (b-a)/(1 - \epsilon L (b-a))$, which for sufficiently small $\epsilon > 0$ is less than $\alpha$, violating a constraint. Similarly, if $g(y) > 1/\epsilon$, then $g(x) > g(y)/(1 + L g(y)|x-y|) > 1/(\epsilon + L |x-y|)$. Since $\int_a^b \dfrac{dx}{|x-y|} =\infty$, we again get a contradiction if $\epsilon$ is too small. Thus for suitable $\epsilon > 0$ we can strengthen $g(x) > 0$ to $1/\epsilon \ge g(x) \ge \epsilon$.
The "feasible region" is the set $\cal R$ of continuous functions $g$ on $[a,b]$ such that $1/\epsilon \ge g(x) \ge \epsilon$ everywhere, $\int_a^b g(x)\ dx = \alpha$, and $\left| g(y) - g(x)\right| \le L g(x) g(y) |x - y|$ for all $x,y \in [a,b]$. By the Arzela-Ascoli theorem this is compact in $C[a,b]$, and $F$ is a continuous function on it, so $F$ attains its maximum, i.e. there is some $g_0 \in \cal R$ such that $F(g_0) \ge F(g)$ for all $g \in \cal R$.
Note that $F(g)$ is strictly convex on positive continuous functions, i.e. if $g_1, g_2 > 0$ and $g_1 \ne g_2$ somewhere in $[a,b]$ then $F(t g_1 + (1-t) g_2) > t F(g_1) + (1-t) F(g_2)$ for $0 < t < 1$. This says that the optimal solution must be an extreme point of $\cal R$.
I think that the extreme points of $\cal R$ are all functions $g$ such that $1/g$ is piecewise linear with slopes $\pm L$, but I don't have a proof.
If $g$ is extremal, $1/g$ must be piecewise linear with slopes $\pm L$, right ? – Ewan Delanoy May 7 '12 at 20:40