State Space model for three-loop circuit
The way this is generally done is to get the equations into a matrix form (or solve them). 

\$\dot{x} =A x+ Bu\$

and since the state would be the loop currents, we have \$[\dot{x}]_j=\frac{di}{dt}\$

\$\begin{bmatrix} \frac{di_1}{dt} \\ \frac{di_2}{dt} \\ \frac{di_3}{dt} \end{bmatrix}= A \begin{bmatrix} i_1 \\ i_2\\ i_3 \end{bmatrix}+ Bu\$

The matrix coefficients are the same for fly speck or differential notation.

$$
 2\frac{di_{1}}{dt} - 2\frac{di_{2}}{dt} + 0\frac{di_{3}}{dt}  = -i_{1} + 0i_{2} +0i_{3}   +v_{i}(t)
$$
$$
2\frac{di_{1}}{dt} - 3\frac{di_{2}}{dt} + \frac{di_{3}}{dt} = 0i_{1}+ 3i_{2}+0i_{3} 
$$
$$
0\frac{di_{1}}{dt} + \frac{di_{2}}{dt} - \frac{di_{3}}{dt}  = 0i_{1}+0i_{2} +  i_{3} + v_{o}(t)
$$

You can represent a matrix form from the above equations:

\$\begin{bmatrix} 2 &amp; -2 &amp; 0 \\ 2&amp;-3&amp;1 \\ 0&amp;1&amp;-1 \end{bmatrix}\dot{x}=
\begin{bmatrix} -1&amp; 0&amp; 0 \\0&amp;3&amp;0 \\0 &amp;0&amp;1  \end{bmatrix}x+ \begin{bmatrix} v_{i}(t) \\ 0\\v_{o}(t)  \end{bmatrix}\$

You need to reduce the system of equations until you get this (all the differential equations are reduced, this form makes it easy to work with or use it for simulation), by using the inverse of the matrix

\$ T = \begin{bmatrix} 2 &amp; -2 &amp; 0 \\ 2&amp;-3&amp;1 \\ 0&amp;1&amp;-1 \end{bmatrix}\$

\$\begin{bmatrix} 1 &amp; 0 &amp; 0 \\ 0&amp;1&amp;0 \\ 0&amp;0&amp;1 \end{bmatrix}\dot{x}=
T^{-1} A x+ T^{-1} \begin{bmatrix} v_{i}(t) \\ 0\\v_{o}(t)  \end{bmatrix}\$

if you substituted the variables back in it would look like this:

\$\begin{bmatrix} \frac{di_1}{dt} \\ \frac{di_2}{dt} \\ \frac{di_3}{dt} \end{bmatrix}= T^{-1} A \begin{bmatrix} i_1 \\ i_2\\ i_3 \end{bmatrix}+ T^{-1} \begin{bmatrix} v_{i}(t) \\ 0\\v_{o}(t)  \end{bmatrix}\$