I have a 2 part question. I was able to figure out part 1. I need some help with part 2. I will write out part 1 (and my solution) for completion.
Let $T$ be a continuous survival time with survival function $S(t)$. Also, suppose $\text{E}[T]$ is finite. The expected residual lifetime at time $t$ is defined as $$r(t) = \text{E}[T-t|T\geq t], \qquad t\geq 0$$
- Show that $$r(t) = \int_t^\infty \dfrac{S(u)}{S(t)}du$$
Consider $U = T-t$. Then $\text{E}[T-t|T\geq t] = \text{E}[U|U\geq 0]$. Since $U|U\geq 0$ is a continuous, non-negative random variable we have $\text{E}[U|U\geq 0] = \int_0^\infty S_{U|U\geq 0}(u)du$ (proven in previous homework). $$\begin{align*} f_{U|U\geq 0}(v) &= \dfrac{ f(v+t)}{S(t)}\\ F_{U|U\geq 0}(v) &= \int_0^v f_{U|U\geq 0}(v) dv\\ &= \int_0^v \dfrac{ f(v+t)}{S(t)} dv\\ &= \int_t^{v+t} \dfrac{f(x)}{S(t)}dx\\ &= \dfrac{F(v+t)-F(t)}{S(t)}\\ S_{U|U\geq 0}(v) &= 1- \dfrac{F(v+t)-F(t)}{S(t)}\\ \text{E}[U|U\geq 0] &= \int_0^\infty S_{U|U\geq 0}(v)dv\\ &= \int_0^\infty1- \dfrac{F(v+t)-F(t)}{S(t)} dv\\ &= \int_0^\infty \dfrac{S(t) - 1 + S(v+t)+1-S(t)}{S(t)}dv\\ &= \int_0^\infty \dfrac{S(v+t)}{S(t)}dv\\ &= \int_t^\infty \dfrac{S(u)}{S(t)}du \end{align*}$$
- Show that $$S(t) = \dfrac{r(0)}{r(t)}\exp{\left(-\int_0^t\dfrac{du}{r(u)}\right)}$$
First note that $$\dfrac{-1}{r(t)} = \dfrac{-S(t)}{\int_t^\infty S(u)du} = \dfrac{d}{dt}\log\int_t^\infty S(u)du$$ $$\begin{align*} \dfrac{r(0)}{r(t)}\exp{\left(-\int_0^t\dfrac{du}{r(u)}\right)} &= \dfrac{S(t)r(0)}{\int_t^\infty S(u)du}\exp\left\{\int_t^\infty \dfrac{d}{du}\log\int_u^\infty S(v)dvdu\right\}\\ &= \dfrac{S(t)r(0)}{\int_t^\infty S(u)du}\exp\left\{\dfrac{d}{du}\int_t^\infty \log\int_u^\infty S(v)dvdu\right\}\\ \dfrac{S(t)r(0)}{\int_t^\infty S(u)du}\exp\left\{\log\int_t^\infty S(u)du\right\}\\ &= S(t)r(0) \end{align*}$$
I can't get rid of $r(0)$. I feel like I might've made some mistakes in the exponential. Any help would be appreciated.