I quote Life Insurance Mathematics (Gerber, 1997).
Let us consider a fund such that the initial capital $F_0$ is invested and at the end of year $k$ an additional amount of $r_k$ is invested, for $k=1,\dots,n$.
Assume that payments are made continously with an annual instantaneous rate of payment of $r(t)$, with $t$ denoting time. Thus the amount deposited to the fund during the infinitesimal time interval from $t$ to $t+dt$ is $r(t)dt$. Let $F(t)$ denote the balance of the fund at time $t$. We assume that interest is credited continously, according to a, possibly time-dependent, force of interest $\delta(t)$, with $\delta(t)$ consisting in: \begin{equation} \delta(t)=\lim_{m\to\infty}i^{(m)}=\lim_{m\to\infty}m\left[(1+i)^{\frac{1}{m}}-1\right]=\ln(1+i)\tag{1} \end{equation} with $i$ denoting an effective annual interest rate.
Interest credited in the infinitesimal time interval from $t$ to $t+dt$ is $F(t)\delta(t)dt$. The total increase in the capital during this interval is thus: \begin{equation} dF(t)=F(t)\delta(t)dt+r(t)dt\tag{2} \end{equation} To solve the corresponding differential equation: \begin{equation} F^{'}(t)=F(t)\delta(t)+r(t)\tag{3} \end{equation} $\color{red}{\text{we write:}}$ \begin{equation} \color{red}{\frac{d}{dt}\left[e^{-\int_{0}^{t}\delta(s)ds}F(t)\right]=e^{-\int_{0}^{t}\delta(s)ds}r(t)\tag{4}} \end{equation} $\color{red}{\text{Integration with respect to }t \text{ from } 0 \text{ to } h \text{ gives:}}$ \begin{equation} \color{red}{e^{-\int_{0}^{h}\delta(s)ds}F(h)-F(0)=\int_{0}^h e^{-\int_0^t\delta(s)ds}r(t)dt\tag{5}} \end{equation} $\color{red}{\text{Thus, the value at time }0 \text{ of a payment to be made at time }t\text{ is obtained by multiplication }}$ $\color{red}{\text{with the factor:}}$ \begin{equation} \color{red}{e^{-\int_0^t\delta(s)ds}\tag{6}} \end{equation}
Could you please help me understand all the passages underlying the reasoning in $\color{red}{\text{red}}$ above? (i.e. the logic behind them and the main mathematics passages)
(This is a response to the question hidden in comments instead of present in the Question. This would be a comment, but it is too long to fit in a comment.)
\begin{align*} \frac{d}{dt}&\left[e^{-\int_{0}^{t}\delta(s)ds}F(t)\right] \\ &= \frac{d}{dt}\left[e^{-\int_{0}^{t}\delta(s)ds}\right] F(t)+ e^{-\int_{0}^{t}\delta(s)ds}\frac{d}{dt}\left[F(t)\right] \\ &= \frac{d}{dt}\left[e^{-\int_{0}^{t}\delta(s)ds}\right] F(t)+ e^{-\int_{0}^{t}\delta(s)ds} F'(t) \\ &= e^{-\int_{0}^{t}\delta(s)ds} \frac{d}{dt}\left[{-\int_{0}^{t}\delta(s)ds}\right] F(t)+ e^{-\int_{0}^{t}\delta(s)ds} F'(t) \\ &= -e^{-\int_{0}^{t}\delta(s)ds} \frac{d}{dt}\left[{\int_{0}^{t}\delta(s)ds}\right] F(t)+ e^{-\int_{0}^{t}\delta(s)ds} F'(t) \\ &= -e^{-\int_{0}^{t}\delta(s)ds} \delta(t) F(t)+ e^{-\int_{0}^{t}\delta(s)ds} F'(t) \\ &= -e^{-\int_{0}^{t}\delta(s)ds} \left( \delta(t) F(t) - F'(t) \right) \text{.} \end{align*} The above uses, in order, the product rule for differentiation, the prime notation, the (general) exponential rule for differentiation, the constant multiple rule for differentiation (and commutativity of multiplication), the fundamental theorem of calculus (part 1), and distributivity of multiplication.
The result comes from (3) by moving $\delta(t)F(t)$ to the left-hand side, then multiplying both sides of this modified equation by the integrating factor to obtain (4).