# How to understand the following brownian integral using Fubini's method?

I am a little bit stucked with the following integral process, using Fubini's method, this is an intermediate step of short rate Merton Model.

$\int_{t}^{T} W(s)ds=\int_{0}^{\hat {T}}ds\int_{0}^{s}dW(u)\\=\int_{0}^{\hat {T}}dW(u)\int_{u}^{\hat {T}}ds\\=\int_{0}^{\hat {T}}(\hat{T}-u)dW(u)$

My more specific question is how did the change of integration variables proceed, as the process described by above integration is not very intuitive to me.

Many thanks!

• @Donkey_JOHN It's easily seen on a graph with 2 axes: one for the integration variable $t$, say the vertical one, and one of the integration variable $u$, say the horizontal. You then see that the surface covered by all $t \in [0,T]$ and for each fixed $t$, $u \in [0,t]$ (i.e. the upper triangle on the graph) is the same as the one covered by all $u \in [0,T]$ and for each fixed $u$, $t \in [u, T]$. The first view corresponds to the first integral on the RHS, while the second reflects the second integral on the RHS. Hope this makes sense to you. – Quantuple Jul 4 '16 at 17:08