Thank you for your reply. My follow up question is

How did I know that I can't use "T" as the variable given that in the first equation I am taking a derivative with respect to "T" on the right hand side?

But I think I can see it if I work backwards:

\(\displaystyle \log{P(t,T)} = -\int_{t}^{T}f(t,u)du\)

\(\displaystyle \log{P(t,T)} = -g(t,t) + g(t,T) + C\)

where \(\displaystyle f(t,u) = \frac{\partial g(t,u)}{\partial u}\).

I know that at \(\displaystyle T=t, \log{P(t,t)} = 0 \) so \(\displaystyle C=0\)

Next take the partial derivative of both sides with respect to "T" such that

\(\displaystyle \frac{\partial \log{P(t,T)}}{\partial T} = -\frac{\partial g(t,t)}{\partial T} + \frac{\partial g(t,T)}{\partial T}\)

\(\displaystyle \frac{\partial \log{P(t,T)}}{\partial T} = f(t,T)\)

by our earlier definition of \(\displaystyle f(t,u) = \frac{\partial g(t,u)}{\partial u}\).

Comments welcome. Thanks again