Divergent integrals $\int_{a}^{\infty}\frac{dx}{f(x)}$ and $\int_{a}^{\infty}\frac{dx}{f(x)+b}$ for positive $f$ and $b$ Assume that $f\colon [a,\infty)\to(0,\infty)$ is continuous ($a\in\mathbb{R}$) and such that
$$\int_{a}^{\infty}\frac{dx}{f(x)}=+\infty$$
and let $b>0$. Can we claim that
$$\int_{a}^{\infty}\frac{dx}{f(x)+b}=+\infty\quad ?$$
If $f$ is nondecreasing, then it is true. And in general? What else makes this implication true?
Proof for nondecreasing $f$: we have
$$\frac{1}{f(x)}=\frac{1}{f(x)+b}\left(1+\frac{b}{f(x)}\right)\leq\frac{1}{f(x)+b}\left(1+\frac{b}{f(a)}\right)$$
and we compare the integrals.
 A: This is false in general. First, we may as well take $a=0$. If $f(x)$ is not positive for $[0,a)$, modify the function and consider $f(x-a)$ instead of $f(x)$. Second, note that it is sufficient to consider a positive function that is discontinuous at a countable set $S$ (but otherwise continuous) but whose limits exist as $x$ approaches $m\in S$. That is, if $h(x)$ is positive discontinuous at $x\in S$ (and only there) with
$$\lim_{x\to m^{+}}h(x)=L_1\text{ and }\lim_{x\to m^{-}}h(x)=L_2$$
existing, we can construct $f(x)$ from $h(x)$ such that $f(x)$ is positive, continuous, and
$$\int_0^\infty \frac{1}{h(x)}dx<\infty \Leftrightarrow \int_0^\infty \frac{1}{f(x)}dx<\infty $$
To do this, let $g(x)=h(x)^{-1}$ and define
$$\beta_m^{+}=\lim_{x\to n^{+}}g(x)\text{ and }\beta_m^{-}=\lim_{x\to n^{-}}g(x)$$
$$\beta_m=\beta_m^{+}-\beta_m^{-}$$
(with $m\in S$). Now, for $m$ in $S$, choose $0<\alpha_m\leq \frac{1}{4}$ small enough such that
$$\int_{m-\alpha_m}^{m+\alpha_m}\left[\frac{g(m+\alpha_m)-g(m-\alpha_m)}{2\alpha_m}x+g(m+\alpha_m)-(m+\alpha_m)\frac{g(m+\alpha_m)-g(m-\alpha_m)}{2\alpha_m}\right]dx$$
$$\leq \frac{1}{n^2}$$
and
$$\int_{m-\alpha_m}^{m+\alpha_m}g(x)dx\leq \frac{1}{n^2}$$
(where $n$ is the natural number associated with $m$ in the bijection between $S$ and $\mathbb{N}$). To show that this is indeed possible, first note that
$$\lim_{\alpha_m\to 0^{+}}g(m+\alpha_m)=\beta_m^{+}\text{ and }\lim_{\alpha_m\to 0^{+}}g(m-\alpha_m)=\beta_m^{-}$$
This then implies the integral
$$\lim_{\alpha_m\to 0^{+}}\int_{m-\alpha_m}^{m+\alpha_m}\left[\frac{g(m+\alpha_m)-g(m-\alpha_m)}{2\alpha_m}x+g(m+\alpha_m)-(m+\alpha_m)\frac{g(m+\alpha_m)-g(m-\alpha_m)}{2\alpha_m}\right]dx$$
$$\leq\lim_{\alpha_m\to 0^{+}}\left[\alpha_m (g(m+\alpha_m)-g(m-\alpha_m))+\alpha_m \frac{g(m+\alpha_m)+g(m-\alpha_m)}{2}\right]=0$$
For the second integral, note that
$$\int_{m-\alpha_m}^{m+\alpha_m}g(x)dx\leq 2\alpha_m \max_{x\in [m+1/4,m+1/4]}g(x)$$
which goes to zero as $\alpha_m$ goes to zero. With this, define
$$f(x)=\left\{\begin{matrix}
h(x) && x\not\in N_{\alpha_m}(m)\\
\left[\frac{g(m+\alpha_m)-g(m-\alpha_m}{2\alpha_m}x+g(m+\alpha_m)-(m+\alpha_m)\frac{g(m+\alpha_m)-g(m-\alpha_m)}{2\alpha_m}\right]^{-1} && x\in N_{\alpha_m}(m)
\end{matrix}\right.$$
(where $N_{\alpha_m}(m)=(m-\alpha_m,m+\alpha_m)$) for all $m\in S$. Also, for ease of notation let
$$T=\bigcup_{m\in S} N_{\alpha_m}(m)$$
First, it is not to hard to show that $f(x)$ is continuous. This is because the $f(x)$ is equal to $h(x)$ except for an inverse linear function around the discontinuities. Second, note that
$$\infty=\int_T \frac{1}{h(x)}dx+\int_{\mathbb{R}/T}\frac{1}{h(x)}dx=\int_T g(x)dx+\int_{\mathbb{R}/T}\frac{1}{h(x)}dx$$
$$\leq \sum_{n=1}^\infty \frac{1}{n^2}+\int_{\mathbb{R}/T}\frac{1}{h(x)}dx=\frac{\pi^2}{6}+\int_{\mathbb{R}/T}\frac{1}{h(x)}dx$$
This implies
$$\int_{\mathbb{R}/T}\frac{1}{h(x)}dx=\infty$$
Then we get
$$\int_0^\infty \frac{1}{f(x)}dx=\int_T \frac{1}{f(x)}dx+\int_{\mathbb{R}/T}\frac{1}{f(x)}dx$$
$$=\sum_{m\in S}\int_{m-\alpha_m}^{m+\alpha_m}\left[\frac{g(m+\alpha_m)-g(m-\alpha_m)}{2\alpha_m}x+g(m+\alpha_m)-(m+\alpha_m)\frac{g(m+\alpha_m)-g(m-\alpha_m)}{2\alpha_m}\right]dx$$
$$+\int_{\mathbb{R}/T}\frac{1}{h(x)}dx\geq  -\sum_{n=1}^\infty\frac{1}{n^2}+\int_{\mathbb{R}/T}\frac{1}{h(x)}dx=\infty$$
We conclude
$$\int_0^\infty \frac{1}{f(x)}dx=\infty$$
If, on the other hand,
$$\int_0^\infty \frac{1}{h(x)}dx<\infty$$
then in a similar manner we can show that
$$\int_0^\infty \frac{1}{f(x)}dx<\infty$$
Having shown that it is sufficient to consider a positive, discontinuous function with direction limits that exist at all discontinuities, define
$$g(x)=\left\{\begin{matrix}
\frac{1}{n}&& x\in [n,n+1/n^2]\\ 
\lfloor x \rfloor ^2+1&&\text{otherwise}
\end{matrix}\right.$$
It is easy to show that $g(x)$ satisfies all the conditions necessary for the work above to apply. Then
$$\int_0^\infty \frac{1}{g(x)}dx=\sum_{n=1}^\infty \frac{1}{g(n)}=\sum_{n=1}^\infty \frac{1}{n}+1+\sum_{n=1}^\infty\frac{1}{n^2+1}\left(1-\frac{1}{n^2}\right)=\infty$$
However, for all $b>0$ we have
$$\int_0^\infty \frac{1}{g(x)+b}dx=\sum_{n=1}^\infty \frac{1}{g(n)+b}$$
$$=\sum_{n=1}^\infty\frac{n}{1+bn}\cdot \frac{1}{n^2} +\frac{1}{1+b}+\sum_{n=1}^\infty\frac{1}{n^2+1+b}\left(1-\frac{1}{n^2}\right)$$
$$=\sum_{n=1}^\infty\frac{n}{bn^3+n^2} +\frac{1}{1+b}+\sum_{n=1}^\infty\frac{1}{n^2+1+b}\left(1-\frac{1}{n^2}\right)<\infty$$
A: QC_QAQA's answer with modifications, for future reference. We may assume that $a=0$, since
for
$$\tilde{f}(x)=f(x-a),\ x\in[a,\infty),$$
we have
$$\int_{a}^{\infty}\frac{dx}{\tilde{f}(x)}=\lim_{z\to \infty}\int_{a}^{z}\frac{dx}{f(x-a)}=\lim_{z\to\infty}\int_{0}^{z-a}\frac{dy}{f(y)}=\int_{0}^{\infty}\frac{dx}{f(x)},$$
$$\int_{a}^{\infty}\frac{dx}{\tilde{f}(x)+b}=\lim_{z\to \infty}\int_{a}^{z}\frac{dx}{f(x-a)+b}=\lim_{z\to\infty}\int_{0}^{z-a}\frac{dy}{f(y)+b}=\int_{0}^{\infty}\frac{dx}{f(x)+b}.$$
We will give an example of a positive function that is discontinuous at an infinite countable set $S$ with no accumulation point in $[0,\infty)$ (but otherwise continuous), but whose limits exist
as $x$ approaches $m\in S$, that is, $h\colon[0,\infty)\to(0,\infty)$
is continuous in $[0,\infty)\setminus S$, $S\subset(0,\infty)$ is infinite countable
with no accumulation point in $[0,\infty)$ and for any
$m\in S$ there exist $L_{m^{-}}>0$ and $L_{m^{+}}>0$ such that
$$\lim_{x\to m^{-}}h(x)=L_{m^{-}}\text{ and }\lim_{x\to m^{+}}h(x)=L_{m^{+}},$$
which satisfies
$$\int_{0}^{\infty}\frac{dx}{h(x)}=\infty\text{ and for any }b>0\text{ we have }\int_{0}^{\infty}\frac{dx}{h(x)+b}<\infty.$$
Let us consider the function
$$h(x)=\begin{cases}
\frac{1}{n},&\ x\in [n,n+1/n^2),\ n\in\mathbb{N},\\
\lfloor x \rfloor ^2+1,&\ \text{otherwise}.
\end{cases}$$
Note that $h\colon[0,\infty)\to(0,\infty)$, $h$ is continuous in $[0,\infty)\setminus S$
with
$$S=\{n\colon n\geq 2\}\cup\{n+\frac{1}{n^2}\colon n\geq 2\}=S_1\cup S_2$$
and for any $m=n\in S_1$ we have
$$\lim_{x\to m^{-}}h(x)=(n-1)^2+1\text{ and }\lim_{x\to m^{+}}h(x)=\frac{1}{n}$$
and for any $m=n+\frac{1}{n^2}\in S_2$ we have
$$\lim_{x\to m^{-}}h(x)=\frac{1}{n}\text{ and }\lim_{x\to m^{+}}h(x)=n^2+1.$$
Moreover, we have
$$\int_0^\infty \frac{dx}{h(x)}=\sum_{n=0}^\infty \int_{n}^{n+1}\frac{dx}{h(x)}=1+\sum_{n=1}^\infty\left(\int_{n}^{n+\frac{1}{n^2}}\frac{dx}{h(x)}+\int_{n+\frac{1}{n^2}}^{n+1}\frac{dx}{h(x)}\right)$$
$$=1+\sum_{n=1}^{\infty}n\cdot\frac{1}{n^2}+\sum_{n=1}^\infty\frac{1}{n^2+1}\left(1-\frac{1}{n^2}\right)=\infty.$$
However, for any $b>0$ we get
$$\int_0^\infty \frac{dx}{h(x)+b}=\sum_{n=0}^\infty\int_{n}^{n+1}\frac{dx}{h(x)+b}=\frac{1}{1+b}+\sum_{n=1}^\infty\frac{n}{1+bn}\cdot\frac{1}{n^2}+\sum_{n=1}^\infty\frac{1}{n^2+1+b}\left(1-\frac{1}{n^2}\right)$$
$$=\frac{1}{1+b}+\sum_{n=1}^\infty\frac{1}{bn^2+n}+\sum_{n=1}^\infty\frac{1}{n^2+1+b}\left(1-\frac{1}{n^2}\right)<\infty.$$
Finally, using the above function $h\colon[0,\infty)\to(0,\infty)$,
we construct a continuous function $f\colon[0,\infty)\to (0,\infty)$ such that
$$\int_{0}^{\infty}\frac{dx}{f(x)}=\infty\text{ and for any }b>0\text{ we have }\int_{0}^{\infty}\frac{dx}{f(x)+b}<\infty.$$
To this end, define $g(x)=\frac{1}{h(x)}$, $x\in [0,\infty)$, which is continuous in $[0,\infty)\setminus S$,
and for $m\in S$ note that
$$\lim_{x\to m^{-}}g(x)=\frac{1}{L_{m^{-}}}\text{ and }\lim_{x\to m^{+}}g(x)=\frac{1}{L_{m^{+}}}.$$
Since $m\in S$ is not an accumulation point of $S$, there exists $a_{m}>0$
such that
$$[m-a_m,m+a_{m}]\subset [0,\infty)\text{ and }[m-a_m,m+a_{m}]\cap S=\{m\}.$$
In particular, there exists $0<M_{m}<\infty$ such that
$$\max_{x\in[m-a_{m},m+a_{m}]}g(x)=M_{m}.$$
For $m\in S$ and $0<\varepsilon<a_{m}$ we connect $(m-\varepsilon,g(m-\varepsilon))$ and $(m+\varepsilon,g(m+\varepsilon))$
by a~straight line and integrate it over $[m-a_{m},m+a_{m}]$. We observe that
$$\int_{m-\varepsilon}^{m+\varepsilon}\left[\frac{g(m+\varepsilon)-g(m-\varepsilon)}{2\varepsilon}x+g(m+\varepsilon)-(m+\varepsilon)\frac{g(m+\varepsilon)-g(m-\varepsilon)}{2\varepsilon}\right]dx$$
$$\leq\varepsilon |g(m+\varepsilon)-g(m-\varepsilon)|+\varepsilon(g(m+\varepsilon)+g(m-\varepsilon))\to 0\text{ as }\varepsilon\to 0^{+},$$
where the first is the area of a right triangle with catheti of length $|g(m+\varepsilon)-g(m-\varepsilon)|$
and $2\varepsilon$ and the other is the area of the rectangle with sides of length $\frac{g(m+\varepsilon)+g(m-\varepsilon)}{2}$
and $2\varepsilon$. We also note that
$$\int_{m-\varepsilon}^{m+\varepsilon}g(x)dx\leq 2\varepsilon \max_{x\in [m+a_m,m+a_{m}]}g(x)=2\varepsilon M_{m}\to 0\text{ as }\varepsilon\to 0^{+}.$$
Let $S=\{m_{n}\colon n\in\mathbb{N}\}$ and choose $0<\alpha_{n}<a_{m_n}$ such that
$$\int_{m_n-\alpha_n}^{m_n+\alpha_n}\!\bigg[\frac{g(m_n+\alpha_n)-g(m_n-\alpha_n)}{2\alpha_n}x+g(m_n+\alpha_n)-(m_n+\alpha_n)\frac{g(m_n+\alpha_n)-g(m_n-\alpha_n)}{2\alpha_n}\bigg]dx\leq\frac{1}{n^2}$$
and
$$\int_{m_n-\alpha_n}^{m_n+\alpha_n}g(x)dx\leq \frac{1}{n^2}.$$
Let $N_{n}=[m_n-\alpha_n,m_n+\alpha_n]$, $n\in\mathbb{N}$, and define
$$f(x)=\begin{cases}
h(x),&x\not\in N_{n},\\
1/\left[\frac{g(m_n+\alpha_n)-g(m_n-\alpha_n)}{2\alpha_n}x+g(m_n+\alpha_n)-(m_n+\alpha_n)\frac{g(m_n+\alpha_n)-g(m_n-\alpha_n)}{2\alpha_n}\right],&x\in N_{n}.
\end{cases}$$
First note that $f$ is positive and $f$ is continuous, since $f$ is equal to $h$ except
for the reciprocal of a~linear positive function around discontinuities, which connects $(m_n-\alpha_n,h(m_n-\alpha_n))$
and $(m_n+\alpha_n,h(m_n+\alpha_n))$.
For the ease of notation, let $T=\bigcup_{n\in\mathbb{N}} N_{n}$
and observe that since
$$\infty=\int_{0}^{\infty}\frac{dx}{h(x)}=\int_T \frac{dx}{h(x)}+\int_{[0,\infty)\setminus T}\frac{dx}{h(x)}=\int_T g(x)dx+\int_{[0,\infty)\setminus T}\frac{dx}{h(x)}$$
$$\leq \sum_{n=1}^\infty \frac{1}{n^2}+\int_{[0,\infty)\setminus T}\frac{dx}{h(x)}=\frac{\pi^2}{6}+\int_{[0,\infty)\setminus T}\frac{dx}{h(x)},$$
it follows that
$$\int_{[0,\infty)\setminus T}\frac{dx}{h(x)}=\infty.$$
Since
$$\int_0^\infty \frac{dx}{f(x)}=\int_T \frac{dx}{f(x)}+\int_{[0,\infty)\setminus T}\frac{dx}{f(x)}=\int_T \frac{dx}{f(x)}+\int_{[0,\infty)\setminus T}\frac{dx}{h(x)}\geq \int_{[0,\infty)\setminus T}\frac{dx}{h(x)},$$
we conclude that
$$\int_{0}^{\infty}\frac{dx}{f(x)}=\infty.$$
Now we have to show that $\int_{0}^{\infty}\frac{dx}{f(x)+b}<\infty$ for any $b>0$. Observe that
$$\int_T \frac{dx}{f(x)+b}\leq\int_{T}\frac{dx}{f(x)}\leq\sum_{n=1}^{\infty}\int_{m_n-\alpha_n}^{m_n+\alpha_n}\bigg[\frac{g(m_n+\alpha_n)-g(m_n-\alpha_n)}{2\alpha_n}x$$
$$+g(m_n+\alpha_n)-(m_n+\alpha_n)\frac{g(m_n+\alpha_n)-g(m_n-\alpha_n)}{2\alpha_n}\bigg]dx\leq\sum_{n=1}^{\infty}\frac{1}{n^2}=\frac{\pi^2}{6}.$$
Hence we obtain
$$\int_0^\infty \frac{dx}{f(x)+b}=\int_T \frac{dx}{f(x)+b}+\int_{[0,\infty)\setminus T}\frac{dx}{f(x)+b}=\int_T \frac{dx}{f(x)+b}+\int_{[0,\infty)\setminus T}\frac{dx}{h(x)+b}$$
$$\leq\frac{\pi^{2}}{6}+\int_{0}^{\infty}\frac{dx}{h(x)+b}<\infty.$$
If $h\in C^{k}([0,\infty)\setminus S)$ (as above), then instead of joining points $(m-\varepsilon,\frac{1}{h(m-\varepsilon)})$
and $(m+\varepsilon,\frac{1}{h(m+\varepsilon)})$ by a straight line, we correct $g(x)=\frac{1}{h(x)}$
to the function of class $C^{k}$ in such a way that the graph of the correction lies in the rectangle
$[m-\varepsilon,m+\varepsilon]\times[0,\frac{1}{h(m-\varepsilon)}+\frac{1}{h(m+\varepsilon)}]$. Then $f$ is also $C^{k}$.
A: The opposite would be true: since
$$
f+b >f \Rightarrow \frac{1}{f+b} < \frac{1}{f} \rightarrow\int\frac{dx}{f+b} \to \infty \Rightarrow\int \frac{dx}{f} \to \infty
$$
