If I suppose the short rate $r$ deterministic, and the risk neutral measure $Q$, I can write the following :
$$f(t,u) = -\frac{d}{du}\ln P(t,u) = -\frac{d}{du} E_t^Q \left[ e^{-\int_t^{u}r_sds} \right] = E_t^Q \left[ \frac{d}{du} \int_t^{u}r_sds \right] = E_t^Q \left[ \frac{d}{du} (R_u - R_t) \right] = E_t^Q [r_u]$$
with $f$ the instantaneous forward rate and $P$ the price of a zero coupon bond.
Now I wonder, which one of the equalities here that doesn't hold when $r$ is a random process? Any help please?