Kirchhoff's current law with a nonlinear resistor It is said that by Kirchhoff's current law
$$
\frac{e - v_c}{R_1} = c\frac{dv}{dt} + f(v_c) + i\tag{1}
$$ 
and from Kirchhoff's voltage law
$$
v_c(t) = iR_2 + L\frac{di}{dt}\tag{2}
$$
from the following diagram:

It is easy to see equation (2) but I dont see how equation (1) was obtained.
 A: Kirchhoff's current law says that the current entering any junction is equal to the current leaving that junction.
The current through $R_1$ must therefore add up to the current through the three legs of the circuit.
$$ I_{\mathrm{R}_1} = I_{\mathrm{cap}} + I_{\mathrm{nonlinear\ R}} + I_{\mathrm{R}_2} $$
Using the terms in the diagram, two of these already have an explicit label:
$$I_{\mathrm{nonlinear\ R}} = f(v_c)$$
$$I_{\mathrm{R}_2} = i $$
So we only have two other currents that need to be written in terms of the other defined variables in the diagram.
The voltage drop across $R_1$ is $e - v_c$ (the battery minus the capacitor voltage).  So the current through that resistor is
$$ I_{\mathrm{R}_1} = \frac{e - v_c}{R_1} $$
The charge on a capacitor is related to the voltage across it by $Q = C V$.  So the current through the capacitor is: 
$$I_{\mathrm{cap}} = \frac{dQ}{dt} = C \frac{d}{dt} v_c $$
Putting that all together gives:
$$\frac{e - v_c}{R_1} = c\frac{dv_c}{dt} + f(v_c) + i$$
A: Kirchhoff's Voltage Law states that the voltage around a closed mesh or loop is zero. In this case, taking an 'imaginary loop current', $i$ around the 'central' mesh in your circuit, you get:
$$v_c(t)-v_{R2}(t)-v_L(t)=0$$
where $v_{R2}(t)$ and $v_L(t)$ are the voltage drop across the variable resistor $R_2(t)$ and inductor $L$, respectively.

I'll leave the rest to you.
