(Black-Scholes-Merton formula for time-varying, nonrandom interest rate and volatility). Consider a stock whose price differential is
$$
d S(t)=r(t) S(t) d t+\sigma(t) d \widetilde{W}(t),
$$
where $r(t)$ and $\sigma(t)$ are nonrandom functions of $t$ and $\widetilde{W}$ is a Brownian motion under the risk-neutral measure $\tilde{\mathbb{P}}$. Let $T>0$ be given, and consider a European call, whose value at time zero is
$$
c(0, S(0))=\mathbf{E}\left[\exp \left\{-\int_0^T r(t) d t\right\}(S(T)-K)^{+}\right] .
$$
(i) Show that $S(T)$ is of the form $S(0) e^X$, where $X$ is a normal random variable, and determine the mean and variance of $X$.
(ii) Let
$$
\begin{aligned}
\operatorname{BSM}(T, x ; K, R, \Sigma)=x N & \left(\frac{1}{\Sigma \sqrt{T}}\left[\log \frac{x}{K}+\left(R+\Sigma^2 / 2\right) T\right]\right) \\
& -e^{-R T} K N\left(\frac{1}{\Sigma \sqrt{T}}\left[\log \frac{x}{K}+\left(R-\Sigma^2 / 2\right) T\right]\right)
\end{aligned}
$$
denote the value at time zero of a European call expiring at time $T$ when the underlying stock has constant volatility $\Sigma$ and the interest rate $R$ is constant. Show that
$$
c(0, S(0))=\operatorname{BSM}\left(S(0), T, \frac{1}{T} \int_0^T r(t) d t, \sqrt{\frac{1}{T} \int_0^T \sigma^2(t) d t}\right) .
$$