Number of solutions of $f(x)=ax+b$ for a strictly convex real function $f$. During the last time, I used the theorem below several times in numerical approximations, where it is very useful to know the number of solutions of an equation and their multiplicity.  I did not formally prove it, it's more or less obvious and I took it for granted:
Let $f\in C^2(I)$ be a strictly convex real function defined on the open interval $I\subseteq \Bbb R$ that satisfies at least one of
$$\sup I = \infty \qquad\text{or}\qquad \lim_{x\to\sup I-} f(x) =\infty \tag{1.1}$$
and at least one of
$$\inf I = -\infty \qquad\text{or}\qquad \lim_{x\to\inf I+} f(x) =\infty \tag{1.2}$$
Let $D=f'(I)$. Then the equation
$$f(x) = ax+b\tag 2$$
has the following number of solutions:

*

*If $a\notin \overline D$, then $(2)$ has exactly one solution of multiplicity 1 for all $b\in\Bbb R$.


*If $a\in D$, then there exists a $b_0 = b_0(a)$ such that:

*

*$(2)$ has exactly $1$ solution $x_0$ of multiplicity 2 iff $b=b_0$.

*$(2)$ has exactly $2$ solutions of multiplicity 1 iff $b > b_0$.  Moreover, one solution is strictly smaller than $x_0$ and the other is strictly greater than $x_0$.

*$(2)$ has no solutions iff $b < b_0$.



*If $a\in \partial D\cap\Bbb R$, then there exists a $b_0=b_0(a)$ such that:

*

*$(2)$ has no solution iff $b \leqslant b_0$.

*$(2)$ has exactly $1$ solution of multiplicity 1 iff $b > b_0$.



Questions: It's unlikely that this has not been proved before. Is there a common name for the theorem?  Is it correct by the way, or are there some orgy details that break it, and the conditions must be more strict? Some links are also great, like to proofs or generalizations.

Notes

*

*A similar theorem can be stated for strictly concave functions, but one has to swap inequality relations, and the limits to ∞ in (1.1) and (1.2) must be changed to −∞.  This is effectively stating the theorem for $-f$, which is strictly convex.


*Taking together cases 1, 2 and 3 will cover all $a, b\in\Bbb R$.


*In many cases, $x_0$ can be determined as (unique) solution of $f'(x)=a$ (or if such $x_0$ does not exist, we know that we are not in case 2). In many cases, $x_0$ can be computed explicitly, like in the cases listed below.


*Case 1 and case 3 may be vacuous depending of $f$, for example for $f(x)=\cosh x$ or $f(x)=x^2$ for which $D=\Bbb R$.


*Examples where all 3 cases will occur are $\sqrt{1+x^2}$ and $\ln\cosh x$.


*Example with $I\subsetneq \Bbb R$ is $f(x) = x^n/(1-x^m)$ on $I=(-1,1)$ where $n$ and $m$ are positive, even integers. Or just take $f(x) = x^r$ on $\Bbb R^+$ for $r<0$.
 A: A number of reasons could explain why no reference is available:

*

*The problem (hypotheses and results) is quite intricate.

*It can be simplified by posing $g(x)=f(x)-ax$.

*There are more general results (although less specific in their conclusions), e.g. intersection of a convex and a concave function such as here.

I will try to give a proof as simple as possible.
But first, a result in all cases: the number of solutions is $0, 1$ or $2$. This is because a convex function on a convex domain has a convex epigraph (set of points above the function); so we are taking the intersection between a line and the boundary of a convex set. The result is the boundary of a convex set of a line, which can only be $0, 1$ or $2$ points. (That reasoning extends to $f: \mathbb{R}^n \to \mathbb{R}$, so we know the intersection of $f$ with an hyperplane is the boundary of a convex set on $\mathbb{R}^{n-1}$).
So $g$ defined by $g(x)=f(x)-ax$ is strictly convex and $C^2(I)$ as $f$ (this implies $g'(I)$ is an interval).
The problem becomes the level set cardinal of $g$, i.e. number of $x$ such that $g(x)=b$.
It is a known result (here) that $f$ differentiable is convex iff its derivative is increasing; and similarly that $f$ differentiable is strictly convex iff its derivative is strictly increasing.
The 3 cases become:

*

*$g'(I)$ being an interval, either $g$ is strictly decreasing and $\exists c<0, g'(I) \subseteq (-\infty, c]$,
or $g$ is strictly increasing, and $\exists c>0, g'(I) \subseteq [c, +\infty)$.
If $I$ is a bounded interval, conditions on $f$ imply $f(I)=\mathbb{R}$, so $g(I)=\mathbb{R}$ too.
If $I$ is unbounded on one side, $g'$ being strictly monotone implies $g \to \pm \infty$ on that side.
So in all cases $g(I)=\mathbb{R}$. This implies intersection exists; it is unique because of the condition on $g'$.


*$0 \in g'(I)$. $0$ is attained by $g'$ on some point $x_0$. As $I$ is open, $x_0$ is in interior of $I$.
So $g'$ is $<0$ before $x_0$ and $>0$ after $x_0$. It is then a classical result ($g$ being strictly convex) that $g$ has a unique minimum on $x_0$ such that $g'(x_0)=0$.
Then $g$ is strictly decreasing on $(-\infty,x_0] \cap I$, and strictly increasing on $[x_0, +\infty)$. So level sets have cardinal $0$ for $b<g(x_0)$, $1$ for $b=g(x_0)$, and $2$ for $b>g(x_0)$ with one point on each side of $x_0$.


*$0$ is on the boundary of $g'(I)$.
This means $g$ is either strictly decreasing or strictly increasing on all $I$ (strictly, because $g$ is strictly convex). Then $g(I)$ is an interval, and $g$ is bijective between $I$ and $g(I)$. That interval is unbounded at least on one side, because $g'$ is strictly increasing.
The number of $x$ such that $g(x)=b$ is $0$ or $1$. If $g(I) \ne \mathbb{R}$, then $\exists b_0, g(b_0)$ is the non-infinite boundary of $g(I)$, and solution cardinal is $1$ for $b \ge b_0$, $0$ otherwise.
However, existence of $b_0$ is not guaranteed (unless we accept $b_0=\pm \infty$): take for example $g(x)=e^x$, intersection with $b=0$ is on $-\infty$.
About the hypothesis $f$ is $C^2(I)$: $C^1$ is sufficient, we have used no more. Then it can be reduced to $D^1$, because derivatives verify the intermediate value theorem, which means convex + differentiable implies derivative is continuous, cf. here. I don't know if it still holds with $f$ $C^0$ and semi-differentiable.
