# What is the solution to the SDE $X^x_t = B_t + \int_0^t \frac{x − X^x_s}{1-s} ds$

In a course on Stochastic Calculus, I have seen the result (without proof) that:

The solution to the stochastic differential equation: $$X^x_t = B_t + \int_0^t \frac{x − X^x_s}{1-s} ds \space \text{ for } \space t \in [0,1), \space x \in \mathbb R \tag{1}$$ is given by: $$X^x_t = xt + B_t - (1-t) \int_0^t \frac{B_s}{(1-s)^2} ds \tag{2}$$

I have tried to prove this result by first considering integration by parts by taking $$Y_t = (1-t)$$ and $$Z_t = \int_0^t \frac{B_s}{(1-s)^2} ds$$. This leads to the result:

$$Y_t Z_t = \int_0^t \frac{B_r}{(1-r)} dr - \int_0^t Z_r dr$$

Therefore, by substitution into the solution in the question, we have:

$$X^x_t = xt + B_t \color{blue}{ -(1-t) \int_0^t \frac{B_s}{(1-s)^2} ds}$$ $$= xt + B_t \color{blue}{- Y_t Z_t}$$ $$X^x_t = xt + B_t \color{blue}{- \int_0^t \frac{B_r}{(1-r)} dr + \int_0^t Z_r dr} \tag{3}$$

However, this seems to be straying me away from the desired form of the original SDE in the question, unless there is some simplification here that I am missing.

I would be grateful for any help here.

Setting $$Z_t$$ as what you did in your work, and then writing (2) in Differential form gives us that $$dX^x_t = xdt + dB_t - \frac{B_t}{(1-t)}dt + Z_tdt \tag{4}\label{eq4}$$ And (2) also gives us that $$Z_t = \frac{xt + B_t - X_t^x}{1-t} \Rightarrow Z_t - \frac{B_t}{1-t} = \frac{xt - X_t^x}{1-t}$$ Now, plugging this back into \eqref{eq4} gives us $$dX^x_t = xdt + dB_t + \frac{xt-X_t^x}{1-t}dt = dB_t + \frac{x-X_t^x}{1-t}dt$$ which in Integral form is (1) in the problem statement.