I have a circuit for a resistor \$ R \$, inductor \$ L \$, capacitor \$ C \$. I also have two sources of power, \$ u_1(t) \$ and \$ u_2 \$. My task is to set up a state equation for the circuit, and I am able to see that state equations naturally spring up from KCL and KVL equations through the derivatives of capacitor voltage and inductance current (which I will denote \$ x_1 \$ and \$ x_2 \$ respectively).
Here's how I am approaching the problem.
KVL for Loop 1 (\$ u_1, L, R \$):
$$ L\dot{x}_2 + v_R(t) - u_1(t) = 0 $$
KVL for Loop 2 (\$ u_2, C, R \$):
$$ x_1 + u_2(t) - v_R = 0 $$
I'm stuck here as I have no idea whether my KVL equation is correct. I also am not sure about my KCL equations - I don't know where to start. I would greatly appreciate if somebody can give me some help to understand the approach to and intuition behind answering questions of these types.
Thanks a lot.
