summaryrefslogtreecommitdiff
path: root/854/CH4/EX4.2/Example4_2.sce
diff options
context:
space:
mode:
Diffstat (limited to '854/CH4/EX4.2/Example4_2.sce')
-rwxr-xr-x854/CH4/EX4.2/Example4_2.sce31
1 files changed, 31 insertions, 0 deletions
diff --git a/854/CH4/EX4.2/Example4_2.sce b/854/CH4/EX4.2/Example4_2.sce
new file mode 100755
index 000000000..4c60ee76b
--- /dev/null
+++ b/854/CH4/EX4.2/Example4_2.sce
@@ -0,0 +1,31 @@
+//clear//
+//Caption: Program to find the work involved 'W' in moving a charge 'Q' along straight line
+//Example4.2
+//page 84
+clc;
+x = sym('x');
+y = sym('y');
+z = sym('z');
+y1 = sym('y1');
+y = -3*(x-1);
+Q = 2; //charge in coulombs
+Edot_dL1 = integ(y,x);
+disp(Edot_dL1,'E.dx*ax =')
+Edot_dL1 = limit(Edot_dL1,x,0.8)-limit(Edot_dL1,x,1);
+disp(Edot_dL1,'Value of E.dx*ax =')
+Edot_dL2 = 0;
+disp(Edot_dL2,'Value of E.dz*az=')
+x = (1-y1/3);
+Edot_dL3 = integ(x,y1)
+disp(Edot_dL3,'E.dy*ay=')
+Edot_dL3 = limit(Edot_dL3,y1,0.6)-limit(Edot_dL3,y1,0);
+disp(Edot_dL3,'Value of E.dy*ay =')
+W = -Q*(Edot_dL1+Edot_dL2+Edot_dL3);
+disp(W,'Work done in moving a point charge along shorter arc of circle in Joules, W=')
+//Result
+//E.dx*ax = -3*(x^2/2-x)
+//Value of E.dx*ax = -3/50
+//Value of E.dz*az = 0.
+//E.dy*ay = y1-y1^2/6
+//Value of E.dy*ay = 27/50
+//Work done in moving a point charge along shorter arc of circle in Joules, W = -24/25 = -0.96 Joules