summaryrefslogtreecommitdiff
path: root/1445/CH2
diff options
context:
space:
mode:
Diffstat (limited to '1445/CH2')
-rw-r--r--1445/CH2/EX2.1/ch2_ex_1.sce21
-rw-r--r--1445/CH2/EX2.10/ch2_ex_10.sce27
-rw-r--r--1445/CH2/EX2.11/ch2_ex_11.sce26
-rw-r--r--1445/CH2/EX2.13/ch2_ex_13.sce37
-rw-r--r--1445/CH2/EX2.14/ch2_ex_14.sce38
-rw-r--r--1445/CH2/EX2.15/ch2_ex_15.sce39
-rw-r--r--1445/CH2/EX2.16/ch2_ex_16.sce80
-rw-r--r--1445/CH2/EX2.17/ch2_ex_17.sce51
-rw-r--r--1445/CH2/EX2.18/ch2_ex_18.sce36
-rw-r--r--1445/CH2/EX2.19/ch2_ex_19.sce50
-rw-r--r--1445/CH2/EX2.20/ch2_ex_20.sce39
-rw-r--r--1445/CH2/EX2.22/ch2_ex_22.sce36
-rw-r--r--1445/CH2/EX2.23/ch2_ex_23.sce34
-rw-r--r--1445/CH2/EX2.24/ch2_ex_24.sce27
-rw-r--r--1445/CH2/EX2.25/ch2_ex_25.sce30
-rw-r--r--1445/CH2/EX2.26/ch2_ex_26.sce31
-rw-r--r--1445/CH2/EX2.27/ch2_ex_27.sce48
-rw-r--r--1445/CH2/EX2.28/ch2_ex_28.sce57
-rw-r--r--1445/CH2/EX2.29/ch2_ex_29.sce27
-rw-r--r--1445/CH2/EX2.3/ch2_ex_3.sce17
-rw-r--r--1445/CH2/EX2.30/ch2_ex_30.sce37
-rw-r--r--1445/CH2/EX2.31/ch2_ex_31.sce21
-rw-r--r--1445/CH2/EX2.32/ch2_ex_32.sce23
-rw-r--r--1445/CH2/EX2.33/ch2_ex_33.sce33
-rw-r--r--1445/CH2/EX2.34/ch2_ex_34.sce25
-rw-r--r--1445/CH2/EX2.35/ch2_ex_35.sce45
-rw-r--r--1445/CH2/EX2.36/ch2_ex_36.sce37
-rw-r--r--1445/CH2/EX2.37/ch2_ex_37.sce41
-rw-r--r--1445/CH2/EX2.38/ch2_ex_38.sce25
-rw-r--r--1445/CH2/EX2.39/ch2_ex_39.sce58
-rw-r--r--1445/CH2/EX2.4/ch2_ex_4.sce18
-rw-r--r--1445/CH2/EX2.40/ch2_ex_40.sce24
-rw-r--r--1445/CH2/EX2.41/ch2_ex_41.sce34
-rw-r--r--1445/CH2/EX2.42/ch2_ex_42.sce44
-rw-r--r--1445/CH2/EX2.43/ch2_ex_43.sce21
-rw-r--r--1445/CH2/EX2.44/ch2_ex_44.sce19
-rw-r--r--1445/CH2/EX2.45/ch2_ex_45.sce35
-rw-r--r--1445/CH2/EX2.46/ch2_ex_46.sce43
-rw-r--r--1445/CH2/EX2.47/ch2_ex_47.sce44
-rw-r--r--1445/CH2/EX2.48/ch2_ex_48.sce36
-rw-r--r--1445/CH2/EX2.49/ch2_ex_49.sce57
-rw-r--r--1445/CH2/EX2.5/ch2_ex_5.sce36
-rw-r--r--1445/CH2/EX2.50/ch2_ex_50.sce40
-rw-r--r--1445/CH2/EX2.51/ch2_ex_51.sce24
-rw-r--r--1445/CH2/EX2.52/ch2_ex_52.sce77
-rw-r--r--1445/CH2/EX2.53/ch2_ex_53.sce43
-rw-r--r--1445/CH2/EX2.54/ch2_ex_54.sce27
-rw-r--r--1445/CH2/EX2.6/ch2_ex_6.sce28
-rw-r--r--1445/CH2/EX2.7/ch2_ex_7.sce24
-rw-r--r--1445/CH2/EX2.8/ch2_ex_8.sce21
-rw-r--r--1445/CH2/EX2.9/ch2_ex_9.sce19
51 files changed, 1810 insertions, 0 deletions
diff --git a/1445/CH2/EX2.1/ch2_ex_1.sce b/1445/CH2/EX2.1/ch2_ex_1.sce
new file mode 100644
index 000000000..2dbc6b6a2
--- /dev/null
+++ b/1445/CH2/EX2.1/ch2_ex_1.sce
@@ -0,0 +1,21 @@
+//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
+//Example 1
+
+disp("CHAPTER 2");
+disp("EXAMPLE 1");
+
+//SOLUTION
+
+//average value
+v_av=(integrate('sin(x)','x',0,%pi))/(2*%pi);
+
+//rms value
+v_rms=(integrate('sin(x)^2','x',0,%pi))/(2*%pi);
+v_rms=sqrt(v_rms);
+
+ff=v_rms/v_av;
+disp(sprintf("The form factor is %f",ff));
+
+//END
+
+
diff --git a/1445/CH2/EX2.10/ch2_ex_10.sce b/1445/CH2/EX2.10/ch2_ex_10.sce
new file mode 100644
index 000000000..3d34c9759
--- /dev/null
+++ b/1445/CH2/EX2.10/ch2_ex_10.sce
@@ -0,0 +1,27 @@
+//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
+//Example 10
+
+disp("CHAPTER 2");
+disp("EXAMPLE 10");
+
+//VARIABLE INITIALIZATION
+v=230; //in Volts
+z1=3+(%i*4); //impedance in rectangular form in Ohms
+z2=6+(%i*8); //impedance in rectangular form in Ohms
+
+//SOLUTION
+function [z,angle]=rect2pol(x,y);
+z=sqrt((x^2)+(y^2)); //z is impedance & the resultant of x and y
+angle=atan(y/x)*(180/%pi); //to convert the angle from radians to degrees
+endfunction;
+
+[z1,angle1]=rect2pol(3,4);
+[z2,angle2]=rect2pol(6,8);
+
+z=(z1*z2)/(z1+z2);
+I=v/z;
+angle=-angle1; //as angle1=angle2
+p=v*I*cos(angle*%pi/180); //to convert the angle from degrees to radians
+disp(sprintf("The power drawn from the source is %f kW",p/1000));
+
+//END
diff --git a/1445/CH2/EX2.11/ch2_ex_11.sce b/1445/CH2/EX2.11/ch2_ex_11.sce
new file mode 100644
index 000000000..fc8e0b84c
--- /dev/null
+++ b/1445/CH2/EX2.11/ch2_ex_11.sce
@@ -0,0 +1,26 @@
+//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
+//Example 11
+
+disp("CHAPTER 2");
+disp("EXAMPLE 11");
+
+//VARIABLE INITIALIZATION
+vdc=100; //DC voltage in Volts
+vac=100; //AC voltage in Volts
+f=50; //in Hertz
+I1=10; //in Amperes
+I2=5; //in Amperes
+
+//SOLUTION
+r=vdc/I1;
+z=vac/I2;
+xl=sqrt((z^2)-(r^2));
+L=xl/(2*%pi*f);
+pf=r/z;
+disp(sprintf("The inductance of the coil is %f H",L));
+disp(sprintf("The power factor of the coil is %f (lagging)",pf));
+
+//END
+
+
+
diff --git a/1445/CH2/EX2.13/ch2_ex_13.sce b/1445/CH2/EX2.13/ch2_ex_13.sce
new file mode 100644
index 000000000..cf3c2766c
--- /dev/null
+++ b/1445/CH2/EX2.13/ch2_ex_13.sce
@@ -0,0 +1,37 @@
+//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
+//Example 13
+
+disp("CHAPTER 2");
+disp("EXAMPLE 13");
+
+//VARIABLE INITIALIZATION
+z1=1+(%i*1); //impedance in rectangular form in Ohms
+v=20*sqrt(2); //amplitude of rms value of voltage in Volts
+
+//SOLUTION
+function [z,angle]=rect2pol(x,y);
+z=sqrt((x^2)+(y^2)); //z is impedance & the resultant of x and y
+angle=atan(y/x)*(180/%pi); //to convert the angle from radians to degrees
+endfunction;
+
+//solution (i)
+[z,angle]=rect2pol(1,1);
+v=v/sqrt(2);
+angle_v=100; //v=(20/sqrt(2))*sin(ωt+100)
+I=v/z; //RMS value of current
+angle_I=angle_v-angle;
+Im=I*sqrt(2);
+disp(sprintf("(i) The current in load is i = %d sin(ωt+%d) A",Im,angle_I));
+
+//solution (ii)
+pr=(v/sqrt(2))*(I*sqrt(2))*cos(angle*(%pi/180));
+disp(sprintf("(ii) The real power is %f W",pr));
+
+//solution (iii)
+pa=(v/sqrt(2))*(I*sqrt(2));
+disp(sprintf("(ii) The apparent power is %f VAR",pa));
+
+//END
+
+
+
diff --git a/1445/CH2/EX2.14/ch2_ex_14.sce b/1445/CH2/EX2.14/ch2_ex_14.sce
new file mode 100644
index 000000000..2d3da2eff
--- /dev/null
+++ b/1445/CH2/EX2.14/ch2_ex_14.sce
@@ -0,0 +1,38 @@
+//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
+//Example 14
+
+disp("CHAPTER 2");
+disp("EXAMPLE 14");
+
+//VARIABLE INITIALIZATION
+v=100; //amplitude of rms value of voltage in Volts
+I=20; //amplitude of rms value of current in Amperes
+
+//SOLUTION
+
+//solution(i)
+w=314; //angular frequency in radian/sec
+f=w/(2*%pi); //as w=2*(%pi)*f
+f=ceil(f);
+disp(sprintf("(i) The frequency is %d Hz",f));
+
+//solution (ii)
+E=v/sqrt(2);
+angle_E=-45; //in degrees
+I=I/sqrt(2);
+angle_I=-90; //in degrees
+z=E/I;
+angle=angle_E-angle_I;
+disp(sprintf("(ii) The impedance is %d Ω, %d degrees",z,angle));
+
+function [x,y]=pol2rect(mag,angle1);
+x=mag*cos(angle1*(%pi/180)); //to convert the angle from degrees to radian
+y=mag*sin(angle1*(%pi/180));
+endfunction;
+[r,x]=pol2rect(z,angle);
+L=x/(2*%pi*f);
+disp(sprintf(" The inductance is %f H",L));
+
+//END
+
+
diff --git a/1445/CH2/EX2.15/ch2_ex_15.sce b/1445/CH2/EX2.15/ch2_ex_15.sce
new file mode 100644
index 000000000..09182c5ed
--- /dev/null
+++ b/1445/CH2/EX2.15/ch2_ex_15.sce
@@ -0,0 +1,39 @@
+//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
+//Example 15
+
+disp("CHAPTER 2");
+disp("EXAMPLE 15");
+
+//VARIABLE INITIALIZATION
+I=2; //in Amperes
+angle_I=60; //in degrees
+v1=200; //in Volts
+f=50; //in Hertz
+
+//SOLUTION
+z1=v1/I;
+disp(sprintf("The impedance is %d Ω, %d degrees",z1,angle_I));
+//function to convert from polar form to rectangular form
+function [x,y]=pol2rect(mag,angle);
+x=mag*cos(angle*(%pi/180)); //to convert the angle from degrees to radians
+y=mag*sin(angle*(%pi/180));
+endfunction;
+[r,x1]=pol2rect(z1,angle_I);
+disp(sprintf("The resistance is %d Ω",r));
+L=x1/(2*%pi*f);
+disp(sprintf("The inductance is %f H",L));
+
+v2=100;
+f2=25;
+x2=2*%pi*f2*L;
+z2=sqrt((r^2)+(x2^2));
+angle=atan(x2/r);
+I1=v2/z2;
+p=v2*I1*cos(-angle);
+disp(sprintf("The power consumed is %f W",p));
+
+//Answer may be slightly different due to precision of floating point numbers
+
+//END
+
+
diff --git a/1445/CH2/EX2.16/ch2_ex_16.sce b/1445/CH2/EX2.16/ch2_ex_16.sce
new file mode 100644
index 000000000..c0acf18c5
--- /dev/null
+++ b/1445/CH2/EX2.16/ch2_ex_16.sce
@@ -0,0 +1,80 @@
+//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
+//Example 16
+
+disp("CHAPTER 2");
+disp("EXAMPLE 16");
+
+//VARIABLE INITIALIZATION
+r1=5; //in Ohms
+r2=10; //in Ohms
+L1=0.04; //in Henry
+L2=0.05; //in Henry
+v=200; //in Volts
+f=50; //in Hertz
+
+//SOLUTION
+
+//solution (i)
+xl1=L1*(2*%pi*f);
+xl2=L2*(2*%pi*f);
+z1=r1+(%i*xl1);
+z2=r2+(%i*xl2);
+//function to convert from rectangular form to polar form
+function [z,angle]=rect2pol(x,y);
+z=sqrt((x^2)+(y^2)); //z is impedance & the resultant of x and y
+angle=atan(y/x)*(180/%pi); //to convert the angle from radians to degrees
+endfunction;
+[z1,angle1]=rect2pol(r1,xl1);
+[z2,angle2]=rect2pol(r2,xl2);
+Y1=1/z1; //admittance
+Y2=1/z2;
+//function to convert from polar form to rectangular form
+function [x,y]=pol2rect(mag,angle);
+x=mag*cos(angle*(%pi/180)); //to convert the angle from degrees to radians
+y=mag*sin(angle*(%pi/180));
+endfunction;
+[G1,B1]=pol2rect(Y1,angle1);
+[G2,B2]=pol2rect(Y2,angle2);
+disp("......................................");
+disp("SOLUTION (i)");
+disp(sprintf("Conductance of 1st coil is %f S",G1));
+disp(sprintf("Conductance of 2nd coil is %f S",G2));
+disp(" ");
+disp(sprintf("Susceptance of 1st coil is %f S",B1));
+disp(sprintf("Susceptance of 2nd coil is %f S",B2));
+disp(" ");
+disp(sprintf("Admittance of 1st coil is %f S",Y1));
+disp(sprintf("Admittance of 2nd coil is %f S",Y2));
+disp("......................................");
+
+//solution (ii)
+G=G1+G2;
+B=B1+B2;
+[Y,angle]=rect2pol(G,B);
+I=v*Y;
+pf=cos((angle)*(%pi/180));
+disp("SOLUTION (ii)");
+disp(sprintf("Total current drawn by the circuit is %f A, %f degrees",I,-angle));
+disp(sprintf("Power factor of the circuit is %f (lagging)",pf));
+disp("......................................");
+
+//solution (iii)
+p=v*I*pf;
+disp("SOLUTION (iii)");
+disp(sprintf("Power absorbed by the circuit is %f kW",p/1000));
+disp("......................................");
+
+//solution (iv)
+z=v/I;
+function [x,y]=pol2rect(mag,angle);
+x=mag*cos(angle*(%pi/180)); //to convert the angle from degrees to radians
+y=mag*sin(angle*(%pi/180));
+endfunction;
+[r,x]=pol2rect(z,angle);
+L=x/(2*%pi*f);
+disp("SOLUTION (iv)");
+disp(sprintf("Resitance of single coil is %f Ω",r));
+disp(sprintf("Inductance of single coil is %f H",L));
+disp("......................................");
+
+//END
diff --git a/1445/CH2/EX2.17/ch2_ex_17.sce b/1445/CH2/EX2.17/ch2_ex_17.sce
new file mode 100644
index 000000000..ba82080a2
--- /dev/null
+++ b/1445/CH2/EX2.17/ch2_ex_17.sce
@@ -0,0 +1,51 @@
+//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
+//Example 17
+
+disp("CHAPTER 2");
+disp("EXAMPLE 17");
+
+//VARIABLE INITIALIZATION
+e=141.4; //in Volts
+E=141.4/sqrt(2); //in Volts
+angle_E=0; //in degrees
+//i(t)=(14.14<0)+(7.07<120)
+i1=14.14; //in Amperes
+angle_i1=0; //in degrees
+i2=7.07; //in Amperes
+angle_i2=120; //in degrees
+
+//SOLUTION
+//function to convert from polar form to rectangular form
+function [x,y]=pol2rect(mag,angle);
+x=mag*cos(angle*(%pi/180)); //to convert the angle from degrees to radians
+y=mag*sin(angle*(%pi/180));
+endfunction;
+[i1_x,i1_y]=pol2rect(i1,angle_i1);
+[i2_x,i2_y]=pol2rect(i2,angle_i2);
+i=(i1_x+i2_x)+(%i*(i1_y+i2_y));
+//function to convert from rectangular form to polar form
+function [mag,angle]=rect2pol(x,y);
+mag=sqrt((x^2)+(y^2));
+angle=atan(y/x)*(180/%pi); //to convert the angle from radians to degrees
+endfunction;
+[I,angle_I]=rect2pol((i1_x+i2_x),(i1_y+i2_y));
+I=I/sqrt(2);
+
+//solution (i)
+z=E/I;
+angle_z=angle_E-angle_I;
+[r,xc]=pol2rect(z,angle_z);
+f=50;
+c=1/(2*%pi*f*(-xc));
+disp(sprintf("(i) The value of resistance is %f Ω",r));
+disp(sprintf(" The value of capacitance is %f μF",c*10^6));
+
+//solution (ii)
+pf=cos(angle_z*(%pi/180));
+disp(sprintf("(ii) The power factor is %f ",pf));
+
+//solution (iii)
+p=E*I*pf;
+disp(sprintf("(iii) The power absorbed by the source is %f W",p));
+
+//END
diff --git a/1445/CH2/EX2.18/ch2_ex_18.sce b/1445/CH2/EX2.18/ch2_ex_18.sce
new file mode 100644
index 000000000..1ccb56cde
--- /dev/null
+++ b/1445/CH2/EX2.18/ch2_ex_18.sce
@@ -0,0 +1,36 @@
+//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
+//Example 18
+
+disp("CHAPTER 2");
+disp("EXAMPLE 18");
+
+//VARIABLE INITIALIZATION
+r=10; //in Ohms
+v=200; //in Volts
+f=50; //in Hertz
+I=10; //in Amperes
+rc=2; //resistance of coil in Ohms
+
+//SOLUTION
+
+//solution (i)
+z=v/I;
+xl=sqrt((z^2)-((r+rc)^2));
+L=xl/(2*%pi*f);
+disp(sprintf("(i) The inductance of the coil is %f H",L));
+
+//solution (ii)
+pf=(r+rc)/z;
+disp(sprintf("(ii) The power factor is %f",pf));
+
+//solution (iii)
+vl=I*(rc+(%i*xl));
+//function to convert from rectangular form to polar form
+function [mag,angle]=rect2pol(x,y);
+mag=sqrt((x^2)+(y^2));
+angle=atan(y/x)*(180/%pi); //to convert the angle from radians to degrees
+endfunction;
+[vl,angle_vl]=rect2pol(real(vl),imag(vl));
+disp(sprintf("(iii) The voltage across the coil is %f V, %f degrees",vl,angle_vl));
+
+//END
diff --git a/1445/CH2/EX2.19/ch2_ex_19.sce b/1445/CH2/EX2.19/ch2_ex_19.sce
new file mode 100644
index 000000000..dbac96db8
--- /dev/null
+++ b/1445/CH2/EX2.19/ch2_ex_19.sce
@@ -0,0 +1,50 @@
+//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
+//Example 19
+
+disp("CHAPTER 2");
+disp("EXAMPLE 19");
+
+//VARIABLE INITIALIZATION
+z1=4+(%i*3); //impedance in rectangular form in Ohms
+z2=6-(%i*8); //impedance in rectangular form in Ohms
+z3=1.6+(%i*7.2); //impedance in rectangular form in Ohms
+v=100 //in volts
+//SOLUTION
+
+//solution (i)
+//Admittance of each parallel branch Y1 and Y2
+Y1=1/z1;
+Y2=1/z2;
+disp("SOLUTION (i)");
+disp(sprintf("Admittance parallel branch 1 is %3f %3fj S", real(Y1), imag(Y1)));
+disp(sprintf("Admittance parallel branch 2 is %3f+%3fj S", real(Y2), imag(Y2)));
+disp(" ");
+
+//solution (ii)
+//Total circuit impedance Z=(Z1||Z2)+Z3
+z=z3+(z2*z1)/(z1+z2)
+disp("SOLUTION (ii)");
+disp(sprintf("Total circuit impedance is %3f %3fj S", real(z), imag(z)));
+//solution in the book is wrong as there is a total mistake in imaginery part 7.2+0.798=11.598
+//
+//solution (iii)
+//Supply current I=V/Z
+i=v/z;
+function [z,angle]=rect2pol(x,y);
+z0=sqrt((x^2)+(y^2)); //z is impedance & the resultant of x and y
+angle=atan(y/x)*(180/%pi); //to convert the angle from radians to degrees
+endfunction;
+[z, angle]=rect2pol(real(i), imag(i));
+//disp(sprintf("%f, %f",z,angle));
+//disp(sprintf("%f, %f",real(i), imag(i)));
+pf=cos(angle*%pi/180);
+
+disp("SOLUTION (iii)");
+disp(sprintf("The power factor is %f",pf));
+//solution (iv)
+//Power supplied by source = VI cosΦ or I^2 . R
+P=v*real(i)*pf;
+
+disp("SOLUTION (iv)");
+disp(sprintf("The power supplied by source is %f watt",P));
+//END
diff --git a/1445/CH2/EX2.20/ch2_ex_20.sce b/1445/CH2/EX2.20/ch2_ex_20.sce
new file mode 100644
index 000000000..79c18d219
--- /dev/null
+++ b/1445/CH2/EX2.20/ch2_ex_20.sce
@@ -0,0 +1,39 @@
+//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
+//Example 20 // read it as example 19 in the book on page 2.72
+
+disp("CHAPTER 2");
+disp("EXAMPLE 20");
+
+//VARIABLE INITIALIZATION
+L=0.5 //in Henry
+C=5 //in mf, multiply by 10^-6 to convert to f
+R=25 //in ohms
+//SOLUTION
+
+//solution (i)
+//Resonance frequency f = (1/2π)sqrt((1/LC)-R^2/L^2)
+fr=(1/(2*%pi))*sqrt((1/(L*C*10^-6))-(R^2)/(L^2));
+disp("SOLUTION (i)");
+disp(sprintf("For parallel circuit,Resonant frquency is %3f Hz", fr));
+disp(" ");
+
+//solution (ii)
+//Total circuit impedance at resonance is Z=L/RC
+z=L/(R*C*10^-6);
+disp("SOLUTION (ii)");
+disp(sprintf("Total impedence at resonance is %3f kΩ", z/1000));
+//
+//solution (iii)
+//Bandwidth (f2-f1)=R/(2.π.L)
+bw=R/(2*%pi*L);
+disp("SOLUTION (iii)");
+disp(sprintf("Bandwidth is %3f Hz", bw));
+//
+//solution (iv)
+//Quality factor Q=1/R.sqrt(L/C)
+Q=(1/R)*sqrt(L/(C*10^-6));
+disp("SOLUTION (iv)");
+disp(sprintf("Quality Factor is %3f", Q));
+//solution in the book is wrong as there is a total mistake in imaginery part 7.2+0.798=11.598
+//
+//END
diff --git a/1445/CH2/EX2.22/ch2_ex_22.sce b/1445/CH2/EX2.22/ch2_ex_22.sce
new file mode 100644
index 000000000..de0004d85
--- /dev/null
+++ b/1445/CH2/EX2.22/ch2_ex_22.sce
@@ -0,0 +1,36 @@
+//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
+//Example 22 // read it as example 21 in the book on page 2.75
+
+disp("CHAPTER 2");
+disp("EXAMPLE 22");
+
+//VARIABLE INITIALIZATION
+L=0.1 //in Henry
+C=8 //in mf, multiply by 10^-6 to convert to f
+R=10 //in ohms
+//SOLUTION
+
+//solution (i)
+//Resonance frequency for a series RLC circuitf = 1/2.π.sqrt(LC)
+fr=1/(2*%pi*sqrt(L*C*10^-6));
+disp("SOLUTION (i)");
+disp(sprintf("For series circuit,Resonant frquency is %3f Hz", fr));
+disp(" ");
+
+//solution (ii)
+//Q-factor is Q=w.L/R= 2.π,fr.L/R
+w=2*%pi*fr;
+Q=w*L/R;
+disp("SOLUTION (ii)");
+disp(sprintf("The Q-factor at resonance is %3f kΩ", Q));
+//
+//solution (iii)
+//Bandwidth (f2-f1)=R/(2.π.L), f1,f2 half power frequencies
+bw=R/(2*%pi*L);
+f1=fr+bw/2;
+disp("SOLUTION (iii)");
+disp(sprintf("half frequency 1 is %3f Hz", f1));
+disp(sprintf("half frequency 2 is %3f Hz", fr));
+//
+//END
+
diff --git a/1445/CH2/EX2.23/ch2_ex_23.sce b/1445/CH2/EX2.23/ch2_ex_23.sce
new file mode 100644
index 000000000..e84c47176
--- /dev/null
+++ b/1445/CH2/EX2.23/ch2_ex_23.sce
@@ -0,0 +1,34 @@
+//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
+//Example 22 // read it as example 22 in the book on page 2.76
+
+disp("CHAPTER 2");
+disp("EXAMPLE 23");
+
+//VARIABLE INITIALIZATION
+A=100 //Amplitude in Amps
+f=50 //frquency in Hz
+t1=1/600 //sec after wave becomes zero again
+a1=86.6 //amplitude at some time t after start
+//SOLUTION
+
+//solution (a)
+//RAmplitude at 1/600 second after it becomes zero
+w=f*2*%pi; //angular speed
+hp=1/(2*f); //half period, the point where sine beomes zero again after origin
+t=hp+t1;
+a2=A*sin(w*t);
+disp("SOLUTION (a)");
+disp(sprintf("Amplitude after 1/600 sec is %3f A", a2));
+disp(" ");
+//solution (b)
+//since A=A0.sinwt, t=asin(A/A0)/w
+t2=(asin(a1/A))/w;
+disp("SOLUTION (b)");
+disp(sprintf("The time at which amp would be %fis %3f sec", a1,t2));
+//
+//solution (iii)
+//Bandwidth (f2-f1)=R/(2.π.L), f1,f2 half power frequencies
+//
+//END
+
+
diff --git a/1445/CH2/EX2.24/ch2_ex_24.sce b/1445/CH2/EX2.24/ch2_ex_24.sce
new file mode 100644
index 000000000..3d18a4021
--- /dev/null
+++ b/1445/CH2/EX2.24/ch2_ex_24.sce
@@ -0,0 +1,27 @@
+//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
+//Example 22 // read it as example 23 in the book on page 2.77
+
+disp("CHAPTER 2");
+disp("EXAMPLE 24");
+
+//VARIABLE INITIALIZATION
+V=200 //Amplitude in Volts
+w=314 //angular spped
+R=20 //in ohms
+//SOLUTION
+
+//solution
+//comparing with standard equation
+Im=V/R; // in Amps
+rms=Im/2;
+Iav=Im/%pi; //average current
+ff=rms/Iav;
+disp("SOLUTION");
+disp(sprintf("RMS value of current is %3f A", rms));
+disp(sprintf("Average value of current is %3f A", Iav));
+disp(sprintf("Form Factor of current is %3f A", ff));
+disp(" ");
+//
+//END
+
+
diff --git a/1445/CH2/EX2.25/ch2_ex_25.sce b/1445/CH2/EX2.25/ch2_ex_25.sce
new file mode 100644
index 000000000..0562848e1
--- /dev/null
+++ b/1445/CH2/EX2.25/ch2_ex_25.sce
@@ -0,0 +1,30 @@
+//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
+//Example 25 // read it as example 24 in the book on page 2.78
+
+disp("CHAPTER 2");
+disp("EXAMPLE 25");
+
+//VARIABLE INITIALIZATION
+V=350 //Amplitude in Volts
+f=50 //frquency in Hz
+t1=0.005 //sec after wave becomes zero again
+t2=0.008 //sec after waves passes tgrough 0 in -ve direction
+//SOLUTION
+//e=Esinwt
+//solution (a)
+//RAmplitude at 1/600 second after it becomes zero
+w=f*2*%pi; //angular speed
+v1=V*sin(w*t1);
+disp("SOLUTION (a)");
+disp(sprintf("Voltage after %f sec is %3f A", t1,v1));
+disp(" ");
+//solution (b)
+//since wave will pass in -ve direction after half period
+hp=1/(2*f); //half period, the point where sine beomes zero again after origin
+t=hp+t2;
+v2=V*sin(w*t);
+disp("SOLUTION (b)");
+disp(sprintf("The voltage would be %f V %3f sec", v2,t));
+//
+//END
+
diff --git a/1445/CH2/EX2.26/ch2_ex_26.sce b/1445/CH2/EX2.26/ch2_ex_26.sce
new file mode 100644
index 000000000..2bc21dc90
--- /dev/null
+++ b/1445/CH2/EX2.26/ch2_ex_26.sce
@@ -0,0 +1,31 @@
+//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
+//Example 26 // read it as example 25 in the book on page 2.79
+
+disp("CHAPTER 2");
+disp("EXAMPLE 26");
+
+//VARIABLE INITIALIZATION
+A=100 //Amplitude in Amps
+f=25 //frquency in Hz
+a1=20 //svalue in Amps to be achieved in certain time
+a2=100 //in Amps
+
+//SOLUTION
+//i=Isinwt
+//solution (a)
+//RAmplitude at 1/600 second after it becomes zero
+w=f*2*%pi; //angular speed
+t1=(asin(a1/A))/w;
+disp("SOLUTION (a)");
+disp(sprintf("The time to reach value %f A is %3f sec", a1,t1));
+disp(" ");
+//solution (b)
+//since wave will pass in -ve direction after half period
+t2=(asin(a2/A))/w;
+disp("SOLUTION (a)");
+disp(sprintf("The time to reach value %f A is %3f sec", a2,t2));
+disp(" ");
+//
+//END
+
+
diff --git a/1445/CH2/EX2.27/ch2_ex_27.sce b/1445/CH2/EX2.27/ch2_ex_27.sce
new file mode 100644
index 000000000..dda7dbc6c
--- /dev/null
+++ b/1445/CH2/EX2.27/ch2_ex_27.sce
@@ -0,0 +1,48 @@
+//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
+//Example 27 // read it as example 26 in the book on page 2.79
+
+disp("CHAPTER 2");
+disp("EXAMPLE 27");
+
+//VARIABLE INITIALIZATION
+V=250; //Amplitude in Volts
+w=314; //angular spped
+pv=-10; //phase angle in degrees
+I=10; //Amplitude in Amps
+pi=50 //phase angle in degrees
+
+//SOLUTION
+//v=Vsin(wt+pv)
+//i=Isin(wt+pi)
+//solution
+//representing V in polar format as V=V0/sqrt(2) <θ, we get
+v1=V/sqrt(2);
+i1=I/sqrt(2);
+//converting polar to rect
+function [x,y]=pol2rect(mag,angle);
+x=mag*cos(angle*%pi/180); // angle convert in radians
+y=mag*sin(angle*%pi/180);
+endfunction;
+[x,y]=pol2rect(v1,pv);
+V=x+y*%i;
+[x,y]=pol2rect(i1,pi);
+I=x+y*%i;
+Z=V/I;
+//convert back into angles in deg
+function [mag,angle]=rect2pol(x,y);
+mag=sqrt((x^2)+(y^2)); //z is impedance & the resultant of x and y
+angle=atan(y/x)*(180/%pi); //to convert the angle from radians to degrees
+endfunction;
+[mag,angle]=rect2pol(real(Z),imag(Z));
+disp("SOLUTION (a)");
+disp(sprintf("The impedance is %f < %3f Deg", mag,angle));
+//disp(" ");
+//power factor=cos(angle)
+pf=cos(-1*angle*%pi/180); //convert to radians and change sign
+disp(sprintf("The power factor is %f", pf));
+//Z=R-jXc by comparing real and imag paarts we get
+disp(sprintf("The resistance is %fΩ and Reactance is %3fΩ", real(Z), imag(Z)));
+disp(" ");
+//
+//END
+
diff --git a/1445/CH2/EX2.28/ch2_ex_28.sce b/1445/CH2/EX2.28/ch2_ex_28.sce
new file mode 100644
index 000000000..1b48dddce
--- /dev/null
+++ b/1445/CH2/EX2.28/ch2_ex_28.sce
@@ -0,0 +1,57 @@
+//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
+//Example 28 // read it as example 27 in the book on page 2.80
+
+disp("CHAPTER 2");
+disp("EXAMPLE 28");
+
+//VARIABLE INITIALIZATION
+z1=2+(%i*3); //impedance in rectangular form in Ohms
+z2=1-(%i*5); //impedance in rectangular form in Ohms
+z3=4+(%i*2); //impedance in rectangular form in Ohms
+v=10; //in volts
+//SOLUTION
+
+//solution (a)
+//Total impedance
+//Total circuit impedance Z=(Z1||Z2)+Z3
+z=z1+(z2*z3)/(z2+z3);
+disp("SOLUTION (i)");
+disp(sprintf("Total circuit impedance is %3f %3fj S", real(z), imag(z)));
+//Total supply current I=V/Z
+//solution (b)
+i=v/z;
+function [mag,angle]=rect2pol(x,y);
+mag=sqrt((x^2)+(y^2)); //z is impedance & the resultant of x and y
+angle=atan(y/x)*(180/%pi); //to convert the angle from radians to degrees
+endfunction;
+[mag, angle]=rect2pol(real(i), imag(i));
+disp("SOLUTION (b)");
+disp(sprintf("Total current is %f<%f Amp",mag,angle));
+//solution (c)
+//Vbc=I.Zbc where Zbc=(z2*z3)/(z2+z3)
+Vbc=i*((z2*z3)/(z2+z3));
+[mag1, angle1]=rect2pol(real(Vbc), imag(Vbc));
+disp("SOLUTION (c)");
+disp(sprintf("The voltage across the || circuit is %f<%f",mag1, angle1));
+disp(sprintf("The voltage Vbc lags circuit by %f Deg",angle-angle1));
+//solution (d)
+//i2=Vbc/z2, i3=Vbc/z3
+i2=Vbc/z2;
+i3=Vbc/z3;
+[mag2, angle2]=rect2pol(real(i2), imag(i2));
+[mag3, angle3]=rect2pol(real(i3), imag(i3));
+disp(sprintf("The current across fist branch of || circuit is %f<%f",mag2, angle2));
+disp(sprintf("The current across second branch of || circuit is %f<%f",mag3, angle3));
+//solution (e)
+pf=cos(-1*angle*%pi/180);
+disp("SOLUTION (e)");
+disp(sprintf("The power factor is %f",pf));
+//solution (iv)
+//Apparent power s=VI, True Power, tp I^2R, Reactive Power, rp=I^2X or VISSin(angle)
+s=v*mag;
+tp=mag*mag*real(z);
+rp=v*mag*sin(-1*angle*%pi/180);
+disp("SOLUTION (f)");
+disp(sprintf("The Apparent power is %f VA, True power is %f W , Reactive power is %f vars",s,tp,rp));
+disp(" ");
+//END
diff --git a/1445/CH2/EX2.29/ch2_ex_29.sce b/1445/CH2/EX2.29/ch2_ex_29.sce
new file mode 100644
index 000000000..6af15f135
--- /dev/null
+++ b/1445/CH2/EX2.29/ch2_ex_29.sce
@@ -0,0 +1,27 @@
+//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
+//Example 29 // read it as example 28 in the book on page 2.83
+
+disp("CHAPTER 2");
+disp("EXAMPLE 29");
+
+//VARIABLE INITIALIZATION
+I=120; //Amplitude in Amps
+f=60; //Hz
+t1=1/360; //in sec time to find amplitude
+i2=96; //in Amps ,2 to find time taken to reach this
+//SOLUTION
+//i=Isin(wt)
+//solution (a)
+w=2*%pi*f;
+i=I*sin(w*t1);
+disp("SOLUTION (a)");
+disp(sprintf("The amplitude at time %f sec is %f Amp", t1,i));
+//solution (b)
+t2=(asin(i2/I))/w;
+disp("SOLUTION (b)");
+disp(sprintf("The time taken to reach %f Amp is %f Sec", i2,t2));
+disp(" ");
+//
+//END
+
+
diff --git a/1445/CH2/EX2.3/ch2_ex_3.sce b/1445/CH2/EX2.3/ch2_ex_3.sce
new file mode 100644
index 000000000..21882fc33
--- /dev/null
+++ b/1445/CH2/EX2.3/ch2_ex_3.sce
@@ -0,0 +1,17 @@
+//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
+//Example 3
+
+disp("CHAPTER 2");
+disp("EXAMPLE 3");
+
+//VARIABLE INITIALIZATION
+v_m=5; //peak value of voltage in Volts
+
+//SOLUTION
+v_av=(integrate('v_m*sin(x)','x',0,%pi))/(%pi);
+v_rms=(integrate('(v_m*sin(x))^2','x',0,%pi))/(%pi);
+v_rms=sqrt(v_rms);
+disp(sprintf("Average value of full wave rectifier sine wave is %f V",v_av));
+disp(sprintf("Effective value of full wave rectifier sine wave is %f V",v_rms));
+
+//END
diff --git a/1445/CH2/EX2.30/ch2_ex_30.sce b/1445/CH2/EX2.30/ch2_ex_30.sce
new file mode 100644
index 000000000..a9edd798c
--- /dev/null
+++ b/1445/CH2/EX2.30/ch2_ex_30.sce
@@ -0,0 +1,37 @@
+//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
+//Example 30 // read it as example 29 in the book on page 2.83
+
+disp("CHAPTER 2");
+disp("EXAMPLE 30");
+
+//VARIABLE INITIALIZATION
+f=50; //Hz
+rms=20; //in Amp
+t1=0.0025; //in sec time to find amplitude
+t2=0.0125; //in sec, to find amp after passing through +ve maximum
+i3=14.14; //in Amps, to find time when will it occur after passing through +ve maxima
+//SOLUTION
+//i=Isin(wt)
+//solution (a)
+w=2*%pi*f;
+Im=rms*sqrt(2);
+disp(sprintf("The equation would be i=%f. sin(%f.t)", Im,w));
+t0=(asin(1)/w); //time to reach maxima in +ve direction
+i=Im*sin(w*t1);
+disp("SOLUTION (a)");
+disp(sprintf("The amplitude at time %f sec is %f Amp", t1,i));
+//solution (b)
+tx=t0+t2;
+i2=Im*sin(w*tx);
+disp("SOLUTION (b)");
+disp(sprintf("The amplitude at time %f sec is %f Amp", t2,i2));
+//solution (c)
+ty=(asin(i3/Im))/w;
+t3=t0-ty; //since ty is the time starting from 0, the origin needs to be shifted to maxima
+disp("SOLUTION (c)");
+disp(sprintf("The amplitude of %f Amp would be reached in %f Sec", i3,t3));
+disp(" ");
+//
+//END
+
+
diff --git a/1445/CH2/EX2.31/ch2_ex_31.sce b/1445/CH2/EX2.31/ch2_ex_31.sce
new file mode 100644
index 000000000..cafecf9d3
--- /dev/null
+++ b/1445/CH2/EX2.31/ch2_ex_31.sce
@@ -0,0 +1,21 @@
+//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
+//Example 31 // read it as example 30 in the book on page 2.84
+
+disp("CHAPTER 2");
+disp("EXAMPLE 31");
+
+//VARIABLE INITIALIZATION
+//function of the waveform is deduced to be y=10+10.t/T
+//SOLUTION
+//Yav=(1/T).Integral(ydt) from 0 to T
+//say
+T=1; // 1 sec
+Yav=(1/T)*integrate('(10+10*t/T)', 't', 0, 1);
+disp(sprintf("The average value of waveform is %f", Yav));
+//RMS value Yrms=(1/T).Integral(y^2.dt) from 0 to T
+Yms=(1/T)*integrate('(10+10*t/T)^2', 't', 0, 1);
+disp(sprintf("The RMS value of waveform is %f", sqrt(Yms)));
+disp(" ");
+//
+//END
+
diff --git a/1445/CH2/EX2.32/ch2_ex_32.sce b/1445/CH2/EX2.32/ch2_ex_32.sce
new file mode 100644
index 000000000..326b61017
--- /dev/null
+++ b/1445/CH2/EX2.32/ch2_ex_32.sce
@@ -0,0 +1,23 @@
+//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
+//Example 32 // read it as example 31 in the book on page 2.85
+
+disp("CHAPTER 2");
+disp("EXAMPLE 32");
+
+//VARIABLE INITIALIZATION
+//function of the waveform is deduced to be i=Im.sinΘ
+//SOLUTION
+//Iav=(1/2.π).Integral(ydΘ) from 0 to π, and π to 2.π is zero, interval is 2.π
+//
+//say
+Im=1; // in Amp
+Iav=(1/(2*%pi))*integrate('(Im*sin(th))', 'th', 0, %pi);
+//disp(sprintf("The average value of waveform is %f", Iav));
+//RMS mean square value (1/π).Integral(y^2.dΘ) from 0 to π
+Ims=(1/(2*%pi))*integrate('(Im*sin(th))^2', 'th', 0, %pi);
+//disp(sprintf("The RMS value of waveform is %f", sqrt(Ims)));
+ff=sqrt(Ims)/Iav;
+disp(sprintf("The form factor of waveform is %f",ff));
+disp(" ");
+//
+//END
diff --git a/1445/CH2/EX2.33/ch2_ex_33.sce b/1445/CH2/EX2.33/ch2_ex_33.sce
new file mode 100644
index 000000000..502902d56
--- /dev/null
+++ b/1445/CH2/EX2.33/ch2_ex_33.sce
@@ -0,0 +1,33 @@
+//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
+//Example 33 // read it as example 32 in the book on page 2.86
+
+disp("CHAPTER 2");
+disp("EXAMPLE 33");
+
+//VARIABLE INITIALIZATION
+r1=20; //in Ω
+r2=30; //
+r3=40; //
+l1=0.5; //in Henry
+l2=0.3; //
+l3=0.2; //
+V=230; // volts
+f=50; //Hz
+//coils connected in series
+//
+//SOLUTION
+R=r1+r2+r3;
+L=l1+l2+l3;
+XL=2*%pi*f*L;
+//impedence Z=sqrt(R*2 +XL^2)
+Z=sqrt(R^2 +XL^2);
+I=V/Z;
+pf=R/Z;
+pc=V*I*pf;
+disp(sprintf("The total current is %f Amp", I));
+disp(sprintf("The Power Factor is %f lagging", pf));
+disp(sprintf("The Power consumed in the circuit is %f W", pc));
+disp(" ");
+//
+//END
+
diff --git a/1445/CH2/EX2.34/ch2_ex_34.sce b/1445/CH2/EX2.34/ch2_ex_34.sce
new file mode 100644
index 000000000..263cf0ce7
--- /dev/null
+++ b/1445/CH2/EX2.34/ch2_ex_34.sce
@@ -0,0 +1,25 @@
+//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
+//Example 34 // read it as example 33 in the book on page 2.87
+
+disp("CHAPTER 2");
+disp("EXAMPLE 34");
+
+//VARIABLE INITIALIZATION
+r=100; //in Ω
+c=40*10^(-6); //
+V=400; // volts
+f=50; //Hz
+//
+//SOLUTION
+XC=1/(2*%pi*f*c);
+//impedence Z=sqrt(R^2 +XL^2)
+Z=sqrt(r^2 +XC^2);
+I=V/Z;
+pf=r/Z;
+pc=V*I*pf;
+disp(sprintf("The total current is %f Amp", I));
+disp(sprintf("The Power Factor is %f leading", pf));
+disp(sprintf("The Power consumed in the circuit is %f W",pc));
+disp(" ");
+//
+//END
diff --git a/1445/CH2/EX2.35/ch2_ex_35.sce b/1445/CH2/EX2.35/ch2_ex_35.sce
new file mode 100644
index 000000000..dcc78f2b4
--- /dev/null
+++ b/1445/CH2/EX2.35/ch2_ex_35.sce
@@ -0,0 +1,45 @@
+//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
+//Example 35 // read it as example 34 in the book on page 2.88
+
+disp("CHAPTER 2");
+disp("EXAMPLE 35");
+
+//VARIABLE INITIALIZATION
+R=100; //in Ω
+L=0.2; //in Henry
+C=20*10^(-6); //farads
+V=240; // volts
+f=50; //Hz
+//
+//SOLUTION
+//Solution (a)
+XL=2*%pi*f*L;
+XC=1/(2*%pi*f*C);
+//impedence Z=sqrt(R^2 +XL^2)
+X=XL-XC;
+Z=sqrt(R^2 +X^2);
+disp("SOLUTION (a)");
+disp(sprintf("The total impedence is %f Ω", Z));
+I=V/Z;
+disp("SOLUTION (b)");
+disp(sprintf("The total current is %f Amp", I));
+Vr=I*R;
+Vi=I*XL;
+Vc=I*XC;
+disp("SOLUTION (c)");
+disp(sprintf("The voltage across resistance is %f V",Vr));
+disp(sprintf("The voltage across inductance is %f V",Vi));
+disp(sprintf("The voltage across capacitance is %f V",Vc));
+pf=R/Z;
+pc=V*I*pf;
+disp("SOLUTION (d)");
+disp(sprintf("The Power Factor is %f leading", pf));
+disp("SOLUTION (e)");
+disp(sprintf("The Power consumed in the circuit is %f W",pc));
+//XL=XC
+f0=1/(2*%pi*sqrt(L*C));
+disp("SOLUTION (f)");
+disp(sprintf("Resonance will occur at %f Hz",f0));
+disp(" ");
+//
+//END
diff --git a/1445/CH2/EX2.36/ch2_ex_36.sce b/1445/CH2/EX2.36/ch2_ex_36.sce
new file mode 100644
index 000000000..46766b0e4
--- /dev/null
+++ b/1445/CH2/EX2.36/ch2_ex_36.sce
@@ -0,0 +1,37 @@
+//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
+//Example 36 // read it as example 35 in the book on page 2.90
+
+disp("CHAPTER 2");
+disp("EXAMPLE 36");
+
+//VARIABLE INITIALIZATION
+R1=10; //in Ω
+XL=15; //in
+R2=12; //
+C=20; //capacitative reactance in Ω
+V=230; // volts
+f=50; //Hz
+//
+//SOLUTION
+//Solution (a)
+//conductance g, susceptance b
+Z12=(R1^2 +XL^2); //squared impedance Z^2 for branch 1
+Z22=(R1^2 +C^2); //squared impedance Z^2 for branch 2
+g1=R1/Z12;
+g2=R2/Z22;
+b1=-XL/Z12;
+b2=C/Z22;
+g=g1+g2;
+b=b1+b2;
+Y=sqrt(g^2+b^2);
+I=V*Y;
+disp("SOLUTION (a)");
+disp(sprintf("The total current is %f Amp", I));
+pf=g/Y;
+
+disp("SOLUTION (b)");
+disp(sprintf("The power factor is %f", pf));
+disp(" ");
+//
+//END
+
diff --git a/1445/CH2/EX2.37/ch2_ex_37.sce b/1445/CH2/EX2.37/ch2_ex_37.sce
new file mode 100644
index 000000000..d93ee733a
--- /dev/null
+++ b/1445/CH2/EX2.37/ch2_ex_37.sce
@@ -0,0 +1,41 @@
+//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
+//Example 37 // read it as example 36 in the book on page 2.93
+
+disp("CHAPTER 2");
+disp("EXAMPLE 37");
+
+//VARIABLE INITIALIZATION
+R1=20; //
+XL=15; // in ohms
+R2=0; //assumed
+C=50; //in ohms capacitative reactance
+V=200;
+f=60; //Hz
+//
+//SOLUTION
+//Solution (a)
+//conductance g, susceptance b
+Z1=sqrt(R1^2 +XL^2); //squared impedance Z^2 for branch 1
+Z2=sqrt(R2^2 +C^2); //squared impedance Z^2 for branch 2
+i1=V/Z1;
+i2=V/Z2;
+disp("SOLUTION (a)");
+disp(sprintf("The current in Branch 1 is %f Amp", i1));
+disp(sprintf("The current in Branch 2 is %f Amp", i2));
+phi1=atan(XL/R1);
+phi2=%pi/2; //atan(C/R2); //R2=0, output is infinity
+Icos=i1*cos(phi1)+i2*cos(phi2); // phi in radians
+Isin=-i1*sin(phi1)+i2*sin(phi2); // phi in radians
+I=sqrt(Icos^2+Isin^2);
+//
+disp("SOLUTION (b)");
+disp(sprintf("The total current is %f Amp", I));
+//
+pf=Icos/I;
+disp("SOLUTION (c)");
+disp(sprintf("The power factor is %f ", pf));
+disp(" ");
+//
+//END
+
+
diff --git a/1445/CH2/EX2.38/ch2_ex_38.sce b/1445/CH2/EX2.38/ch2_ex_38.sce
new file mode 100644
index 000000000..6d66e8d49
--- /dev/null
+++ b/1445/CH2/EX2.38/ch2_ex_38.sce
@@ -0,0 +1,25 @@
+//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
+//Example 38 // read it as example 37 in the book on page 2.93
+
+disp("CHAPTER 2");
+disp("EXAMPLE 38");
+
+//VARIABLE INITIALIZATION
+z1=10+15*%i;
+z2=12-20*%i;
+V=230;
+//invZ=1/z1+1/z2;
+Z=z1*z2/(z1+z2);
+magZ=sqrt(real(Z)^2+imag(Z)^2);
+I=V/magZ;
+pf=real(Z)/magZ;
+disp("SOLUTION (a)");
+disp(sprintf("The current is %f Amp", I));
+//
+disp("SOLUTION (b)");
+disp(sprintf("The Power factor is %f", pf));
+disp(" ");
+//
+//END
+
+
diff --git a/1445/CH2/EX2.39/ch2_ex_39.sce b/1445/CH2/EX2.39/ch2_ex_39.sce
new file mode 100644
index 000000000..e16ecd91c
--- /dev/null
+++ b/1445/CH2/EX2.39/ch2_ex_39.sce
@@ -0,0 +1,58 @@
+//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
+//Example 39 // read it as example 38 in the book on page 2.94
+
+disp("CHAPTER 2");
+disp("EXAMPLE 39");
+
+//VARIABLE INITIALIZATION
+z1=2.5+1.5*%i;
+z2=4+3*%i;
+z3=3-4*%i;
+V=200;
+f=50;
+E=V+0*%i; // representing as a vector
+//invZ=1/z1+1/z2;
+Z23=z2*z3/(z2+z3);
+Z=z1+Z23;
+I=E/Z;
+magI=sqrt(real(I)^2+imag(I)^2); //total current
+phi=atan(-imag(I)/real(I)); //total phase
+//
+//Voltages across the branches
+e12=I*z1; //voltage across series branch
+mage12=sqrt(real(e12)^2+imag(e12)^2);
+phi12=atan(imag(e12)/real(e12));
+//
+e23=E-e12; //voltage across parallel branch
+mage23=sqrt(real(e23)^2+imag(e23)^2);
+phi23=atan(-imag(e23)/real(e23));
+//
+//current in branch 1 upper
+i1=e23/z2;
+magi1=sqrt(real(i1)^2+imag(i1)^2);
+phii1=atan(-imag(i1)/real(i1));
+//
+//current in branch 2 lower
+i2=e23/z3;
+magi2=sqrt(real(i2)^2+imag(i2)^2);
+phii2=atan(imag(i2)/real(i2));
+disp("SOLUTION (b)");
+disp(sprintf("The current in Upper branch is %f Amp",magi1));
+disp(sprintf("The current in Lower branch is %f Amp",magi2));
+disp(sprintf("The Total current is %f Amp",magI));
+//
+pf=cos(phi); //
+disp("SOLUTION (c)");
+disp(sprintf("The Power factor is %f", pf));
+//
+disp("SOLUTION (d)");
+disp(sprintf("The voltage across series branch is %f V", mage12));
+disp(sprintf("The voltage across parallel branch is %f V", mage23));
+//
+tp=V*magI*pf;
+disp("SOLUTION (e)");
+disp(sprintf("The total power absorbed in circuit is %f W", tp));
+disp(" ");
+//
+//END
+
diff --git a/1445/CH2/EX2.4/ch2_ex_4.sce b/1445/CH2/EX2.4/ch2_ex_4.sce
new file mode 100644
index 000000000..0a61e3642
--- /dev/null
+++ b/1445/CH2/EX2.4/ch2_ex_4.sce
@@ -0,0 +1,18 @@
+//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
+//Example 4
+
+disp("CHAPTER 2");
+disp("EXAMPLE 4");
+
+//VARIABLE INITIALIZATION
+v_m=10; //peak value of voltage in Volts
+angle=60*(%pi/180); //delay angle in radians
+
+//SOLUTION
+v_av=(integrate('v_m*sin(x)','x',angle,%pi))/(%pi);
+v_rms=(integrate('(v_m*sin(x))^2','x',angle,%pi))/(%pi);
+v_rms=sqrt(v_rms);
+disp(sprintf("Average value of full wave rectifier sine wave is %f V",v_av));
+disp(sprintf("Effective value of full wave rectifier sine wave is %f V",v_rms));
+
+//END
diff --git a/1445/CH2/EX2.40/ch2_ex_40.sce b/1445/CH2/EX2.40/ch2_ex_40.sce
new file mode 100644
index 000000000..d9879f458
--- /dev/null
+++ b/1445/CH2/EX2.40/ch2_ex_40.sce
@@ -0,0 +1,24 @@
+//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
+//Example 40 // read it as example 39 in the book on page 2.98
+
+disp("CHAPTER 2");
+disp("EXAMPLE 40");
+
+//VARIABLE INITIALIZATION
+V=100; // max amplitude of wave
+w=314; //angular speed
+phiV=5; //phase angle in degrees
+I=5; //max current amplitude
+phiI=-40; //phase angle in current in deg
+
+//
+//SOLUTION
+phi=phiI-phiV;
+pf=cos(phi*%pi/180); //convert to radians
+p=(V/sqrt(2))*(I/sqrt(2))*pf;
+//
+disp(sprintf("The Power factor is %f lagging", pf));
+disp(sprintf("The Power delivered is %f W", p));
+disp(" ");
+//
+//END
diff --git a/1445/CH2/EX2.41/ch2_ex_41.sce b/1445/CH2/EX2.41/ch2_ex_41.sce
new file mode 100644
index 000000000..5a2bb77e8
--- /dev/null
+++ b/1445/CH2/EX2.41/ch2_ex_41.sce
@@ -0,0 +1,34 @@
+//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
+//Example 41 // read it as example 40 in the book on page 2.99
+
+disp("CHAPTER 2");
+disp("EXAMPLE 41");
+
+//VARIABLE INITIALIZATION
+lampV=100; //Volts
+lampW=60; //watts
+V=250;
+f=50;
+//
+//SOLUTION
+lampI=lampW/lampV;
+lampR=lampW/lampI^2; //W=I^2.R
+//
+disp("SOLUTION (a)");
+disp(sprintf("The resistance of the lamp is t is %f Ohms", lampR));
+//
+//in purely resistive / non inductive circuit,V=IR applies, and R=lampR+R
+R=V/lampI-lampR;
+disp(sprintf("The value value of resistor to be placed in series with the lamp is %f Ohms", R));
+//
+//in case of inductance
+//XL=2*%pi*f*L;
+//V=Z.I where Z^2=R^2+XL^2
+//L=sqrt((V^2/I^2-R^2)/2*%pi*f)
+L=sqrt((V/lampI)^2-lampR^2)/(2*%pi*f);
+disp(sprintf("The inductive resistance to be placed is %f H",L));
+disp(" ");
+//
+//END
+
+
diff --git a/1445/CH2/EX2.42/ch2_ex_42.sce b/1445/CH2/EX2.42/ch2_ex_42.sce
new file mode 100644
index 000000000..20eabe132
--- /dev/null
+++ b/1445/CH2/EX2.42/ch2_ex_42.sce
@@ -0,0 +1,44 @@
+//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
+//Example 42 // read it as example 41 in the book on page 2.100
+
+disp("CHAPTER 2");
+disp("EXAMPLE 42");
+
+//VARIABLE INITIALIZATION
+I=10; // max amplitude of wave in Amp
+rms1=5;
+rms2=7.5;
+rms3=10;
+phi1=30;
+phi2=-60;
+phi3=45;
+f=50; //Hz
+w=2*%pi*f;
+//
+//SOLUTION
+av1=rms1/1.11;
+av2=rms2/1.11;
+av3=rms3/1.11;
+disp("SOLUTION (i)");
+disp(sprintf("The average value of 1st current is %f Amp", av1));
+disp(sprintf("The average value of 2nd current is %f Amp", av2));
+disp(sprintf("The average value of 3rd current is %f Amp", av3));
+//
+disp("SOLUTION (ii)");
+disp(sprintf("The instantaneous value of 1st current is %f sin(%f*t+%f) Amp", rms1*sqrt(2), w,phi1));
+disp(sprintf("The instantaneous value of 2nd current is %f sin(%f*t%f) Amp", rms2*sqrt(2), w,phi2));
+disp(sprintf("The instantaneous value of 3rd current is %f sin(%f*t+%f) Amp", rms3*sqrt(2), w,phi3));
+//
+//instantaneous values of current at t=100msec=0.1 sec
+t=0.1;
+i1=(rms1*sqrt(2))*(sin(w*t+phi1*%pi/180));
+i2=(rms2*sqrt(2))*(sin(w*t+phi2*%pi/180));
+i3=(rms3*sqrt(2))*(sin(w*t+phi3*%pi/180));
+disp("SOLUTION (iv)");
+disp(sprintf("The instantaneous value of 1st current is %f Amp at %f Sec", i1, t));
+disp(sprintf("The instantaneous value of 2nd current is %f Amp at %f Sec", i2, t));
+disp(sprintf("The instantaneous value of 3rd current is %f Amp at %f Sec", i3, t));
+disp(" ");
+//
+//END
+
diff --git a/1445/CH2/EX2.43/ch2_ex_43.sce b/1445/CH2/EX2.43/ch2_ex_43.sce
new file mode 100644
index 000000000..42fe8c0cc
--- /dev/null
+++ b/1445/CH2/EX2.43/ch2_ex_43.sce
@@ -0,0 +1,21 @@
+//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
+//Example 43 // read it as example 42 in the book on page 2.102
+
+disp("CHAPTER 2");
+disp("EXAMPLE 43");
+
+//VARIABLE INITIALIZATION
+I=5; // max amplitude of wave in Amp
+f=50; //Hz
+//wave for is to be obtained by adding the two waves
+//i=5+5.sin(wt)=5+5.sin(theta)
+//
+//SOLUTION
+Iav=(1/(2*%pi))*integrate('5+5*sin(th)', 'th',0,2*%pi);
+Ims=(1/(2*%pi))*integrate('(5+5*sin(th))^2', 'th',0,2*%pi);
+//
+disp(sprintf("The average value of resultant current is %f Amp", Iav));
+disp(sprintf("The RMS value of resultant current is %f Amp", sqrt(Ims)));
+disp(" ");
+//
+//END
diff --git a/1445/CH2/EX2.44/ch2_ex_44.sce b/1445/CH2/EX2.44/ch2_ex_44.sce
new file mode 100644
index 000000000..6de089188
--- /dev/null
+++ b/1445/CH2/EX2.44/ch2_ex_44.sce
@@ -0,0 +1,19 @@
+//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
+//Example 44
+
+disp("CHAPTER 2");
+disp("EXAMPLE 44");
+
+//VARIABLE INITIALIZATION
+r=20; //in Ohms
+
+//SOLUTION
+p0=(4^2)*r;
+p1=((5/sqrt(2))^2)*r;
+p2=((3/sqrt(2))^2)*r;
+p=p0+p1+p2;
+I=sqrt(p/r);
+disp(sprintf("The power consumed by the resistor is %d W",p));
+disp(sprintf("The effective value of current is %f A",I));
+
+//END
diff --git a/1445/CH2/EX2.45/ch2_ex_45.sce b/1445/CH2/EX2.45/ch2_ex_45.sce
new file mode 100644
index 000000000..524c2f5a7
--- /dev/null
+++ b/1445/CH2/EX2.45/ch2_ex_45.sce
@@ -0,0 +1,35 @@
+//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
+//Example 45
+
+disp("CHAPTER 2");
+disp("EXAMPLE 45");
+
+//VARIABLE INITIALIZATION
+L=1.405; //in Henry
+r=40; //in Ohms
+c=20/(10^6); //in Farad
+v=100; //in Volts
+
+//SOLUTION
+f0=1/(2*%pi*sqrt(L*c));
+disp(sprintf("The frequency at which the circuit resonates is %d Hz",f0));
+
+I0=v/r;
+disp(sprintf("The current drawn from the supply is %f A",I0));
+
+xl0=2*%pi*f0*L;
+z0=sqrt((r^2)+(xl0^2));
+vl0=I0*z0;
+disp(sprintf("The voltage across the coil is %f V",vl0));
+
+xc0=1/(2*%pi*f0*c);
+disp(sprintf("The capcitative reactance is %f Ω",xc0));
+
+Q0=(2*%pi*f0*L)/r;
+disp(sprintf("The quality factor is %f", Q0));
+
+bw=r/L;
+disp(sprintf("The bandwidth is %f Hz",bw));
+
+//END
+
diff --git a/1445/CH2/EX2.46/ch2_ex_46.sce b/1445/CH2/EX2.46/ch2_ex_46.sce
new file mode 100644
index 000000000..a895c7d2f
--- /dev/null
+++ b/1445/CH2/EX2.46/ch2_ex_46.sce
@@ -0,0 +1,43 @@
+//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
+//Example 46
+
+disp("CHAPTER 2");
+disp("EXAMPLE 46");
+
+//VARIABLE INITIALIZATION
+I=120-(%i*(50)); //in Amperes
+v=8+(%i*(2)); //in Volts
+
+//SOLUTION
+
+//function to convert from rectangular form to polar form
+function [mag,angle]=rect2pol(x,y);
+mag=sqrt((x^2)+(y^2));
+angle=atan(y/x)*(180/%pi); //to convert the angle from radians to degrees
+endfunction;
+[v,angle_v]=rect2pol(real(v),imag(v));
+[I,angle_I]=rect2pol(real(I),imag(I));
+
+//solution (i)
+z=v/I;
+angle_z=angle_v-angle_I;
+disp(sprintf("(i) The impedance is %f Ω, %f degrees",z,angle_z));
+
+//solution (ii)
+phi=angle_z;
+pf=cos(phi*(%pi/180));
+disp(sprintf("(ii) The power factor is %f (lagging)",pf));
+
+//solution (iii)
+s=v*I;
+angle_s=angle_v-angle_I;
+//function to convert from polar form to rectangular form
+function [x,y]=pol2rect(mag,angle);
+x=mag*cos(angle*(%pi/180)); //to convert the angle from degrees to radians
+y=mag*sin(angle*(%pi/180));
+endfunction;
+[p,q]=pol2rect(s,angle_s);
+disp(sprintf("(iii) The power consumed is %f W",p));
+disp(sprintf(" The reactive power is %f VAR",q));
+
+//END
diff --git a/1445/CH2/EX2.47/ch2_ex_47.sce b/1445/CH2/EX2.47/ch2_ex_47.sce
new file mode 100644
index 000000000..807493965
--- /dev/null
+++ b/1445/CH2/EX2.47/ch2_ex_47.sce
@@ -0,0 +1,44 @@
+//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
+//Example 47
+
+disp("CHAPTER 2");
+disp("EXAMPLE 47");
+
+//VARIABLE INITIALIZATION
+r=10; //in Ohms
+xl=8.66; //in Ohms
+I=5-(%i*10); //in Amperes
+
+//SOLUTION
+z=r+(%i*(xl));
+//function to convert from rectangular form to polar form
+function [mag,angle]=rect2pol(x,y);
+mag=sqrt((x^2)+(y^2));
+angle=atan(y/x)*(180/%pi); //to convert the angle from radians to degrees
+endfunction;
+[z,angle_z]=rect2pol(real(z),imag(z));
+[I,angle_I]=rect2pol(real(I),imag(I));
+
+//solution(i)
+v=I*z;
+angle_v=angle_I+angle_z;
+disp(sprintf("(i) The applied voltage is %f V, %f degrees",v,angle_v));
+
+//solution (ii)
+phi=angle_I-angle_v;
+pf=cos(phi*(%pi/180));
+disp(sprintf("(ii) The power factor is %f (lagging)",pf));
+
+//solution(iii)
+s=v*I;
+angle_s=angle_v-angle_I;
+//function to convert from polar form to rectangular form
+function [x,y]=pol2rect(mag,angle);
+x=mag*cos(angle*(%pi/180)); //to convert the angle from degrees to radians
+y=mag*sin(angle*(%pi/180));
+endfunction;
+[p,q]=pol2rect(s,angle_s);
+disp(sprintf("(iii) The active power is %f W",p));
+disp(sprintf(" The reactive power is %f VAR",q));
+
+//END
diff --git a/1445/CH2/EX2.48/ch2_ex_48.sce b/1445/CH2/EX2.48/ch2_ex_48.sce
new file mode 100644
index 000000000..4e437781f
--- /dev/null
+++ b/1445/CH2/EX2.48/ch2_ex_48.sce
@@ -0,0 +1,36 @@
+//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
+//Example 48
+
+disp("CHAPTER 2");
+disp("EXAMPLE 48");
+
+//VARIABLE INITIALIZATION
+pf1=0.8; //power factor of 1st circuit
+pf2=0.6; //power factor of 2nd circuit
+z=1; //this is an assumption
+
+//SOLUTION
+angle1=acos(pf1)*(180/%pi); //in degrees
+angle2=acos(pf2)*(180/%pi); //in degrees
+//function to convert from polar form to rectangular form
+function [x,y]=pol2rect(mag,angle);
+x=mag*cos(angle*(%pi/180)); //to convert the angle from degrees to radians
+y=mag*sin(angle*(%pi/180));
+endfunction;
+[z1_x,z1_y]=pol2rect(z,angle1);
+[z2_x,z2_y]=pol2rect(z,angle2);
+nr=angle1+angle2; //numerator
+z_x=z1_x+z2_x;
+z_y=z1_y+z2_y;
+
+//function to convert from rectangular form to polar form
+function [z,angle]=rect2pol(x,y);
+I=sqrt((x^2)+(y^2));
+angle=atan(y/x)*(180/%pi); //to convert the angle from radians to degrees
+endfunction;
+[z,angle]=rect2pol(z_x,z_y);
+angle_z=nr-angle;
+pf=cos(angle_z*(%pi/180));
+disp(sprintf("The power factor of the combination is %f",pf));
+
+//END
diff --git a/1445/CH2/EX2.49/ch2_ex_49.sce b/1445/CH2/EX2.49/ch2_ex_49.sce
new file mode 100644
index 000000000..6b42d9858
--- /dev/null
+++ b/1445/CH2/EX2.49/ch2_ex_49.sce
@@ -0,0 +1,57 @@
+//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
+//Example 49
+
+disp("CHAPTER 2");
+disp("EXAMPLE 49");
+
+//VARIABLE INITIALIZATION
+v=200; //in Volts
+angle_v=30; //in degrees
+I1=20; //in Amperes
+angle_I1=60; //in degrees
+I2=40; //in Amperes
+angle_I2=-30; //in degrees
+
+//SOLUTION
+//function to convert from polar form to rectangular form
+function [x,y]=pol2rect(mag,angle);
+x=mag*cos(angle*(%pi/180)); //to convert the angle from degrees to radians
+y=mag*sin(angle*(%pi/180));
+endfunction;
+[v_x,v_y]=pol2rect(v,angle_v);
+[I1_x,I1_y]=pol2rect(I1,angle_I1);
+[I2_x,I2_y]=pol2rect(I2,angle_I2);
+s1=v*I1;
+angle_s1=-angle_v+angle_I1;
+disp(sprintf("The apparent power in 1st branch is %d kVA",s1/1000));
+[s1_x,s1_y]=pol2rect(s1,angle_s1);
+disp(sprintf("The true power in 1st branch is %f kW",s1_x/1000));
+
+disp(" ");
+
+s2=v*I2;
+angle_s2=angle_v-angle_I2;
+disp(sprintf("The apparent power in 2nd branch is %d kVA",s2/1000));
+[s2_x,s2_y]=pol2rect(s2,angle_s2);
+disp(sprintf("The true power in 2nd branch is %d kW",s2_x/1000));
+I=(I1_x+I2_x)+(%i*(I1_y+I2_y)); disp(I);
+
+//function to convert from rectangular form to polar form
+function [I,angle]=rect2pol(x,y);
+I=sqrt((x^2)+(y^2));
+angle=atan(y/x)*(180/%pi); //to convert the angle from radians to degrees
+endfunction;
+[I,angle]=rect2pol(real(I),imag(I));
+disp(I);
+s=v*I;
+angle_s=angle_v-angle;
+disp(sprintf("The apparent power in the main circuit is %f kVA",s/1000));
+[p,q]=pol2rect(s,angle_s);
+disp(sprintf("The true power in the main circuit is %f kW",p/1000));
+
+//END
+
+
+
+
+
diff --git a/1445/CH2/EX2.5/ch2_ex_5.sce b/1445/CH2/EX2.5/ch2_ex_5.sce
new file mode 100644
index 000000000..ea3f932de
--- /dev/null
+++ b/1445/CH2/EX2.5/ch2_ex_5.sce
@@ -0,0 +1,36 @@
+//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
+//Example 5
+
+disp("CHAPTER 2");
+disp("EXAMPLE 5");
+
+//VARIABLE INITIALIZATION
+I1=0.75; //in Amperes
+v=240; //in Volts
+f=50; //in Hertz
+p=80; //in Watts
+
+//SOLUTION
+res=p/v;
+pf1=res/I1; //1st power factor = cos(Φ1)
+phi1=acos(pf1);
+res1=tan(phi1); //result1 = tan(Φ1)
+w=2*%pi*f;
+
+//solution (a)
+res2=0; //result2 = tan(Φ2)
+Ic1=res*(res1-res2);
+c1=Ic1/(v*w);
+disp(sprintf("(a) When power factor is unity, the value of capacitance is %f μF",c1*(10^6)));
+
+//solution (b)
+pf2=0.95; //given
+phi2=acos(pf2);
+res2=tan(phi2);
+Ic2=res*(res1-res2);
+c2=Ic2/(v*w);
+disp(sprintf("(b) When power factor is 0.95(lagging), the value of capacitance is %f μF",c2*(10^6)));
+
+//END
+
+
diff --git a/1445/CH2/EX2.50/ch2_ex_50.sce b/1445/CH2/EX2.50/ch2_ex_50.sce
new file mode 100644
index 000000000..44a577b0f
--- /dev/null
+++ b/1445/CH2/EX2.50/ch2_ex_50.sce
@@ -0,0 +1,40 @@
+//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
+//Example 50
+
+disp("CHAPTER 2");
+disp("EXAMPLE 50");
+
+//VARIABLE INITIALIZATION
+z1=6+(%i*5); //impedance in Ohms
+z2=8-(%i*6); //impedance in Ohms
+z3=8+(%i*10); //impedance in Ohms
+I=20; //in Amperes
+
+//SOLUTION
+Y1=1/z1;
+Y2=1/z2;
+Y3=1/z3;
+Y=Y1+Y2+Y3;
+//function to convert from rectangular form to polar form
+function [Y,angle]=rect2pol(x,y);
+Y=sqrt((x^2)+(y^2));
+angle=atan(y/x)*(180/%pi); //to convert the angle from radians to degrees
+endfunction;
+[Y_tot,angle]=rect2pol(real(Y),imag(Y));
+v=I/Y_tot;
+angle_v=-angle;
+[z1,angle1]=rect2pol(real(z1),imag(z1));
+[z2,angle2]=rect2pol(real(z2),imag(z2));
+[z3,angle3]=rect2pol(real(z3),imag(z3));
+I1=v/z1;
+angle_I1=angle_v-angle1;
+I2=v/z2;
+angle_I2=angle_v-angle2;
+I3=v/z3;
+angle_I3=angle_v-angle3;
+disp("The current in each branch in polar form is-");
+disp(sprintf(" %f A, %f degrees",I1,angle_I1));
+disp(sprintf(" %f A, %f degrees",I2,angle_I2));
+disp(sprintf(" %f A, %f degrees",I3,angle_I3));
+
+//END
diff --git a/1445/CH2/EX2.51/ch2_ex_51.sce b/1445/CH2/EX2.51/ch2_ex_51.sce
new file mode 100644
index 000000000..665dbfdc2
--- /dev/null
+++ b/1445/CH2/EX2.51/ch2_ex_51.sce
@@ -0,0 +1,24 @@
+//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
+//Example 51
+
+disp("CHAPTER 2");
+disp("EXAMPLE 51");
+
+//VARIABLE INITIALIZATION
+Y1=0.4+(%i*0.6); //admittance of 1st branch in Siemens
+Y2=0.1+(%i*0.4); //admittance of 2nd branch in Siemens
+Y3=0.06+(%i*0.23); //admittance of 3rd branch in Siemens
+
+//SOLUTION
+Y=Y1+Y2+Y3;
+//function to convert from rectangular form to polar form
+function [Y,angle]=rect2pol(x,y);
+Y=sqrt((x^2)+(y^2));
+angle=atan(y/x)*(180/%pi); //to convert the angle from radians to degrees
+endfunction;
+[Y1,angle]=rect2pol(real(Y),imag(Y));
+disp(sprintf("The total admittance of the circuit is %f S, %f degrees",Y1,angle));
+z=1/Y1;
+disp(sprintf("The impedance of the circuit is %f Ω, %f degrees",z,-angle));
+
+//END
diff --git a/1445/CH2/EX2.52/ch2_ex_52.sce b/1445/CH2/EX2.52/ch2_ex_52.sce
new file mode 100644
index 000000000..f8b6c5c80
--- /dev/null
+++ b/1445/CH2/EX2.52/ch2_ex_52.sce
@@ -0,0 +1,77 @@
+//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
+//Example 52
+
+disp("CHAPTER 2");
+disp("EXAMPLE 52");
+
+//VARIABLE INITIALIZATION
+r1=7; //in Ohms
+L1=0.015; //in Henry
+r2=12; //in Ohms
+c2=180*(10^(-6)); //in Farad
+r3=5; //in Ohms
+L3=0.01; //in Henry
+v=230; //in Volts
+f=50; //in Hertz
+
+//SOLUTION
+
+//solition (a)
+xl1=2*%pi*f*L1;
+xc2=1/(2*%pi*f*c2);
+xl3=2*%pi*f*L3;
+Z1=r1+xl1*%i; //complex representations
+Z2=r2-xc2*%i;
+Z3=r3+xl3*%i;
+//function to convert from rectangular form to polar form
+function [z,angle]=rect2pol(r,x);
+z=sqrt((r^2)+(x^2));
+angle=atan(x/r)*(180/%pi); //to convert the angle from radians to degrees
+endfunction;
+[z1,angle1]=rect2pol(r1,xl1);
+[z2,angle2]=rect2pol(r2,xc2);
+[z3,angle3]=rect2pol(r3,xl3);
+//to obtain rectangular form of (Z1+Z2)
+req1=r1+r2;
+xeq1=xl1-xc2;
+//to obtain polar form of (Z1+Z2)
+[zeq1,angle_eq1]=rect2pol(req1,-xeq1);
+zp=(z1*z2)/(zeq1);
+angle_p=(angle1-angle2)+angle_eq1;
+//function to convert from polar form to rectangular form
+function [r,x]=pol2rect(z,angle);
+r=z*cos(angle*(%pi/180)); //to convert the angle from degrees to radians
+x=z*sin(angle*(%pi/180));
+endfunction;
+[rp,xp]=pol2rect(zp,angle_p);
+[req,xeq]=pol2rect(z3,angle3);
+r_tot=req+rp;
+x_tot=xeq+xp;
+[z_tot,angle_tot]=rect2pol(r_tot,x_tot);
+Z=r_tot+x_tot*%i; //complex representation
+disp(sprintf("(a) The total impedance is %f Ω, %f degrees",z_tot,angle_tot));
+
+//solution (b)
+I=v/Z; //complex division
+angle_I=-angle_tot;
+[I_x,I_y]=pol2rect(I,angle_I);
+disp(sprintf("(b) The total currrent is (%f-j%f) A",real(I),imag(I)));
+
+//solution (c)
+//Voltage drop across Z3
+Vab=I*Z3;
+disp(sprintf(" The Voltage between AB is (%f-j%f) A",real(Vab),imag(Vab)));
+//since we know that V=Vab+Vbc
+Vbc=v-Vab;
+disp(sprintf(" The Voltage between BC is (%f-j%f) A",real(Vbc),imag(Vbc)));
+I1=Vbc/Z1; //Branch 1 current
+I2=Vbc/Z2; //branch 2 current
+//I3=I, main branch current
+[mag1,angle1]=rect2pol(real(I1),imag(I1));
+[mag2,angle2]=rect2pol(real(I2),imag(I2));
+disp(sprintf("(c) Current in branch 1 is %f A, %f degrees",mag1,angle1));
+disp(sprintf(" The currrent in branch 1 is (%f-j%f) A",real(I1),imag(I1)));
+disp(sprintf(" The current in branch 2 is %f A, %f degrees",mag2,angle2));
+disp(sprintf(" The currrent in branch 2 is (%f-j%f) A",real(I2),imag(I2)));
+//END
+
diff --git a/1445/CH2/EX2.53/ch2_ex_53.sce b/1445/CH2/EX2.53/ch2_ex_53.sce
new file mode 100644
index 000000000..66f4e4908
--- /dev/null
+++ b/1445/CH2/EX2.53/ch2_ex_53.sce
@@ -0,0 +1,43 @@
+//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
+//Example 53 Read Example 52 of the Text Book
+
+disp("CHAPTER 2");
+disp("EXAMPLE 53");
+
+//VARIABLE INITIALIZATION
+v=230; //in Volts
+angle_v=30; //in degrees
+I1=20; //in Amperes
+angle_I1=60; //in degrees
+I2=40; //in Amperes
+angle_I2=-30; //in degrees
+
+//SOLUTION
+//function to convert from polar form to rectangular form
+function [x,y]=pol2rect(mag,angle);
+x=mag*cos(angle*(%pi/180)); //to convert the angle from degrees to radians
+y=mag*sin(angle*(%pi/180));
+endfunction;
+[x1,y1]=pol2rect(I1,angle_I1);
+[x2,y2]=pol2rect(I2,angle_I2);
+X=x1+x2;
+Y=y1+y2;
+
+//function to convert from rectangular form to polar form
+function [I,angle]=rect2pol(x,y);
+I=sqrt((x^2)+(y^2));
+angle=atan(y/x)*(180/%pi); //to convert the angle from radians to degrees
+endfunction;
+[I,angle]=rect2pol(X,Y);
+
+//solution (i)
+z=v/I;
+angle_z=angle_v-angle;
+disp(sprintf("(i) The total impedance of the circuit is %f Ω, %f degrees",z,angle_z));
+
+//solution (ii)
+//disp(sprintf("The value of I is %f and angle is %f",I, angle_z));
+pf=cos(angle_z*(%pi/180));
+p=v*I*pf;
+disp(sprintf("(ii) The power taken is %f W",p));
+//END
diff --git a/1445/CH2/EX2.54/ch2_ex_54.sce b/1445/CH2/EX2.54/ch2_ex_54.sce
new file mode 100644
index 000000000..2c975c627
--- /dev/null
+++ b/1445/CH2/EX2.54/ch2_ex_54.sce
@@ -0,0 +1,27 @@
+//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
+//Example 54 Read example 53 of the Book
+
+disp("CHAPTER 2");
+disp("EXAMPLE 54");
+
+//VARIABLE INITIALIZATION
+C=2.5/(10^6); //capcaitance in Farads
+R=15; //in Ohms
+L=260/1000; //in Henry
+
+//SOLUTION
+
+//solution (i)
+f_r=(1/(2*%pi))*sqrt((1/(L*C)-(R^2/L^2)));
+f_r=round(f_r); //to round off the value
+disp(sprintf("(i) The resonant frequency is %d Hz",f_r));
+
+//solution (ii)
+q_factor=(2*%pi*f_r*L)/R;
+disp(sprintf("(ii) The Q-factor of the circuit is %f",q_factor));
+
+//solution (iii)
+Z_r=L/(C*R);
+disp(sprintf("(iii) The dynamic impedance of the circuit is %f Ω",Z_r));
+
+//END
diff --git a/1445/CH2/EX2.6/ch2_ex_6.sce b/1445/CH2/EX2.6/ch2_ex_6.sce
new file mode 100644
index 000000000..078b110aa
--- /dev/null
+++ b/1445/CH2/EX2.6/ch2_ex_6.sce
@@ -0,0 +1,28 @@
+//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
+//Example 6
+
+disp("CHAPTER 2");
+disp("EXAMPLE 6");
+
+//VARIABLE INITIALIZATION
+f=50; //in Hertz
+I1=20; //in Amperes
+pf1=0.75; //power factor
+v=230; //in Volts
+pf2=0.9; //power factor(lagging)
+
+//SOLUTION
+phi1=acos(pf1);
+res1=tan(phi1); //result1 = tan(Φ1)
+phi2=acos(pf2);
+res2=tan(phi2); //result2 = tan(Φ2)
+Ic=I1*pf1*(res1-res2);
+w=2*%pi*f;
+c=Ic/(v*w);
+disp(sprintf("The value of capacitance is %f μF",c*(10^6)));
+Qc=v*Ic;
+disp(sprintf("The reactive power is %f kVAR",Qc/(10^3)));
+I2=I1*(pf1/pf2);
+disp(sprintf("The new supply current is %f A",I2));
+
+//END
diff --git a/1445/CH2/EX2.7/ch2_ex_7.sce b/1445/CH2/EX2.7/ch2_ex_7.sce
new file mode 100644
index 000000000..7437159b7
--- /dev/null
+++ b/1445/CH2/EX2.7/ch2_ex_7.sce
@@ -0,0 +1,24 @@
+//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
+//Example 7
+
+disp("CHAPTER 2");
+disp("EXAMPLE 7");
+
+//VARIABLE INITIALIZATION
+s1=300; //apparent power in kVA
+pf1=0.65; //power factor(lagging)
+pf2=0.85; //power factor(lagging)
+
+//SOLUTION
+
+//solution (a)
+p=s1*pf1; //active power
+q1=sqrt((s1^2)-(p^2));
+disp(sprintf("(a) To bring the power factor to unity, the capacitor bank should have a capacity of %f kVAR",q1));
+
+//solution (b)
+s2=p/pf2;
+q2=sqrt((s2^2)-(p^2));
+disp(sprintf("(b) To bring the power factor to 85%% lagging, the capacitor bank should have a capacity of %f kVAR",q2));
+
+//END
diff --git a/1445/CH2/EX2.8/ch2_ex_8.sce b/1445/CH2/EX2.8/ch2_ex_8.sce
new file mode 100644
index 000000000..042588a04
--- /dev/null
+++ b/1445/CH2/EX2.8/ch2_ex_8.sce
@@ -0,0 +1,21 @@
+//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
+//Example 8
+
+disp("CHAPTER 2");
+disp("EXAMPLE 8");
+
+//VARIABLE INITIALIZATION
+v=300/sqrt(2); //in Volts
+angle_v=110; //in degrees
+I=15/sqrt(2); //in Amperes
+angle_I=80; //in degrees
+
+//SOLUTION
+Z=v/I;
+angle_Z=angle_v-angle_I;
+disp(sprintf("The circuit impedance is %d Ω",Z));
+disp(sprintf("The phase angle is %d degrees",angle_Z));
+p_av=v*I*cos(angle_Z*(%pi/180)); //to convert angle_z from degrees to radians
+disp(sprintf("The average power drawn is %f W",p_av));
+
+//END
diff --git a/1445/CH2/EX2.9/ch2_ex_9.sce b/1445/CH2/EX2.9/ch2_ex_9.sce
new file mode 100644
index 000000000..8e68bc680
--- /dev/null
+++ b/1445/CH2/EX2.9/ch2_ex_9.sce
@@ -0,0 +1,19 @@
+//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
+//Example 9
+
+disp("CHAPTER 2");
+disp("EXAMPLE 9");
+
+//VARIABLE INITIALIZATION
+v1=120; //voltage of lamp in Volts
+p=100; //in Watts
+v2=220; //supply voltage in Volts
+f=50; //in Hertz
+
+//SOLUTION
+vl=sqrt((v2^2)-(v1^2));
+xl=(v1*vl)/p;
+L=xl/(2*%pi*f);
+disp(sprintf("The pure inductance should have a value of %f H",L));
+
+//END