Assignment 3
Beatrice Mossberg
Problem 1
Given the circuit represented in the figure below, calculate:
a) The current going through and . (10 points)
R1 R2
System of equations:
file:///Users/bestricemossberg/Downloads/module_3 (2).html 1/6
, 2022-03-20 19:16 module_3
I1 (45) + I2 (−10) + I3 (20) = 0
I2 = 0.1
I 1(20) + I2 (5) + I3 (25) = 15
In [13]:
import numpy as np
from numpy.linalg import solve
#Solve the system of equations
A=np.matrix('45,-10,20;0,1,0;20,5,25')
b=np.matrix('0;0.1;15')
x=solve(A,b)
print(x)
[[-0.36551724]
[ 0.1 ]
[ 0.87241379]]
In [14]:
I1=-0.36551724
I2=0.1
I3=0.87241379
IR1=I1-I2
IR2=I2+I3
print(round(IR1, 4), "A")
print(round(IR2, 4), "A")
-0.4655 A
0.9724 A
The current through R1 is approximately -0.47 A in a counter clockwise direction toward
node c and 0.47 A in a clockwise direction away from node c.
The current through R2 is approximately 0.97 A in a counter clockwise direction toward node
A.
b) The electric potential measured at node C. (5 points)
file:///Users/bestricemossberg/Downloads/module_3 (2).html 2/6