I'm trying to derive a state space model for this circuit: -
simulate this circuit – Schematic created using CircuitLab
The circuit contains four energy storing elements, but is only of third order because \$L_3\$ is not sitting in a peripheral branch. Therefore, I understand that I need 3 state variables. I define these as
$$x_1 = i_1 \\ x_2 = i_2 \\ x_3 = V_o \\ $$
However, when I try to find the associated differential equations for these state variables \$L_3\$ is causing me trouble. Writing mesh equations and using that \$i_3 = i_2 - C_1\dot{x_3}\$ yields
$$\begin{cases} -V_\text{in} + \dot{x_1}L_1+x_1R_1+\color{red}{L_3(\dot{x_1}-\dot{x_2})} = 0 \\ \\ \dot{x_2}L_2+x_2R_2+x_3+ \color{red}{L_3(\dot{x_2}-\dot{x_1})} = 0 \\ \\ -x_3+i_3R_3 = -x_3+R_3(x_2-C_1\dot{x_3})=0\end{cases} $$
The red terms in the equations are what is causing me trouble, because to find the associated differential equations it requires that only one of the state variables are differentiated. Both as can be seen, two of the state variables are differentiated.
How can I tackle this problem?