I would like to obtain $g$ by solving the following integral equation

$$\int_s^T R(u) dg(u) + f(s,T)\int_s^T g(u)du =0$$

where $f,R:\mathbb R _+ ^*\rightarrow \mathbb R _+$and $g: \mathbb R _+ \rightarrow[0,1]$ is

• non-decreasing continuous function,
• $g(0)=1$,
• $g(T)<1$
• $\lim _{s\to \infty}g(s)=0$.

One can think about g as being such that $g= 1- F$ where $F$ is the law of an absolute continuous random variable.

If we assume that $g$ is differentiable then we have

$$\int_s^T \left(f(s,T)g(u)+R(u) g'(u)\right) ~du =0, \quad \forall s \in [0,T]$$

So I am tempted to conclude that

$$f(s,T)g(u)+R(u) g'(u)=0, \quad \forall u \in [s,T]$$ therefore $$g(s) = \exp\left(-\int _0^s \frac{f(\tau,T)}{R(\tau)}~d\tau\right), \quad \forall u \in [0,T]$$

Is my approach correct or have I made a mistake when I assumed that the integrand is zero as the integral is zero for each $s$ ?

I have no restrictions on $f$ and $R$ for the moment so we can assume any necessary condition about $f$ as necessary to solve it.

Edit

A friend wisely advised me to take a look at Volterra integral equation which is exactly what we have here after integrating by parts the first integral and inverting the time as follows ( after that point I use the notation abuse $R(u): =R(-u), g(u):=g(-u) \text{ and } f(t,T) = f(-t,T)$):

$$g(t) = \alpha + \int_{-T }^t K_T(t,u))g(u) du$$

where $\alpha := (Rg)(-T)$ and $$K_T(t,u):=\frac{R'(u) + f(t,T)}{R(t)}$$

Second part

Actually all the previous part of this question was a preliminary to my true problem. I was strugling in that previous case and would like to know iff there was a way to have a closed form solution to that.

My ambition was to understand better the previous case in order to adapt it to the case where $\left(f(t,T)\right)_{t \in [0,T]}$ with known dynamic .

Then I started to think about a numeric approach to solve this Voltera integral equation if a stochastic Kernel but a first problem that comes to my mind is that it anticipate the value of $f$.

Many thanks

I posted this question some days ago at mathexchange

As was indicated in the answer at https://math.stackexchange.com/questions/1021510/about-an-integral-equation, you can transform your integral equation into the second order differential equation. Somewhat simpler equation, than indicated there, can be obtained in the following way. After integration by parts, your equation becomes $$R(T)g(T)-R(s)g(s)-\int\limits_s^Tg(u)R^\prime(u)du+f(s)\int\limits_s^T g(u) du=0.$$ Differentiating with respect to $s$, we get $$-R(s)g^\prime(s)+f^\prime(s)\int\limits_s^T g(u) du-f(s)g(s)=0,$$ or $$\frac{R(s)}{f^\prime(s)}g^\prime(s)+\frac{f(s)}{f^\prime(s)}g(s)=\int\limits_s^T g(u) du. \tag{1}$$ To obtain the first equation, we have used $$\frac{d}{ds}\int\limits_s^T F(u) du=-F(s),$$ valid for any function $F(s)$. Differentiating (1) once more, we get $$\left(\frac{R(s)}{f^\prime(s)}\right)^\prime g^\prime(s)+ \left(\frac{R(s)}{f^\prime(s)}\right)g^{\prime\prime}(s)+\left(\frac{f(s)}{f^\prime(s)}\right)^\prime g(s)+\left(\frac{f(s)}{f^\prime(s)}\right)g^\prime(s)=-g(s),$$ which implies the following equation $$g^{\prime\prime}+\frac{1}{Rf^\prime}\left[R^\prime f^\prime-Rf^{\prime\prime}+ff^\prime\right]g^\prime+\frac{1}{Rf^\prime}\left[2f^{\prime\,2}-ff^{\prime\prime}\right]g=0.$$ This equation can be easily solved if $2f^{\prime\,2}-ff^{\prime\prime}=0$. For example, if $$f=\frac{T}{s}.$$ Introducing an auxiliary function $h(s)=g^\prime(s)$, we can easily separate variables and get $$\frac{dh}{h}=-\left[\frac{d}{ds}\left(\ln{(R(s)s^2)}\right)+\frac{T}{sR(s)}\right]ds.$$ Therefore, $$\frac{dg}{ds}=h(s)=h(T)\frac{R(T)T^2}{R(s)s^2}\exp{\left(-\int\limits_T^s\frac{Tdu}{uR(u)}\right)}.$$ Integrating once more and using $g(0)=1$, we get finally $$g(s)=1+h(T)R(T)T^2\int\limits_0^s\frac{du}{R(u)u^2}\exp{\left(-\int\limits_T^u\frac{Tdv}{vR(v)}\right)}.$$ Here $h(T)$ is determined from the condition $g(\infty)=0$. For example, if $R(s)=\frac{T^3}{s^2}$, we get $$g(s)=1+\sqrt{\frac{\pi}{2}}e^{1/2}Th(T)\,\rm{Erf}{\left(\frac{s}{\sqrt{2}\,T}\right)},$$ where the error function is defined as usual: $$\rm{Erf}(s)=\frac{2}{\sqrt{\pi}}\int\limits_0^s e^{-x^2}dx.$$ Then applying the $g(\infty)=0$ condition determines $h(T)$ and gives $$g(s)=1-\rm{Erf}\left(\frac{s}{\sqrt{2}\,T}\right).$$