# Circuits with Kirchhoff's rules

1. Apr 3, 2004

### SparkimusPrime

(see attached for circuit diagram)

E1 = 40V
E2 = 300V
E3 = 80V
r1 = 200 ohm
r2 = 80 ohm
r3 = 20 ohm
r4 = 70 ohm

I've come up with some very ugly equations to express the current flow across various parts of the circuit, as follows:

I_1 = I_5 + I_6
I_3 = I_1 + I_2

I_3 = (-I_5*r1 - E3) / r4
I_2 = (I_5*r1 - E2) / r3
I_6 = (I_5*r1 + E1) / r2
I_5 = (I_2*r3 + E2) / r1

I realize that I'll have to solve this system of simultaneous equations in order to find the values that I need to answer the problem. The problem is that the scale of the problem defeats my ability to do the algebra, so I need to let my calculator do all of the hard work. I have a TI-89, I assume I'll need to edit a matrix of some sort, but I don't know how, with this calculator.

Thanks.

Peter

#### Attached Files:

• ###### Homework 8 - Problem 7.JPG
File size:
6.1 KB
Views:
135
2. Apr 3, 2004

Actually, if you have a TI-89, you don't need to use a matrix. You can use the solve() function.

solve(eq1 and eq2 and ... eqn, var)

Keep in mind that the "and"s must be ands. You can get them from 2nd:5(math) \ 8:Test \ 8: and.

But you'd probably like life a lot more if you used a matrix. You can either input the matrix manually, i.e.

[[a_11,a_12,a_13,...,a_1n][a_21,a_22,...][...]]->var

and then operate on the variable afterwords,

rref(var)

or you can operate on the matrix right off the bat,

rref([[a_11,a_12,a_13,...,a_1n][a_21,a_22,...][...]])

Additionally, you can use the built-in matrix editor via

Apps\6:Data/Matrix Editor

to manipulate the entries in the matrix and then operate on it later.

rref() can be found in 2nd:5(math) \ 4:Matrix \ 4:rref

3. Apr 3, 2004

### SparkimusPrime

Ok, I took your advice cookie, I tried to enter the equations in the solver (as I'm rusty on my matrixes), here is what I entered:

(for convenience I assigned my difficult to enter variables to single letters easily accessible on the calculator keypad:

I_1 = a
I_2 = b
I_3 = c
I_5 = d
I_6 = e

As well as substituted the values of r's and E's for their numerical values to save typing. As you can see 'a' becomes rather superfluous, I didn't bother to eliminate it from the solve.
)

solve(a = d+e and c= a+b and e = ((200*d + 40)/80) and d = ((20*b+300)/200) and
b = ((200*d-300)/20) and c=((-200*d-80)/70), [variable I'm solving for goes here])

This entry however did not produce the correct results:

b = -6.834 c = -3.476 d = .8166 e = 2.541

b = 8 c = 4 d = 1 e = 3

The answers are similar, they are not wildly different (taking into account that the magnitude's of the answers is all that matter with Kirchhoff's rules) and the seeming exactness of the supplied answers makes me suspicious that they were rounded or some such. So can anyone see a flaw in my solve command? Or am I, in fact, correct and the answers supplied are rounded.

4. Apr 3, 2004

What are the values of the r's and the E's?

5. Apr 3, 2004

### Jacob Chestnut

I like to use matrix algebra to solve these types of problems.

[[a,b,c][d,e,f][g,h,i][j,k,l]]
These are the constants that multiply your various currents. you should get a four row by three column matrix from this input.

Then enter:
[[w][x][y][z]]
This will give you a column vector. These are the voltage values you get when you sum all the voltages in your given loop, and then move them so they are on the opposite side of the equality from the currents.

Go to "Math" which is the second function on the number five. Go to matrix (4). Go to augment (7). Then you will enter augment([[a,b,c][d,e,f][g,h,i][j,k,l]], [[x][y][z]]), which will give you the four by four matrix you seek. Then go back to matrix and select rref to reduce your matrix. The values on the last column are of course your currents.

This may or may not be an easier method than solving these equations as a system, but it seems more agreeable to me.

Regards,
Jacob

6. Apr 3, 2004

### SparkimusPrime

here are the values I substituted as well as the equations I used in the solve:

7. Apr 3, 2004

Maybe you made a mistake in modeling it?

8. Apr 3, 2004

### SparkimusPrime

Jacob Chestnut:

The constants? I have said equations (see above) should my input be of the form:

c=((-200*d-80)/70)

-200, 80, 70

Or:

c + 20/7d = -8/7

1, 20/7, -8/7

(I had some additional help that counseled me to solve for the variables then input the constants into my matrix as such)

I have no clear understanding of what this means:

[[a,b,c][d,e,f][g,h,i][j,k,l]]

Column vector? What does this mean? [[w][x][y][z]].

([[a,b,c][d,e,f][g,h,i][j,k,l]], [[x][y][z]])?

I want a four by four matrix?

What is rref() and what is reduction?

9. Apr 3, 2004

### SparkimusPrime

I'm going to assume I didn't make any mistakes in modeling the circuit. I've done two other problems similar to this and I'm confident that I've ironed out my misconceptions about modeling the circuits, if not my difficulty with the algebra involved in solving said systems of equations.

10. Apr 3, 2004

If you're confident that you modeled it correctly, then your calculator correctly solved the system of equations.

$$\left( \begin{array}{ccc} a & b & c \\ d & e & f \\ g & h & i \\ \end{array} \right)$$

would be input into the calculator as

[[a,b,c][d,e,f][g,h,i]]

rref() manipulates the matrix into reduced row-echelon form, something like

$$\left( \begin{array}{ccc|c} 1 & 0 & 0 & 5 \\ 0 & 1 & 0 & 2 \\ 0 & 0 & 1 & -8 \\ \end{array} \right)$$

from which you can read the solution, in this case, x = 5, y = 2, z = -8.

What Jacob was trying to get you to do was put your variables' coefficients on one side and into one square matrix, and then put what they equal on the other side of the equations and put those into a column matrix, something like

$$\begin{array}{ccccccc} 2x& + & 5y & + & 8z & = & 5 \\ 12x& + & -5y & + & 1z & = & 2 \\ -8x & + & 4y & + & 6z & = & -8 \\ \end{array}$$

which is equivalent to

$$\left( \begin{array}{ccc} 2 & 5 & 8 \\ 12 & -5 & 1 \\ -8 & 4 & 6 \\ \end{array} \right) \left( \begin{array}{c} x \\ y \\ z \end{array} \right) = \left( \begin{array}{c} 5 \\ 2 \\ -8 \end{array} \right)$$

which is solved by the procedure he mentioned, i.e. using rref(coefficient matrix, value matrix).

Last edited: Apr 3, 2004
11. Apr 3, 2004

### SparkimusPrime

So (using my limited knowledge of matrixes) my equations should be solved so they look like this:

a = d+e
c= a+b

c = b+d+e
c-b-d-e = 0

e = ((200*d + 40)/80)

e - 5/2*d = 1/2

d = ((20*b+300)/200)

d - b/10 = 3/2

b = ((200*d-300)/20)

b - 10d = 15

c=((-200*d-80)/70)

c + 20/7*d = -8/7

so my matrix should look like:

b - 10d = 15
c + 20/7*d = -8/7
-b/10 + d = 3/2
-5/2*d + e = 1/2
c-b-d-e = 0

1 0 -10 0 15
0 1 20/7 0 -8/7
-1/10 0 1 0 3/2
0 0 -5/2 1 1/2
-1 1 -1 -1 0

Where the first column is the 'b' the second 'c' and so on 'd', 'e' and the constants.

Is this the correct interpretation of the equations in matrix form?

12. Apr 3, 2004

Actually, I need to revise my previous statements. I screwed up a bit.

rref() operates on only one matrix, which must be in the form

$$\left( \begin{array}{cccc}2 & 5 & 8 & -5 \\12 & -5 & 1 & -2 \\-8 & 4 & 6 & 8 \\\end{array} \right) \left( \begin{array}{c} x \\ y \\ z \\ 1 \end{array} \right) = \left( \begin{array}{c} 0\\ 0\\ 0\end{array} \right)$$

So you must put the system of equations

$$\begin{array}{ccccccccc}2x& + & 5y & + & 8z & + & -5 & = 0 \\12x& + & -5y & + & 1z & + & -2 & = 0 \\-8x & + & 4y & + & 6z & + & 8 & = 0 \\\end{array}$$

into a matrix.

So you're doing fine, except each element in the last column of your matrix is short a negative sign.

Once you have that, call rref() on the matrix you just made. The second argument in rref() is the tolerance, and you don't need to worry about it. Just don't include it.

For example, you'd use

$$rref(\left( \begin{array}{cccc}2 & 5 & 8 & -5 \\12 & -5 & 1 & -2 \\-8 & 4 & 6 & 8 \\\end{array} \right) )$$
input as rref([[2,5,8,-5][12,-5,1,-2][-8,4,6,8]]),

to solve my example system.