# Show that $\int_0^T(T-t)dW_t=\int_0^TW_t \ dt$

I want to show that $$\int_0^T(T-t)dW_t=\int_0^TW_t \ dt \tag1$$

By Ito's lemma we can write $$d((T-t)W_t)=(T-t)dW_t-W_t \ dt.\tag{2}$$

Now If I integrate this expression and use that $$W_0=0$$ I should be able to show that the integrals in $$(1)$$ are equivalent according to Wikipedia. Am I supposed to integrate both sides in $$(2)$$? I don't see how I should integrate the LHS of $$(2)$$ to show that it's zero. This should be easy, but my brain has really frozen.

The integral of the LHS is just

$$\int_0^T d\left(\left(T - t\right)W_t\right) = \left[\left(T - t\right)W_t\right]_0^T = \left(T - T\right)W_T - \left(T - 0\right)W_0 = 0$$.

You need $$W_0 = 0$$ to obtain the last equality.

I personally find it hard to work with short-hand notation in Stochastic calculus, so for my own record, and for anyone who has similar issues with the short-hand notation, I add the following answer.

On the wikipedia link provided, they start the argument you are referring to by stating:

...note that: $$d\left[(T-t)W_t\right]=(T-t)dW_t-W_tdt$$

How I like to rewrite the above is to define $$F(t,W_t):=(T-t)W_t$$ (for some $$0), and apply Taylor expansion around zero as follows:

$$F(\delta t,\delta W_t)=F(0,W_0)+\frac{\partial F}{\partial t}\delta t+\frac{\partial F}{\partial W_t}\delta W_t+\frac{1}{2}\frac{\partial^2 F}{\partial W_t^2}\delta W_t^2+...$$

From the above, we get:

$$F(\delta t,\delta W_t)=-W_t\delta t+(T-t)\delta W_t+0$$

As usual in the "heuristic" Ito's Lemma derivation, taking $$\delta t \rightarrow dt$$ and $$\delta t \rightarrow dt \longleftrightarrow \delta W_t \rightarrow dW_t$$, we get:

$$F(t,W_t)=\int_{h=0}^{h=t}-W_hdh+\int_{h=0}^{h=t}\left(T-h\right)dW_h$$

And we know the above is equal to $$F(t,W_t)=(T-t)W_t$$ (that's how we defined $$F$$ at the very beginning before applying Ito's lemma).

The final step is then to simply set $$t=T$$ to get:

$$F(T,W_T)=(T-T)W_T=0=\int_{h=0}^{h=T}-W_hdh+\int_{h=0}^{h=T}\left(T-h\right)dW_h$$

Therefore:

$$\int_{h=0}^{h=T}W_hdh=\int_{h=0}^{h=T}\left(T-h\right)dW_h$$

As required. A bit longer, one could even say "cumbersome", but for me using the long-hand notation reveals all the different steps, whilst the short-hand notation just seems "mechanical", and I often catch myself realizing that "I don't really understand the underlying mechanics" when using the short-hand (again, might be just me...).