summaryrefslogtreecommitdiff
path: root/620/CH21/EX21.8/example21_8.sce
blob: d23f351bf114b600e0b251911e0158b3b7b18baa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
c1=40*10^(-6);
v1=450;
c2=20*10^(-6);
v2=500;
v=400;
disp("Part a");
w1=0.5*c1*v^2;
disp("energy stored (in J) in 40 μF capacitor is"); disp(w1);
w2=0.5*c2*v^2;
disp("energy stored (in J) in 20 μF capacitor is"); disp(w2);
disp("Part b");
w=w1+w2;
disp("total energy stored (in J) is"); disp(w);