# mesh current discrepancy in demystified circuit analysis book Find I1, I2, I3.

So I setup the mess equations:

\begin{aligned}\text{mesh1: } & -20 + 10I_1 + 4(I_1-I_3) + 8 +6(I_1-I_2) + 6 = 0 \\ \\ \text{mesh2: } & -6 + 6(I_2-I_1) + 2(I_2-I_3) + 2 + 6I_2 + 2= 0 \\ \\ \text{mesh3: } &~ 2I_3 + 6 -2 + 2(I_3-I_2) - 8 + 4(I_3-I_1)=0\end{aligned}

Then I simplify them to this system of equations:

$$\begin{bmatrix}20 & -6 & -4 \\ -6 & 14 & -2 \\ -4 & -2 & 8 \end{bmatrix}\begin{bmatrix}I_1 \\ I_2 \\ I_3\end{bmatrix} = \begin{bmatrix}6 \\ 2 \\ 4 \end{bmatrix}$$

then using "system-solve" button on my calculator I find that solution for 3x3 system is:

$$\begin{matrix}I_1 = 664~mA & I_2 = 567~mA & I_3 = 994~mA\end{matrix}$$

I double checked the above exercise 3 times....

Here's the part I don't get... when i simulate this circuit online I get a discrepancy on current $I_3$ see below: Then, I look at the key in the back of the book it has a discripency on a different current (ignoring that they only save 2 significant digits). Book key says:

$$\begin{matrix}I_1 = 660~mA & I_2 = 550~mA & I_3 = 970~mA\end{matrix}$$

So who's wrong and who's right?

• Your $I_3$ is wrong. The simulator is right.
– jonk
Jan 7, 2020 at 18:31
• next question, why is my $I_3$ wrong? Did I not setup the mesh equations correctly? If Not, then what's the correct way to set them up.
– pico
Jan 7, 2020 at 18:33
• I guess not. I just hand typed my own very quickly into a solver. I got it right. So there is a difference. I just haven't bothered tracking around in your examples for it. But I think it relates to the signs you are using, as they are very different from mine. I'd be happy to post what I did and let you look.
– jonk
Jan 7, 2020 at 18:34
• was just trying to track the mistake when setting up mess equations since i have only one example to go by,,,, if you have working equations for the setup, I would like to compare signs... thanks.
– pico
Jan 7, 2020 at 18:37
• Hopefully, that helps. I didn't do the loops in the same order. But that doesn't matter. And I always started each loop in the lower left-hand corner.
– jonk
Jan 7, 2020 at 18:46

I set up the following loops, always starting the lower left-hand corner of each:

\begin{align*} 0\:\text{V}-2\:\Omega\cdot I_3-6\:\text{V}+2\:\text{V}-2\:\Omega\left(I_3-I_2\right)+8\:\text{V}-4\:\Omega\left(I_3-I_1\right)&=0\:\text{V}\\\\ 0\:\text{V}+20\:\text{V}-10\:\Omega\cdot I_1-4\:\Omega\left(I_1-I_3\right)-8\:\text{V}-6\:\Omega\left(I_1-I_2\right)-6\:\text{V}&=0\:\text{V}\\\\ 0\:\text{V}+6\:\text{V}-6\:\Omega\left(I_2-I_1\right)-2\:\Omega\left(I_2-I_3\right)-2\:\text{V}-6\:\Omega\cdot I_2-2\:\text{V}&=0\:\text{V} \end{align*}

I then created three equations and solved for three unknowns:

a1=solve([e1,e2,e3],[i1,i2,i3])
{i1: 129/194, i2: 55/97, i3: 189/194}


That's it.

Oh, may as well print out the decimal values:

for x in a1: x, a1[x].n()
(i3, 0.974226804123711)
(i2, 0.567010309278350)
(i1, 0.664948453608247)


Your mesh equations and deduced matrix are correct.

$$\begin{bmatrix}20 & -6 & -4 \\ -6 & 14 & -2 \\ -4 & -2 & 8 \end{bmatrix}\begin{bmatrix}I_1 \\ I_2 \\ I_3\end{bmatrix} = \begin{bmatrix}6 \\ 2 \\ 4 \end{bmatrix}$$

In case you don't have a computer, or you don't trust it, using matrix elimination to solve three equations with three unknowns:
$$\begin{bmatrix}20 & -6 & -4 & 6 \\ -6 & 14 & -2 & 2 \\ -4 & -2 & 8 & 4 \end{bmatrix}$$

dividing each row by 2 $$\begin{bmatrix} 10 & -3 & -2 & 3 \\ -3 & 7 & -1 & 1 \\ -2 & -1 & 4 & 2 \end{bmatrix}$$

row1 = row1 + 2*row2 + 2*row3 $$\begin{bmatrix} 0 & 9 & 4 & 9 \\ -3 & 7 & -1 & 1 \\ -2 & -1 & 4 & 2 \end{bmatrix}$$

row2 = 2*row2 -3*row3 $$\begin{bmatrix} 0 & 9 & 4 & 9 \\ 0 & 17 & -14 & -4 \\ -2 & -1 & 4 & 2 \end{bmatrix}$$

row2 = 2*row2 + 7*row1 (in order to eliminate the third row) $$\begin{bmatrix} 0 & 9 & 4 & 9 \\ 0 & 97 & 0 & 55 \\ -2 & -1 & 4 & 2 \end{bmatrix}$$

row1 = row1 - row3 (in order to eliminate the third row) $$\begin{bmatrix} 2 & 10 & 0 & 7 \\ 0 & 97 & 0 & 55 \\ -2 & -1 & 4 & 2 \end{bmatrix}$$

row1 = 97*row1 - 10*row2 $$\begin{bmatrix} 194 & 0 & 0 & 129 \\ 0 & 97 & 0 & 55 \\ -2 & -1 & 4 & 2 \end{bmatrix}$$

row3 = 97*row3 + row1 + row2 $$\begin{bmatrix} 194 & 0 & 0 & 129 \\ 0 & 97 & 0 & 55 \\ 0 & 0 & 388 & 378 \end{bmatrix}$$

This yields: $$I_1 = 129/194$$ $$I_2 = 55/97$$ $$I_3 = 378/388=189/194$$