Find a positive decreasing twice differentiable convex function $f$ such that $\int_1^{\infty}\frac{(f'(x))^2}{f(x)}dx=\infty$. Reopening this question:
Does there exist a positive, decreasing, twice differentiable convex function such that $\int_1^{\infty}\frac{(f'(x))^2}{f(x)}dx=\infty$?
My trial:
I tried some simple $f(x)$ like monomials or exponentials, that did not work (of course I may have overlooked smth). So I thought of being more systematic and try to define:
$$g(x)=\frac{f'(x)^2}{f(x)}$$
where $g(x)>0$ from the hypothesis. I tried than to express $f$ as a function of $g$ like this:
$$f'^2=fg$$
$$f'=-\sqrt{f}\sqrt{g} \ (\text{take negative square root})$$
$$f'/\sqrt{f}=-\sqrt{g} \ (\text{divide by non-zero function})$$
and integrating from $1$ to $x$:
$$\sqrt{f(x)}=\sqrt{f(1)}-\frac{1}{2}\int_1^{x}\sqrt{g(x)}dx$$
so now we should find a positive $g(x)$s.t.:
$$\int_1^{+\infty}\sqrt{g(x)}dx <\infty,\int_1^{+\infty}g(x)dx =\infty $$
, or prove that such a $g$ does not exist but since it is very easy to make errors with such manipulations (taking square roots, divisions by $f$) I stopped here... moreover, maybe I am overcomplicating things...
 A: The construction below is divided into two steps. In the first step, we construct a piecewise-linear positive decreasing convex function $f$, which is not differentiable only at integer points, such that the integral diverges; in the second step, we modify the function $f$ near the integer points to get a twice differentiable function $\tilde f$ satisfying all required peoperties.
Step 1. In this step we construct a piecewise-linear positive decreasing convex function $f$ such that $$\int_1^{\infty}\frac{(f'(x))^2}{f(x)}dx=\infty.$$
Consider a sequence $\{a_k\}_{k\geq 1}$ with $a_1=1$ and $a_{k+1}=a_ke^{a_k}$ for $k\geq 1$, then $a_k$ is increasing to $+\infty$. We define a function $f:[1,\infty)\to(0,\infty)$ such that $f(k)=\frac1{a_k}$ and $f$ is linear in each $[k,k+1]$:
$$f(x)=(f(k)-f(k+1))(k-x)+f(k)=\left(\frac1{a_k}-\frac1{a_{k+1}}\right)(k-x)+\frac1{a_k},\qquad x\in[k,k+1], \forall k\geq1.$$
Therefore,
\begin{align*}
\int_1^{\infty}\frac{(f'(x))^2}{f(x)}dx&=\sum_{k=1}^\infty\int_k^{k+1}\frac{(f'(x))^2}{f(x)}dx\\
&=\sum_{k=1}^\infty(f(k)-f(k+1))^2\int_k^{k+1}\frac{1}{(f(k)-f(k+1))(k-x)+f(k)}dx\\
&=\sum_{k=1}^\infty(f(k)-f(k+1))\ln\frac{f(k)}{f(k+1)}\\
&=\sum_{k=1}^\infty\left(\frac1{a_k}-\frac1{a_{k+1}}\right)a_k\\
&=\sum_{k=1}^\infty\left(1-\frac{1}{e^{a_k}}\right).
\end{align*}
Since $\displaystyle\lim\limits_{k\to\infty}a_k=+\infty$, we have $\displaystyle\lim\limits_{k\to\infty}\left(1-\frac{1}{e^{a_k}}\right)=1\neq 0$, thus $\displaystyle\int_1^{\infty}\frac{(f'(x))^2}{f(x)}dx=\infty$.
To show that $f$ is convex, it suffices to show that $\{f(k)-f(k+1)\}$ is decreasing in $k$. Let $\phi(x)=\frac1x-\frac1{xe^x}$ for $x\geq 1$, then $f(k)-f(k+1)=\phi(a_k)$. Since $a_k$ is increasing, it suffices to show that $\phi$ is decreasing in $x$. Indeed, we have
$$\phi'(x)=\frac{x+1-e^x}{x^2e^x}< 0,\qquad x>1.$$
Step 2. In this step we modify the function $f$ constructed in Step 1 to get a twice differentiable  positive decreasing convex function $\tilde f$ such that
$$\int_1^{\infty}\frac{(\tilde f'(x))^2}{\tilde f(x)}dx=\infty.\tag{1}$$
Recall that in step 1, the function $f$ we constructed is not differentiable only at $\mathbb N_{>1}$, hence we modify $f$ near each integers. To make things simplier, we look at a toy model first.
Lemma. Let $g(x)=|x|, x\in\mathbb R$. For any $\delta>0$, we can find a twice differentiable convex function $\tilde g:\mathbb R\to(0,\infty)$ such that $\tilde g(x)=g(x)$ for all $x\in\mathbb R\setminus[-\delta, \delta]$ and $|\tilde g'(x)|<1$ for all $x\in(-\delta, \delta)$.
Proof of Lemma. The function
$$\tilde g(x)=\begin{cases} |x|, & |x|\geq\delta,\\ -\frac1{8\delta^3}x^4+\frac3{4\delta}x^2+\frac38\delta, & |x|<\delta\end{cases}$$
will perfectly do the job. $\Box$
Similar modification can be used for the function $k|x|$, where $k>0$; and then be used to general piecewise linear functions, as the following picture illustrates:

We use this modification for the piecewise-linear positive decreasing convex function $f$ in $(k-\delta_k, k+\delta_k)$ for each $k\geq 2$, where $\delta_k=e^{-a_k}$. We denote the function after modification by $\tilde f$, then $\tilde f$ is a twice differentiable  positive decreasing convex function, and $$\tilde f(x)=f(x),\qquad \forall \ x\in\bigcup_{k=2}[k+\delta_k, k+1-\delta_{k+1}].$$
Finally, we check $(1)$. Indeed,
\begin{align*}
\int_1^{\infty}\frac{(\tilde f'(x))^2}{\tilde f(x)}dx&>\sum_{k=2}^\infty\int_{k+\delta_k}^{k+1-\delta_{k+1}}\frac{(f'(x))^2}{f(x)}dx\\
&=\sum_{k=2}^\infty(f(k)-f(k+1))^2\int_{k+\delta_k}^{k+1-\delta_{k+1}}\frac{1}{(f(k)-f(k+1))(k-x)+f(k)}dx\\
&=\sum_{k=2}^\infty(f(k)-f(k+1))\ln\left(\frac{(1-\delta_k)f(k)+\delta_kf(k+1)}{\delta_{k+1}f(k)+(1-\delta_{k+1})f(k+1)}\right)\\
&=\sum_{k=2}^\infty\left(\frac1{a_k}-\frac1{a_{k+1}}\right)\ln\left(\frac{(1-\delta_k)a_{k+1}+\delta_ka_k}{\delta_{k+1}a_{k+1}+(1-\delta_{k+1})a_k}\right)\\
& =\sum_{k=2}^\infty\left(\frac1{a_k}-\frac1{a_{k+1}}\right)\ln\left(\frac{(1-e^{-a_k})e^{a_k}+e^{-a_k}}{e^{-a_{k+1}\ \ +a_k}+1-e^{-a_{k+1}}}\right).
\end{align*}
Since $$(1-e^{-a_k})e^{a_k}+e^{-a_k}>(1-e^{-a_k})e^{a_k}>\frac12 e^{a_k}$$
and
$$e^{-a_{k+1}\ \ +a_k}+1-e^{-a_{k+1}}<e^{-a_{k+1}\ \ +a_k}+1<2,$$
we have
\begin{align*}
\left(\frac1{a_k}-\frac1{a_{k+1}}\right)\ln\left(\frac{(1-e^{-a_k})e^{a_k}+e^{-a_k}}{e^{-a_{k+1}\ \ +a_k}+1-e^{-a_{k+1}}}\right)&> \left(\frac1{a_k}-\frac1{a_{k+1}}\right)\ln \frac{e^{a_k}}4\\
&=1-\frac{a_k}{a_{k+1}}-2\left(\frac1{a_k}-\frac1{a_{k+1}}\right)\ln2\\
&=1-e^{-a_k}-2\frac1{a_k}\left(1-e^{-a_k}\right)\ln2\\
&\to 1,\qquad \text{as }k\to\infty.
\end{align*}
Therefore,
$$\int_1^{\infty}\frac{(\tilde f'(x))^2}{\tilde f(x)}dx=\infty.$$
This completes the proof. $\Box$
Remark. Using a smooth modification in the Lemma will give a smooth $\tilde f$ satisfying all desired properties here.
A: The idea of the following construction is to find functions $h$ such that the solution of the initial value problem
$$
 f'(x) = -h(f(x)) \, , \, f(0) = 1
$$
is defined for all $x \ge 0$ and has the desired properties.

Let $h:(0, 1] \to \Bbb R$ be a function with the following properties:

*

*$h$ is differentiable, positive, increasing, with $\lim_{x \to 0+} h(u) = 0$.

*$\int_0^1 \frac{1}{h(u)} \,du= \infty$.

*$\int_0^1 \frac{h(u)}{u} \,du = \infty$.

Then $H:(0, 1] \to \Bbb R$, $H(y) = \int_y^1 \frac{1}{h(u)} \, du$ is strictly decreasing with $H(1) = 0$ and $\lim_{y \to 0+} H(y) = \infty$, and we can define
$$
 f: [0, \infty) \to \Bbb R, f(x) = H^{-1}(x) \, .
$$
$f$ is positive, strictly decreasing, with $f(0) = 1$ and $\lim_{x \to \infty} f(x) = 0$.
$f$ is differentiable with
$$
 f'(x) = \frac{1}{H'(f(x))} = - h(f(x)) \,.
$$
This implies that $f'$ is differentiable and increasing (since $f$ is decreasing and $h$ is increasing), so that $f$ is twice differentiable and convex.
Finally,
$$
 \int_0^\infty \frac{f'(x)^2}{f(x)} \, dx = - \int_0^\infty \frac{h(f(x)) f'(x)}{f(x)} \, dx = \int_0^1 \frac{h(u)}{u} \, du = \infty 
$$
where we have substituted  $u=f(x)$ in the last step.

It remains to show that such a function $h$ exists. With the substitution $h(u) = 1/g(1/u))$ this is equivalent to finding a function $g: [1, \infty) \to \Bbb R$ with the following properties:

*

*$g$ is differentiable, positive, increasing, with $\lim_{x \to \infty} g(x) = \infty$.

*$\int_1^\infty \frac{g(x)}{x^2} \, dx = \infty$.

*$\int_1^\infty \frac{1}{x g(x)} \, dx = \infty$.

We construct $g$ by defining sequences
$$
 1 = x_1 < y_1 < \ldots < x_n < y_n < x_{n+1} < \ldots
$$
converging to infinity, and define $g$ such that
$$
 \int_{x_n}^{y_n} \frac{1}{xg(x)} \,dx \ge 1
$$
and
$$
 \int_{y_n}^{x_{n+1}} \frac{g(x)}{x^2} \,dx \ge 1 \, .
$$
for each $n$. This guarantees that the conditions 2 and 3 are satisfied. The construction will also show that condition 1 is satisfied.
We start by setting $x_1 = 1$ and $g(1) = 1$. Now assume that everything is defined up to $x_n$. We set $y_n = x_n e^{g(x_n)}$ and $g(x) = g(x_n)$ for $x_n \le x \le y_n$. Then
$$
\int_{x_n}^{y_n} \frac{1}{xg(x)} \,dx = \frac{1}{g(x_n)} \log\frac {y_n}{x_n} = 1 \, .
$$
Finally, set $x_{n+1} = y_n + 1$ and for $y_n \le x \le x_{n+1}$
$$
 g(x) = g(y_n) + C_n \phi(x-y_n)
$$
where $\phi(x) = x^2 (3-2x)$ and $C_n > 1$ is chosen so large that $\int_{y_n}^{x_{n+1}} \frac{g(x)}{x^2} \,dx \ge 1$.
Note that $\phi$ is strictly increasing on $[0, 1]$ with $\phi'(0) = \phi'(1) = 0$, so that the piecewise defined function $g$ is differentiable everywhere.
This concludes the proof.
A: I don't see any mistakes in your reasoning. There is such $g$, but given required properties I doubt there is any nice expression of it from elementary functions.
Given that we want integral of $\sqrt{g(x)}$ to converge and integral of $g(x)$ to diverge, we need $g(x)$ to take large values (otherwise we would just have $\sqrt{g(x)} > c\cdot g(x)$ near infinity). But for integral of $\sqrt{g(x)}$ to converge, we need $g(x)$ to take large values not very often.
So, the idea is as follow: if $g(x)$ is $2^n$ on interval with length $2^{-n}$, then this interval contributes $1$ to integral of $g(x)$, but only $2^{-n/2}$ to integral of $\sqrt{g(x)}$. If there is such interval for every $n$, then integral of $g(x)$ diverges, while integral of $\sqrt{g(x)}$ can still converge.
Let $w(x)$ be bump function: smooth, $w(x) = 0$ if $x \notin [0, 3]$, $w(x) = 1$ if $x \in [1, 2]$ and $0 \leq w(x) \leq 1$ if $x \in [0, 1] \cup [2, 3]$.
Now, $h_n(x) = 2^n \cdot w(2^n \cdot (x - 10n))$ satisfies properties we required: integral of $h_n(x)$ is at least $1$, while integral of $\sqrt{h_n(x)}$ is at most $3 \cdot 2^{-n/2}$. Note that $h_n$ have disjoint supports for different $n$, so $\sum_n \sqrt{h_n(x)}\,dx = \sqrt{\sum_n h_n(x)}$.
Now, let add $\exp(-x)$ for positivity, it doesn't affect convergence, and say $g(x) = \exp(-x) + \sum\limits_{n=1}^\infty h_n(x)$.
A: I haven't followed the details but a positive function $g(x)$ with the desired property is
$$
g(x) = \frac{e^{-x}}{x-1}
$$
Then
$$
\int_1^\infty dx \sqrt{g(x)} = \sqrt{\frac{2\pi}{e}} <\infty
$$
and
$$
\int_1^\infty dx g(x) = \infty
$$
