When X follows dXt=μt dt+σt dWtdX_t = \mu_t\,dt + \sigma_t\,dW_t, the change in f is the usual terms in time and X plus the term 12σt2 ∂2f/∂x2\tfrac{1}{2}\sigma_t^2\,\partial^2 f/\partial x^2 multiplied by dtdt. This term arises because the square of a Brownian increment is replaced by dtdt.

For example, if f=ln⁡Sf = \ln S and dSt=μSt dt+σSt dWtdS_t = \mu S_t\,dt + \sigma S_t\,dW_t, the drift of ln⁡S\ln S is μ−σ2/2\mu - \sigma^2/2. Consider a hypothetical example in which μ=5%\mu = 5\% and σ=20%\sigma = 20\%. The drift is 0.05−0.04÷2=0.030.05 - 0.04 \div 2 = 0.03.

If the function is linear, the extra term is 0 and the result is the same as the ordinary chain rule. The derivation and worked examples are on the related article page.