Find all the Kirchhoff's circuit equations in a multiple batteries circuit
Well, we have the following circuit:







simulate this circuit &ndash; Schematic created using CircuitLab

I used Mathematica to solve this circuit. The code I used is the following:

FullSimplify[
 Solve[{I1 == I6 + I5, I6 + I2 + I9 == 0, I8 == I2 + I1, 
   I9 == I3 + I4, I3 + I8 + I7 == 0, I4 == I7 + I5, 
   I1 == (V5 - V6)/R1, I2 == (V4 - V6)/R2, I3 == (V4 - V6)/R3, 
   I4 == V4/R4, I5 == -V8/R5, V5 - V8 == V1, V5 - V4 == V2, 
   V6 == V3}, {I1, I2, I3, I4, I5, I6, I7, I8, I9, V4, V5, V6, V8}]]


Using your values, I ran the following code:

FullSimplify[
 Solve[{I1 == I6 + I5, I6 + I2 + I9 == 0, I8 == I2 + I1, 
   I9 == I3 + I4, I3 + I8 + I7 == 0, I4 == I7 + I5, I1 == (V5 - V6)/5,
    I2 == (V4 - V6)/7, I3 == (V4 - V6)/4, I4 == V4/2, I5 == -V8/10, 
   V5 - V8 == 2, V5 - V4 == 4, V6 == 6}, {I1, I2, I3, I4, I5, I6, I7, 
   I8, I9, V4, V5, V6, V8}]]


And it gave me the following result:

{{I1 -&gt; 24/835, I2 -&gt; -(92/167), I3 -&gt; -(161/167), I4 -&gt; 179/167, 
  I5 -&gt; -(346/835), I6 -&gt; 74/167, I7 -&gt; 1241/835, I8 -&gt; -(436/835), 
  I9 -&gt; 18/167, V4 -&gt; 358/167, V5 -&gt; 1026/167, V6 -&gt; 6, 
  V8 -&gt; 692/167}}


Which can be approximated as follows:

{{I1 -&gt; 0.0287425, I2 -&gt; -0.550898, I3 -&gt; -0.964072, I4 -&gt; 1.07186, 
  I5 -&gt; -0.414371, I6 -&gt; 0.443114, I7 -&gt; 1.48623, I8 -&gt; -0.522156, 
  I9 -&gt; 0.107784, V4 -&gt; 2.14371, V5 -&gt; 6.14371, V6 -&gt; 6., 
  V8 -&gt; 4.14371}}