CHAPTER04:NETWORK THEOREM

Example E04 : Pg 224

In [4]:
                      # EXAMPLE 4-4        PG NO-224
#A=[1 1 0 0 0 1;0 -1 1 -1 0 0;-1 0 -1 0 -1 0];
#A1=[1 0 -1;1 -1 0;0 1 -1;0 -1 0;0 0 -1;1 0 0];
A1=2.;
A=6.;
print '%s %.2f' %('i) Numbers of trees  ([A*A**T]) is   =  ',16);
i) Numbers of trees  ([A*A**T]) is   =   16.00

Example E06 : Pg 228

In [1]:
             #   EXAMPLE 4-6           PG NO-228
I1=-2.59*10.**-3.;
I2=-1.45*10.**-3.;
IR1=I1;
print '%s %.2e %s' %('i) CURRENT  (IR1) is     from A  to B  =  ',IR1,' A ');
IR2=I2;
print '%s %.2e %s' %('ii) CURRENT  (IR2) is     from B  to E  =  ',IR2,' A ');
IR3=I1-I2;
print '%s %.2e %s' %('iii) CURRENT  (IR1) is     from B  to C  =  ',IR3,' A ');
IR4=I1;
print '%s %.2e %s' %('vi) CURRENT  (IR4) is     from C  to F  =  ',IR4,' A ');
IR5=I2;
print '%s %.2e %s' %('v) CURRENT  (IR1) is     from D  to C  =  ',IR5,' A ');
i) CURRENT  (IR1) is     from A  to B  =   -2.59e-03  A 
ii) CURRENT  (IR2) is     from B  to E  =   -1.45e-03  A 
iii) CURRENT  (IR1) is     from B  to C  =   -1.14e-03  A 
vi) CURRENT  (IR4) is     from C  to F  =   -2.59e-03  A 
v) CURRENT  (IR1) is     from D  to C  =   -1.45e-03  A 

Example E08 : Pg 230

In [2]:
                        # EXAMPLE 4-8            PG  NO-230-231
V=25.;
Vm=0.64;
Vn=3.05;
R1=5.;
R2=9.64
I1=(V-R2)/R1
print '%s %.2f %s' %('i) CURRENT  (I1) is       =  ',I1,' A ');
I2=R2/4;
print '%s %.2f %s' %('ii) CURRENT  (I2) is     =  ',I2,' A ');
I3=(R2-Vn)/10;
print '%s %.2f %s' %('iii) CURRENT  (I3) is     =  ',I3,' A ');
I4=(10-Vn)/8;
print '%s %.2f %s' %('vi) CURRENT  (I4) is     =  ',I4,' A ');
I5=Vn/2;
print '%s %.2f %s' %('v) CURRENT  (I5) is     =  ',I5,' A ');
i) CURRENT  (I1) is       =   3.07  A 
ii) CURRENT  (I2) is     =   2.41  A 
iii) CURRENT  (I3) is     =   0.66  A 
vi) CURRENT  (I4) is     =   0.87  A 
v) CURRENT  (I5) is     =   1.52  A 

Example E09 : Pg 232

In [3]:
                  # EXAMPLE 4-9      PG NO-232-233
#X=[40 -8 -20;-8 18 -6;-20 -6 36];
#Y=[24 -8 -20;0 18 -6;0 -6 36];
#Z=[40 24 -20;-8 0 -6;-20 0 36];
#U=[40 -8 24;-8 18 0;-20 -6 0]
I1=1.13;#det(Y/X);
print 'CURRENT = ',I1,' A'
I2=0.75;#det(Z/X);
print ' CURRENT = ',I2,' A'
I3=0.75;#det(U/X);
print ' CURRENT is = ',I3,' A'
IR3=I2;
print ' CURRENT is = ',IR3,' A'
IR4=0;
print ' CURRENT is = ',IR4,' A'
IR5=I1-I3;
print ' CURRENT is = ',IR5,' A'
IR6=I3;
print ' CURRENT is = ',IR6,' A'
CURRENT =  1.13  A
 CURRENT =  0.75  A
 CURRENT is =  0.75  A
 CURRENT is =  0.75  A
 CURRENT is =  0  A
 CURRENT is =  0.38  A
 CURRENT is =  0.75  A

Example E10 :Pg 233

In [5]:
                              # EXAMPLE 4-11      PG NO-233-234
I1=-1.28;
I2=-0.83;
I3=0.84;
IR1=-I1;                               # CURRENT THROUGH 2.2 RESISTANCE
print '%s %.2f %s' %('i) Current (IR1)   is     =  ',IR1,' A   from B to  A ');
IR2=-I1+I2;                               # CURRENT THROUGH 4.7 RESISTANCE
print '%s %.2f %s' %('ii) Current (IR2)   is     =  ',IR2,' A  from C to  B ');
IR3=-I2+I3;                               # CURRENT THROUGH 6.8 RESISTANCE
print '%s %.2f %s' %('iii) Current (IR3)   is     =  ',IR3,' A  from C to D ');
i) Current (IR1)   is     =   1.28  A   from B to  A 
ii) Current (IR2)   is     =   0.45  A  from C to  B 
iii) Current (IR3)   is     =   1.67  A  from C to D 

Example E12 : Pg 234

In [6]:
                 # Example 4-12  PG NO234-235
VA=60.866;
VB=19.13;
R=60.;
I60=(VA-VB)/R;
print '%s %.2f %s' %(' CURRENT is = ',I60,' A');
 CURRENT is =  0.70  A

Example E13 : Pg 235

In [7]:
                           # Example       4-13             PG NO-235
#X=[1 -0.5  2;-0.5 3.5 -4;-0.5 -1 0];
#X1=[2 -0.5 -0.5;-4   3.5 -1;0 -1 2.5 ]
#X2=[1 -0.5 -0.5;-0.5 3.5 -1;-0.5 -1 2.5];
D=2;
V=1.979*D-16.;#det([X1-X]/X2);                          # V=VA-VC
print '%s %.2f %s' %('i) VOLTAGE (V)   is     =  ',V,' V ');
I2=0.5*1.566;
print '%s %.2f %s' %('i) Current (I2)   is     =  ',I2,' A    ')
i) VOLTAGE (V)   is     =   -12.04  V 
i) Current (I2)   is     =   0.78  A    

Example E14 : Pg 236

In [8]:
                # EXAMPLE 4-14  PG NO-236
VA=61.38;
R1=60.;
R2=110.;
R3=25.;
V1=120.;
V2=40.;
V3=60.;
I120=(V1-VA)/R1;
print '%s %.2f %s' %(' CURRENT is = ',I120,' A');
I40=(VA+V2)/R2;
print '%s %.2f %s' %(' CURRENT is = ',I40,' A');
I60=(VA-V3)/R3;
print '%s %.2f %s' %(' CURRENT is = ',I60,' A');
 CURRENT is =  0.98  A
 CURRENT is =  0.92  A
 CURRENT is =  0.06  A

Example E16 : Pg 236

In [9]:
                 # EXAMPLE 4-16        PG NO-236-237;
VA=1.96;
VB=3.2;
IBA=(VB-VA)/2.;
print' CURRENT is = ',IBA,' A'
 CURRENT is =  0.62  A

Example E17 : Pg 237

In [10]:
                # EXAMPLE 4-17     PG NO-237
A=8.08;                      # POTENTIAL
B=7.942;                    # POTENTIAL
VAB=A-B;                  # POTENTIAL DIFFERENCE
print ' POTENTIAL DIFFERENCE is = ',VAB,' V'
 POTENTIAL DIFFERENCE is =  0.138  V

Example E19 : Pg 236

In [11]:
                         # EXAMPLE 4-19            PG NO-236
i1=11.06;
i2=5.34;
i3=1.907;
IPR=i2-i3;
print '%s %.2f %s' %(' CURRENT is = ',IPR,' A');
IRS=i2;
VRS=IRS*10**-3*15*10**3;
print '%s %.2f %s' %(' VOLTAGE is = ',VRS,' A');   
 CURRENT is =  3.43  A
 VOLTAGE is =  80.10  A

Example E21 : Pg 239

In [12]:
                      # EXAMPLE 4-21         PG NO-239
I1=4.46;
I2=9.46;
I3=10.;
I4=6.22;
V1=110.8;
IAB=I1
print '%s %.2f %s' %(' CURRENT is = ',IAB,' A');
ICD=I2;
print '%s %.2f %s' %(' CURRENT is = ',ICD,' A');
IFE=I3-I1;
print '%s %.2f %s' %(' CURRENT is = ',IFE,' A');
IDE=I2-I4;
print '%s %.2f %s' %(' CURRENT is = ',IDE,' A');
IHG=I4;
print '%s %.2f %s' %(' CURRENT is = ',IHG,' A');
I5=5*V1
print '%s %.2f %s' %(' CURRENT is = ',I5,' A');
 CURRENT is =  4.46  A
 CURRENT is =  9.46  A
 CURRENT is =  5.54  A
 CURRENT is =  3.24  A
 CURRENT is =  6.22  A
 CURRENT is =  554.00  A

Example E22 : Pg 239

In [13]:
                        # EXAMPLE 4-22           PG NO-239-240
R1=50.;
R2=20.;
R3=10.;
V1=50.;
V2=100.;
V=((V1/R1)+(V2/R2))/((1./50.)+(1./20.)+(1./10.));
print' Voltage is = ',V,' V'
 Voltage is =  35.2941176471  V

Example E23 : Pg 240

In [14]:
                     # EXAMPLE 4-23       PG NO-240
I1=-3./19.;
V=12.632;
I6=I1+1.;
print' CURRENT is = ',I6,' A'
 CURRENT is =  0.842105263158  A

Example E24 : Pg 240

In [15]:
                        # EXAMPLE 4-24     PG NO-240-241
I1=9.;
I2=2.5;
I3=2.;
IR3=I2-I3;
print '%s %.2f %s' %(' CURRENT is = ',IR3,' A');
V=13.5;
print '%s %.2f %s' %(' VOLTAGE is = ',V,' V');
 CURRENT is =  0.50  A
 VOLTAGE is =  13.50  V

Example E25 : Pg 241

In [16]:
                           # EXAMPLE 4-25         PG NO-241
   # 31-15I1-(I1-I2)+10V1=0
   # -10V1-(I2-I1)-4I2=0;
   # V1=31-5I1;
I1=5.;
print '%s %.2f %s' %('i) Current (I1)   is     =  ',I1,' A   ');
I2=-11.;
print '%s %.2f %s' %('ii) Current (I2)   is     =  ',I2,' A   ');
i) Current (I1)   is     =   5.00  A   
ii) Current (I2)   is     =   -11.00  A   

Example E28 : Pg 243

In [17]:
                            # EXAMPLE 4-28         PG  NO-243
I1=1.42;
I2=1.683;
I3=0.325;
Iba=I2-I1;
print '%s %.2f %s' %(' CURRENT is = ',Iba,' A');
Ibd=I1-I3;
print '%s %.2f %s' %(' CURRENT is = ',Ibd,' A');
Iac=I2;
print '%s %.2f %s' %(' CURRENT is = ',Iac,' A');
Icd=I3;
print '%s %.2f %s' %(' CURRENT is = ',Icd,' A');
 CURRENT is =  0.26  A
 CURRENT is =  1.09  A
 CURRENT is =  1.68  A
 CURRENT is =  0.33  A

Example E29 : Pg 243

In [18]:
                      # EXAMPLE 4-29             PG NO-243
I1=2.;                               # CURRENT
R=3.;                                # RESISTANCE
P=I1*I1*R;                            # POWER
print '%s %.2f %s' %(' POWER is = ',P,' W');
 POWER is =  12.00  W

Example E30 : Pg 244

In [19]:
                      # EXAMPLE 4-30           PG NO-244
I3=-0.882;
I=-I3;
print '%s %.2f %s' %(' CURRENT is = ',I,' A');
 CURRENT is =  0.88  A

Example E32 : Pg 245

In [20]:
                              # EXAMPLE 4-32        PG NO-245-246
Vb=4.55;
Vc=2.57;
Vd=3.165;
Iab=2.*(-Vb+9.);
print '%s %.2f %s' %(' CURRENT is = ',Iab,' A');
Ida=2.*Vd;
print '%s %.2f %s' %(' CURRENT is = ',Ida,' A');
Ibc=Vb-Vc;
print '%s %.2f %s' %(' CURRENT is = ',Ibc,' A');
Idc=Vd-Vc;
print '%s %.2f %s' %(' CURRENT is = ',Idc,' A');
Ibd=5.*(Vb-Vd);
print '%s %.2f %s' %(' CURRENT is = ',Ibd,' A');
Ica=Vc;
print '%s %.2f %s' %(' CURRENT is = ',Ica,' A');
 CURRENT is =  8.90  A
 CURRENT is =  6.33  A
 CURRENT is =  1.98  A
 CURRENT is =  0.60  A
 CURRENT is =  6.92  A
 CURRENT is =  2.57  A

Example E36 : Pg 250

In [21]:
                           # EXAMPLE 4-36         PG NO-250-251
I1=0.3;
I2=-1.1;
V1=2.*I1;
print '%s %.2f %s' %(' VOLTAGE is = ',V1,' V');
V2=2.*I2;
print '%s %.2f %s' %(' VOLTAGE is = ',V2,' V');
V3=-5.;
print '%s %.2f %s' %(' VOLTAGE is = ',V3,' A');
V4=-(2.*I1)+4.;
print '%s %.2f %s' %(' VOLTAGE is = ',V4,' V');
V5=2.8;
IAB=V4/2.;
print '%s %.2f %s' %(' CURRENT is = ',IAB,' A');
IAD=V5/2.;
print '%s %.2f %s' %(' CURRENT is = ',IAD,' A');
IAC=-V3/2.;
print '%s %.2f %s' %(' CURRENT is = ',IAC,' A');
IDB=V1/2.;
print '%s %.2f %s' %(' CURRENT is = ',IDB,' A');
IDC=-V2/2.;
print '%s %.2f %s' %(' CURRENT is = ',IDC,' A');
I=IAB+IAD+IAC-2.;
print '%s %.2f %s' %(' CURRENT is = ',I,' A');
 VOLTAGE is =  0.60  V
 VOLTAGE is =  -2.20  V
 VOLTAGE is =  -5.00  A
 VOLTAGE is =  3.40  V
 CURRENT is =  1.70  A
 CURRENT is =  1.40  A
 CURRENT is =  2.50  A
 CURRENT is =  0.30  A
 CURRENT is =  1.10  A
 CURRENT is =  3.60  A

Example E37 : Pg 251

In [22]:
                       # EXAMPLE 4-37           PG NO-251-252
I1=5.;
I2=2.;
I3=1.;
IAB=I1;
print '%s %.2f %s' %(' CURRENT is = ',IAB,' A');
IBE=I1-I2;
print '%s %.2f %s' %(' CURRENT is = ',IBE,'A');
IBC=I2;
print '%s %.2f %s' %(' CURRENT is = ',IBC,' A');
ICE=I2+I3;
print '%s %.2f %s' %(' CURRENT is = ',ICE,' A');
IDC=I3;
print '%s %.2f %s' %(' CURRENT is = ',IDC,' A');
 CURRENT is =  5.00  A
 CURRENT is =  3.00 A
 CURRENT is =  2.00  A
 CURRENT is =  3.00  A
 CURRENT is =  1.00  A

Example E38 : Pg 252

In [23]:
                            # EXAMPLE 4-38                PG NO-252-253
VB=15.;
VC=6.;
V=20.;
IAB=(V-VB)/1.;
print '%s %.2f %s' %(' CURRENT is = ',IAB,' A');
IBE=VB/IAB;
print '%s %.2f %s' %(' CURRENT is = ',IBE,' A');
IBC=(VB-VC)/4.5;
print '%s %.2f %s' %(' CURRENT is = ',IBC,' A');
ICE=VC/2.;
print '%s %.2f %s' %(' CURRENT is = ',ICE,' A');
IDC=1.;
print '%s %.2f %s' %(' CURRENT is = ',IDC,' A');
 CURRENT is =  5.00  A
 CURRENT is =  3.00  A
 CURRENT is =  2.00  A
 CURRENT is =  3.00  A
 CURRENT is =  1.00  A

Example E41 : Pg 254

In [24]:
                                # EXAMPLE-4-41        PG NO-254
I2=0.5;
I3=1.5;
R=11./3.;
V=I3*R;
print '%s %.2f %s' %(' VOLTAGE is = ',V,' V');
R1=20./9.;
Req=(R*R1)/(R+R1);
print '%s %.2f %s' %(' RESISTANCE is = ',Req,' ohm');
I=V/Req;
print '%s %.2f %s' %(' CURRENT is = ',I,' A');
 VOLTAGE is =  5.50  V
 RESISTANCE is =  1.38  ohm
 CURRENT is =  3.98  A

Example E43 : Pg 256

In [25]:
                   # EXAMPLE 4-43              PG NO-256-257
import numpy
#X=[[3, -1, -2],[6, -1, -2],[6, -5, -16]];
X=-18.;
print'det(X)= ', X
#X1=[[0, -1, -2],[80, -1, -2],[40, -5, -16]];
V1=26.6;#X1/X;
print'det(V1)= ', V1
#X2=[[3, 0, -2],[6, 80, -2],[6, 40, -16]];
V3=173.33;#X2/X;
print 'det(V3)= ',V3
#X3=[[3, -1, 0],[6, -1, 80],[6, -5, 40]];
V4=-46.66;#X3/X;
print 'det(V4)= ',V4
det(X)=  -18.0
det(V1)=  26.6
det(V3)=  173.33
det(V4)=  -46.66

Example E44 : Pg 257

In [26]:
                      # EXAMPLE 4-44                 PG NO 257    
                           # 6I1+14I2=20    I1-I2=-6
I1=-3.2;
I2=2.8;
print '%s %.2f %s' % ('i) Current(I1)   is     =  ',I1,' A '); 
print '%s %.2f %s' % ('Ii) Current (I2)   is     =  ',I2,' A ');
i) Current(I1)   is     =   -3.20  A 
Ii) Current (I2)   is     =   2.80  A 

Example E46 : Pg 258

In [27]:
                     # EXAMPLE 4-46           PG NO-258-259
import numpy
##X1=[[10, -104,-1j*200],[0, 205+1j*150]];
#X2=[[200+1j*200, -104-1j*200],[-104-1j*200, 205+1j*150]];
I1=0.051 + 2.42e-06j;#det(X1/X2);
#print numpy.linalg.det(X1/X2)
print ' Current is  in polar form= ',I1,' A'
#X3=[[200+1j*200, 10],[-104-1j*200, 0]];
#X4=[[200+1j*200, -104-1j*200],[-104-1j*200, 205+1j*150]];
I2=0.0406 + 0.0201j;#det(X3/X4);
#print numpy.linalg.det(X3/X4)
print ' Current is in polar form = ',I2,' A'
V=10.;                               # VOLTAGE
P=V*5.1*10.**-2.;                       # POWERE
print ' POWER is = ',P,' W'
 Current is  in polar form=  (0.051+2.42e-06j)  A
 Current is in polar form =  (0.0406+0.0201j)  A
 POWER is =  0.51  W

Example E47 : Pg 259

In [28]:
                              # EXAMPLE 4-47   PG NO259-260
I2=0;
x=1j*1500.;
y=30.+1j*30.;
V2=x/y;                    # VOLTAGE
print ' VOLTAGE is  in polar form = ',V2,' V'
 VOLTAGE is  in polar form =  (25+25j)  V

Example E48 : Pg 260

In [29]:
                        # EXAMPLE 4-48         PG NO-260
Vm=63.43+1j*33.38;
V=100.+1j*0;
V1=0+1j*50.;
R1=5.+1j*0;
R2=8.+1j*6.;
R3=12.+1j*16.;
I1=(V-Vm)/R1;
print 'i) Current (I1)   is     =  ',I1,' A '
I2=(V1-Vm)/R2;
print 'ii) Current (I2)   is     =  ',I2,' A '
I3=(Vm)/R3;
print 'iii) Current (I3)   is     =  ',I3,' A '
i) Current (I1)   is     =   (7.314-6.676j)  A 
ii) Current (I2)   is     =   (-4.0772+5.1354j)  A 
iii) Current (I3)   is     =   (3.2381-1.5358j)  A 

Example E49 : Pg 260

In [30]:
                             # EXAMPLE 4-49          PG NO  260-261
#Vm=[10 -0.25;1j*25  0.75+1j*0.5]/[0.45-1j*0.5 -0.25;-0.25 0.75+1j*0.5];
Vm=7.54+1j*23.58;#(10.6 + 12.5j, 4.14 + 1.42j, -31.2 + 27j, -2.03 + 11j);
print'i) Voltage (Vm)   is     =  ',Vm,' V '
#Vn=[0.45-1j*0.5 10;-0.25 0.75+1j*0.5]/[0.45-1j*0.5 10;-0.25 0.75+1j*0.5];
D=2;
Vn=1-1j*9.622*D-18;#(1 + -9.62e-18j, 1.79e-16 + 8.71e-18j, 0 + -0j, 1 + -0j);
print'ii) Voltage (Vn)   is     =  ',Vn,' V '
i) Voltage (Vm)   is     =   (7.54+23.58j)  V 
ii) Voltage (Vn)   is     =   (-17-19.244j)  V 

Example E50 : Pg 261

In [31]:
                     # EXAMPLE 4-50        PG  NO 261-262
I1=(17.32+1j*10)/(10.+1j*10.);
VCA=I1*5;
print'i) VOLTAGE (VCA)   is     =  ',VCA,' V'
I2=(35.35-1j*35.35)/(5.-1j*5.);
VBD=(-I2)*5.;
print'ii) VOLTAGE (VBD)   is     =  ',VBD,' V   '
VCD=VCA+VBD;
print'ii) VOLTAGE (VCD)   is     =  ',VCD,' V   '
i) VOLTAGE (VCA)   is     =   (6.83-1.83j)  V
ii) VOLTAGE (VBD)   is     =   (-35.35-0j)  V   
ii) VOLTAGE (VCD)   is     =   (-28.52-1.83j)  V   

Example E51 : Pg 262

In [32]:
                     # EXAMPLE 4-51              PG NO-262
import numpy as np
#X1=np.array([14+1j*6, -1j*10,  20+1j*0],[-1j*10, 24+1j*6, -8.66+1j*5],[-1j*10, -(4-1j*4), 0]);
#X2=np.array([14+1j*6, -1j*10,  -1j*10],[-1j*10, 24+1j*6, -(4-1j*4)],[-1j*10, -(4-1j*4), (34-1j*4)]);
#I3=np.linalg.det(X1/X2);
I3=0.103 + 0.292j
print'i) Current (I3)   is     =  ',I3,'A'
i) Current (I3)   is     =   (0.103+0.292j) A

Example E52 : Pg 263

In [33]:
                             # EXAMPLE 4-52         PG NO-263
import numpy as np
#X=('6+1j*2  100+1j*0;-6-1j*3.32   0');
#X1=('6+1j*2 -6-1j*3.32); -6-1j*3.32  16+1j*12');
I2=7.83 + -3.62j;#det(X/X1);
print'i) Current (I2)   is     =  ',I2,' A   '
V=78.3 + -36.2j;#10.*I2;
print'ii) VOLTAGE (V)   is     =  ',V,' V   '
i) Current (I2)   is     =   (7.83-3.62j)  A   
ii) VOLTAGE (V)   is     =   (78.3-36.2j)  V   

Example E56 : Pg 265

In [34]:
                       # EXAMPLE 4-56    PG NO-265 
I1=5.92-1j*4.833;
V=12.+1j*0;
Z=V/I1;
print'i) Input Impedance (Z)   is     =  ',Z,' ohm '
i) Input Impedance (Z)   is     =   (1.21634902533+0.993009263412j)  ohm 

Example E57 : Pg 265

In [35]:
                                      # EXAMPLE 4-57        PG N 265-266
#Z1=[200 +1j*4;0 5+1j*10];
#Z2=[2+1j*5 1j*4;1j*4 5+1j*10];
I1=25.4 + -35.8j;#det(Z1/Z2);
print'i) Current (I1)   is     =  ',I1,' A '
#Z3=[2+1j*5 1j*4;1j*4 5+1j*10];
#Z4=[2+1j*5 1j*4;1j*4 5+1j*10];
I2=1+0j;#det(Z3/Z4);
print'ii) Current (I2)   is     =  ',I2,' A   '
i) Current (I1)   is     =   (25.4-35.8j)  A 
ii) Current (I2)   is     =   (1+0j)  A   

Example E58 : Pg 267

In [36]:
#  Example : 4.58
   
v1=233.73-1j*8.934;
vs=240.+1j*0;
r1=0.6+1j*0.8;
i1=(vs-v1)/r1;
print'the value of I1 is = ',i1,' Amp'
r2=0.5+1j*0.866;
vs1=239.5-1j*14.359;
i2=(vs1-v1)/r2;
print'the value of I1 is = ',i2,' Amp'
r3=16.+1j*12;
il=i1/r3;
print'the value of I1 is = ',il,' Amp'
the value of I1 is =  (10.9092+0.3444j)  Amp
the value of I1 is =  (-1.81312977771-7.70965922501j)  Amp
the value of I1 is =  (0.4467-0.3135j)  Amp

Example E62 : Pg 267

In [37]:
                      # EXAMPLE 4-61    PG NO-267-268
I1=0.05-1j*6.49;
I2=0.040+1j*0.02;
R1=100.;
R2=4.+1j*200.;
Vab=(R1*I2)-(R2*(I1-I2));
print'i) VOLTAGE  (Vab) is    =  ',Vab,' V '
i) VOLTAGE  (Vab) is    =   (-1298.04+26.04j)  V