# Hull White 1 Factor Formulas with Time Dependent Variables

In John Hull's "Options Futures and Other Derivatives" I see that bond prices in Hull White 1 Factor model are specified as the following:

$$P(t,T) = A(t,T)e^{-B(t,T)r(t)}$$

where

$$B(t,T) = \frac{1 - e^{-a(T-t)}}{a}$$

$$lnA(t,T) = ln\frac{P(0,T)}{P(0,t)} + B(t,T)F(0,t) - \frac{1}{4a^3}\sigma^2(e^{-aT} - e^{-at})^2(a^{2at} - 1)$$

Am I correct in thinking that these formulas only work if $$a$$ and $$\sigma$$ are constant?
If so, what formulae should I be using if $$a(t)$$ and $$\sigma(t)$$ are time dependent? I have seen some references to integration, but I can't find a source material (that I trust) which spells out the appropriate core formulae which should be integrated over.

Edit: Alternatively, after looking at my own question... should I create a set of forward rates using $$P(t_i,t_j)$$ where $$t_i$$ and $$t_j$$ are "knots" on a piecewise-continuous linear function for $$a(t)$$ and $$\sigma(t)$$?

Then with those forward rates I can discount my zero-coupon bonds etc?

In [Andersen & Piterbarg (2010)] on pages 415-417 the so-called General One-Factor Gaussian Short Rate Model is described, where the short rate is assumed to follow SDE $$dr(t)=\kappa(t)(\theta(t)-r(t))dt+\sigma_r(t)dW(t)$$ The formula for $$P(t,T)$$ involves integration over the time-dependent variables as you correctly suggested. They arrive at the formula by utilising that the model is a special case of the Heath-Jarrow-Morton framework.