Example: Finding the current in a multiple loop, multiple battery circuit Example: Finding the current in a multiple loop, multiple battery circuit (complicated)
In this example I will show you how to find the current in a complicated circuit like you did in lab 4. I will use Kirchoff's Laws to write a set of equations which uniquely describes the current at each junction and the voltage drop around each loop. I will then show some more advanced mathematical techniques to solve that system of equations. Although the circuit I do here is more complicated than that done in lab, the approach to solving it is exactly the same--the only difference is that by making the circuit more complex, it is necessary to write several more equations. This makes solving the system of equations correspondingly more difficult.

Before starting, here are Kirchoff's Laws:
1) The sum of currents entering a junction is the sum of currents leaving a junction.
2) The voltage drops over a closed loop in a circuit sum to zero.

So, consider the following circuit:

This is much like the circuit from lab with the addition of another branch in parallel. Importantly, this additional branch adds two junctions to the lab circuit.

Step 1: Make reasonable and consistent guesses for the direction of current over each resistor
Before doing the analysis of the circuit, there is no good way to determine which direction current will flow in each branch. You must guess--but you only have two choices. If you happen to guess wrong, the answer you compute at the end will be negative but the will have the same magnitude, so a wrong guess has no real consequences. Below, I've drawn in arrows to show which way I think current will flow.

Step 2: Write down equations describing the current at each junction (Rule 1)
There are four junctions in this circuit, which I have marked A, B, C, D. Each has three currents present, and I have to write an equation for each. These equations are fairly simple:

Junction A: I1=I3+I4
Junction B: I4=I5+I6
Junction C: I2=I3+I5
Junction D: I1=I2+I6

Step 3: Write down equations describing the change in voltage for closed loops in the circuit.
Here the analysis will become complicated. In the lab circuit, there were only three loops you could draw. Only two of these were drawn in the lab book (the third would have been a loop around the exterior of the circuit). In this particular circuit, there are actually seven unique closed loops you can make. I will write the loop equation for each; the particular loop is highlighted with red. Important: not all of these equations will be used. Only a certain number of them are required, subject to several conditions.

Things to pay careful attention to:
1) Direction of travel across resistors relative to guessed direction shown by current arrows
2) Direction of travel over batteries

In the following loops, I will traverse in the clockwise direction, mainly because that aligns with the direction I picked for the currents.
 Loop 1: &epsilon1-I1R1-I4R4-I6R6=0 Loop 2: &epsilon2+I6R6-I5R5-I2R2=0 Loop 3: &epsilon1-I1R1-I4R4-I5R5-I2R2+&epsilon2=0 Loop 4: &epsilon1-I1R1-I3R3-&epsilon3-I2R2+&epsilon2=0 Loop 5: -&epsilon3+I5R5+I4R4-I3R3=0 Loop 6: &epsilon1-I1R1-I3R3-&epsilon3+I5R5-I6R6=0 Loop 7: &epsilon2+I6R6+I4R4-I3R3-&epsilon3-I2R2=0

Summarizing, the loop equations (in slightly rearranged form) are:
1) -I1R1-I4R4-I6R6=-&epsilon1
2) -I2R2-I5R5+I6R6=-&epsilon2
3) -I1R1-I2R2-I4R4-I5R5=-&epsilon1-&epsilon2
4) -I1R1-I2R2-I3R3=&epsilon3-&epsilon1-&epsilon2
5) -I3R3+I4R4+I5R5=&epsilon3
6) -I1R1-I3R3+I5R5-I6R6=&epsilon3-&epsilon1
7) -I2R2-I3R3+I4R4+I6R6=&epsilon3-&epsilon2

UGLY!

Solving for the current
Combined with the junction equations, these actually (over)specify the entire circuit. While its a lot of work to write down all of these equations, I actually don't need all of them; I only need three. This is because I can use three junctions equations, and since there are six unknown currents, I only have to use three loop equations. The condition for choosing which loop equations to use is that every element in the circuit must be described by at least one equation. You might wonder why I can't use all four junction equations. The reason is that two are of the form "I1=..." and I don't want to use both of those because it ultimately ends up giving nonsense answers. The rules for that, however, are arcane and you'll never have to worry about it.

There are any number of combinations of loops that will cover all of the elements. I chose what I thought were the simplest: 1, 2, and 5. I also use the equations from junctions A, B, and C. My final six equations are then:

1) -I1R1-I4R4-I6R6=-&epsilon1
2) -I2R2-I5R5+I6R6=-&epsilon2
3) -I3R3+I4R4+I5R5=&epsilon3
4) I1-I3-I4=0
5) I4-I5-I6=0
6) I2-I3-I5=0

In general, solving six simultaneous linear equations is difficult, which is why we have computers that are really good at doing linear algebra for us.

Warning, Math! (You can stop here if you want)
You might recall working with matrices in high school. In fact, the above system of equations can be rewritten as the matrix below. (Remember, matrices multiply the horizontal rows in the matrix against the column of Is on the right, generating the chosen loop and junctions equations.)

This equation is simply inverted to solve for the column with the currents, giving:

Of course, computing the inverse of a matrix is no easy task, but computers (much like physics students) have no soul and do not mind tedious mathematical jibberish. To aid calculation, I'll do like in the tutorials and say that all of the resistances are the same, and I'll pick 1Ω. I'll also say that &epsilon1 and &epsilon2 are 1.5 but &epsilon3 is 3. Putting these into the above equation and letting a computer do the calculation generates the answer for the currents.

I1=0.375
I2=0.375
I3=-0.75
I4=1.125
I5=1.125
I6=0

A brief check will verify that these satisfy the junction equations. The problem is now solved.