Distribution of randomly truncated random variable A random variable taking positive values has density $f(t)$.
If I truncate the variable in $(0,x]$, the density should be $f_T(t,x)=f(t)/F(x)$.
If the truncation value $x$ is itself random with density $g(x)$ in  $(0,b]$, the resulting density for $t$ should be
$$f_T(t) = \int_0^b \frac{ f(t) g(x) }{ F(x) } dx = f(t) \int_0^b \frac{ g(x) }{ F(x) } dx$$
However, the integral can be singular because $F(0)=0$.
General questions: Is if this derivation of $f_T(t)$ (the distribution of $t$ with random truncation parameter) correct? Can $f_T(t)$ really be undefined because of the singular integrand?
Specific question: if $f(t)=ae^{-at}$, and $g(x)=1/b$, the  integral diverges "only" logarithmically. I am thinking of just introducing a cutoff so that $x$ is in $[a,b]$ with some $a>0$, but maybe there are better ways to deal with the divergence?
 A: Writing $f_T(t,x) = \frac{f(t)}{F(x)}$ is an incomplete story. We should have $f_T(t,x) = 0$ when $t > x$. We could write this as $f_T(t,x) = \frac{f(t)}{F(x)}[t \le x]$, where $[t\le x]$ is an Iverson bracket equal to $1$ if the condition is met and $0$ otherwise.
Then
$$
   f_T(t) = \int_0^b \frac{f(t)g(x)}{F(x)}[t \le x] \,dx = f(t) \int_0^b \frac{g(x)}{F(x)}[t\le x]\,dx = f(t) \int_t^b \frac{g(x)}{F(x)}\,dx.
$$
Now for values of $t$ where $F(t) > 0$ there is no problem with the integral, and for values of $t$ where $F(t) = 0$, we should also have $f_T(t) = f(t) = 0$.
A: The difficulty disappears if we pay close attention to the limits of integration.
A random variable taking positive values has density $f(t)$. We assume   that the CDF satisfies $$  \forall   t>0, \quad   F(t)>0 \,. \tag{*} $$
If we truncate the variable in $(0,x]$, the density is $f_T(t,x)=f(t)/F(x) {\bf 1}_{(0,x]}(t)$.
If the truncation value $x$ is itself random with density $g(x)$ in  $(0,b]$, the resulting density at $t$ will equal $0$ for $t \notin (0,b]$. For $t \in (0,b]$, the density will be
$$f_T(t) = {\bf 1}_{(0,b]}(t) \cdot \int_0^b \frac{ f(t) g(x) {\bf 1}_{(0,x]}(t) }{ F(x) } dx = {\bf 1}_{(0,b]}(t) \cdot f(t) \int_t^b \frac{ g(x) }{ F(x) } dx  \,. \tag{**}$$
There is no divergence since the lower limit of the integral on the RHS is $t$.
Remark If the assumption $(*)$ does not hold, we only consider $t \in [t_0,b]$ where $t_0=\inf\{t: F(t)>0\}$. We may assume that $g$ is supported in $[t_0,b]$, and replace $0$ as a lower limit in $(**)$ by $t_0$.
