# How were these SDE derived?

Can anyone give me a detailed explanation of how below equations (3) and (4) are derived from (1) and (2)? \begin{align*} \frac{dF_{t,T}}{F_{t,T}} &=\sigma e^{-\lambda(T-t)}dB_t, \tag{1}\\ \ln(F_{t,T})&=\ln(F_{0,T})-1/2\int_{0}^{t}\sigma^2 e^{-2\lambda(T-s)}ds+\int_{0}^{t}\sigma e^{-\lambda(T-s)}dB_s.\tag{2} \end{align*} Given $\ln(S_t)=\ln(F_{t,t})$, we have: \begin{align*} \frac{dS_t}{S_t}=(\mu_t-\lambda \ln(S_t))dt+\sigma dB_t,\tag{3} \end{align*} where \begin{align*} \mu_t=\frac{\partial \ln(F_{0,t})}{\partial t} +\lambda \ln(F_{0,t})+\frac{1}{4}\sigma^2(1-e^{-2\lambda t}). \tag{4} \end{align*} Or anything related to them will be helpful.

From $(2)$, \begin{align*} \ln S_t &=\ln F_{t, t} \\ &= \ln F_{0, t}-\frac{1}{2}\int_0^t\sigma^2 e^{-2\lambda (t-s)}ds+\int_0^t \sigma e^{-\lambda(t-s)} dB_s\\ &=\ln F_{0, t}-\frac{\sigma^2}{4\lambda} \left(1-e^{-2\lambda t}\right)+e^{-\lambda t}\int_0^t \sigma e^{\lambda s} dB_s. \end{align*} Then, \begin{align*} \lambda e^{-\lambda t}\int_0^t \sigma e^{\lambda s} dB_s = \lambda \ln S_t - \lambda \ln F_{0, t} + \frac{\sigma^2}{4} \left(1-e^{-2\lambda t}\right). \end{align*} Therefore, \begin{align*} d\ln S_t &= \left(\frac{\partial \ln F_{0, t}}{\partial t}-\frac{\sigma^2}{2}e^{-2\lambda t} - \lambda e^{-\lambda t}\int_0^t \sigma e^{\lambda s} dB_s\right)dt +\sigma dB_t\\ &=\left[\frac{\partial \ln F_{0, t}}{\partial t}-\frac{\sigma^2}{2}e^{-2\lambda t}+\lambda \ln F_{0, t} - \frac{\sigma^2}{4} \left(1-e^{-2\lambda t}\right) -\lambda \ln S_t\right]dt + \sigma dB_t\\ &=\left(\frac{\partial \ln F_{0, t}}{\partial t}+\lambda \ln F_{0, t} -\frac{\sigma^2}{4} - \frac{\sigma^2}{4} e^{-2\lambda t} -\lambda \ln S_t\right)dt + \sigma dB_t. \end{align*} Note that \begin{align*} d\langle \ln S, \ln S \rangle_t= \sigma^2 dt. \end{align*} By Ito's lemma, \begin{align*} dS_t &= de^{\ln S_t}\\ &= e^{\ln S_t} d \ln S_t + \frac{1}{2}e^{\ln S_t}d\langle \ln S, \ln S \rangle_t\\ &=S_t d \ln S_t + \frac{1}{2} \sigma^2 S_t dt\\ &= S_t\left[\left(\frac{\partial \ln F_{0, t}}{\partial t}+\lambda \ln F_{0, t} -\frac{\sigma^2}{4} - \frac{\sigma^2}{4} e^{-2\lambda t} -\lambda \ln S_t\right)dt + \sigma dB_t + \frac{\sigma^2}{2} dt \right]\\ &=S_t\big[\left(\mu_t - \lambda \ln S_t\right)dt + \sigma dB_t\big], \end{align*} where \begin{align*} \mu_t = \frac{\partial \ln F_{0, t}}{\partial t}+\lambda \ln F_{0, t} +\frac{\sigma^2}{4}\left(1- e^{-2\lambda t}\right). \end{align*}