# How does Kirchhoff's voltage law relate to the spatial derivative of voltage?

I'm reading this libretexts article on the basics of transmission line theory. In it, they include this circuit diagram as a model of a uniform transmission line: They then say that applying Kirchhoff's laws results in

$$\frac{∂v(z,t)}{∂z}=−R\cdot i(z,t)−L\cdot\frac{∂i(z,t)}{∂t}.$$

I don't quite understand how they get that though. KVL (which I assume is what they're using to get the voltage equation; they also give a separate equation for current) just says that the sum of the voltages in a circuit loop is zero. So, how would it tell us anything about the spatial derivative of $$V$$, as opposed to $$V$$ itself? It would make more sense if they just had the sum of the voltages in the first loop equal to zero and then took the derivative, w.r.t. z, of each term, but that doesn't seem to be what they're doing. They only include terms from the resistor and inductor on the top of the leftmost loop, not including the voltage of the other resistor at all, and they don't even actually take the spatial derivatives of the two voltages they do include.

So what's going on here? How does that DE for voltage correspond to that circuit diagram? Applying Kirchhoff's voltage law to the loop marked in red, we get: $$-V(z,t) + R\ \Delta z\ I(z,t) + L\ \Delta z\ \frac{\partial I(z,t)}{\partial t} + V(z+\Delta z,t) = 0$$

Reordering the terms gives $$\underbrace{V(z+\Delta z,t)-V(z,t)}_{\frac{\partial V(z,t)}{\partial z}\Delta z} = - R\ \Delta z\ I(z,t) - L\ \Delta z\ \frac{\partial I(z,t)}{\partial t}$$ and finally dividing by $$\Delta z$$ and taking the limit $$\Delta z\to 0$$ gives $$\frac{\partial V(z,t)}{\partial z} = - R\ I(z,t) - L\ \frac{\partial I(z,t)}{\partial t}$$

They're skipping a step, with the expectation that you'll pick it up on your own or that the lecturer will.

They show you an approximate circuit for that stretch of cable $$\Delta z$$; the KVL for that stretch of cable is:

$$\frac{v(z + \Delta z, t) - v(z, t)}{\Delta z} = − R \cdot i(z,t)− L\cdot \frac{d i(z,t)}{d t}$$. I can't remember the typical notation, but just take $$R = \Delta z \rho$$ and $$L = \Delta z l$$, where $$\rho$$ and $$l$$ are the resistance per unit length and inductance per unit length (and, as an exercise, look in your book and see what they really are!)

Now wave your hands* and take the limit as $$\Delta z \to \partial z$$. Then you get your original equation:

$$\frac{\partial v(z,t)}{\partial z}=−R\cdot i(z,t)−L\cdot\frac{\partial i(z,t)}{\partial t}$$

* I'm sure there's a more formal way to do this -- but either I have forgotten since I learned it in 1984, or since it was an EE class, they never taught it to me.

How does that DE for voltage correspond to that circuit diagram?
Look at the diagram carefully and then I hope that you realise that $$R$$ is the resistance per unit length and $$L$$ is the inductance per unit length.

Thus applying KVL for a section of length $$\Delta z$$ yields,

$$\Delta v(z,t)=−(R\,\Delta z)\cdot i(z,t)−(L\,\Delta z)\cdot\frac{∂i(z,t)}{∂t}$$ and the result follows.