real u = 1cm;
-TwoTerminal C1 = capacitor((0,0), ang=0, "$C_1$", "2.50\U{$\mu$F}");
-TwoTerminal C2 = capacitor(C1.end + (u,0), ang=0, "$C_2$", "6.25\U{$\mu$F}");
-TwoTerminal B = battery("$V$", "6.00\U{V}", draw=false);
-B.centerto(C1.beg, C2.end, offset=2u);
+MultiTerminal C1 = capacitor(label="$C_1$", value="$2.50\U{$\mu$F}$");
+MultiTerminal C2 = capacitor(C1.terminal[1] + (u,0), label="$C_2$",
+ value="6.25\U{$\mu$F}");
+MultiTerminal B = battery(label="$V$", value="6.00\U{V}", draw=false);
+B.centerto(C1.terminal[0], C2.terminal[1], offset=2u);
B.draw();
-wire(B.beg, C1.beg, rlsq);
-wire(B.end, C2.end, rlsq);
-wire(C1.end, C2.beg);
+wire(B.terminal[0], C1.terminal[0], rlsq);
+wire(B.terminal[1], C2.terminal[1], rlsq);
+wire(C1.terminal[1], C2.terminal[0]);
-label("\Part{a}", B.mid + (0, -5u));
+label("\Part{a}", B.center + (0, -5u));
B.shift((4u, 0));
B.draw();
-centerto(B, C1, offset=-2u);
+two_terminal_centerto(B, C1, offset=-2u);
C1.draw();
-centerto(B, C2, offset=-4u);
+two_terminal_centerto(B, C2, offset=-4u);
C2.draw();
-wire(B.beg, C1.beg, rlsq, dist=-u/2);
-wire(B.beg, C2.beg, rlsq, dist=-u/2);
-wire(B.end, C1.end, rlsq, dist=u/2);
-wire(B.end, C2.end, rlsq, dist=u/2);
+wire(B.terminal[0], C1.terminal[0], rlsq, dist=-u/2);
+wire(B.terminal[0], C2.terminal[0], rlsq, dist=-u/2);
+wire(B.terminal[1], C1.terminal[1], rlsq, dist=u/2);
+wire(B.terminal[1], C2.terminal[1], rlsq, dist=u/2);
-label("\Part{b}", B.mid + (0, -5u));
+label("\Part{b}", B.center + (0, -5u));
\end{asy}
\end{center}
real u = 1cm;
-TwoTerminal B = battery((0,0), ang=180, "$V$", "9.00\U{V}");
-TwoTerminal C1 = capacitor("$C_1$", "8.00\U{$\mu$F}", draw=false);
-TwoTerminal C2 = capacitor("$C_2$", "6.00\U{$\mu$F}", draw=false);
-TwoTerminal C3 = capacitor("$C_3$", "2.00\U{$\mu$F}", draw=false);
-TwoTerminal C4 = capacitor("$C_4$", "8.00\U{$\mu$F}", draw=false);
+MultiTerminal B = battery((0,0), dir=180, "$V$", "9.00\U{V}");
+MultiTerminal C1 = capacitor("$C_1$", "8.00\U{$\mu$F}", draw=false);
+MultiTerminal C2 = capacitor("$C_2$", "6.00\U{$\mu$F}", draw=false);
+MultiTerminal C3 = capacitor("$C_3$", "2.00\U{$\mu$F}", draw=false);
+MultiTerminal C4 = capacitor("$C_4$", "8.00\U{$\mu$F}", draw=false);
-centerto(B, C3, offset=3u, reverse=true); C3.draw();
-centerto(C3, C2, offset=2u); C2.draw();
-pair a = (B.end.x, (C2.beg.y + C3.beg.y)/2);
-pair b = (B.beg.x, a.y);
-C1.centerto(B.end, a, offset=2u); C1.draw();
-C4.centerto(B.beg, b, offset=-2u); C4.draw();
+two_terminal_centerto(B, C3, offset=3u, reverse=true); C3.draw();
+two_terminal_centerto(C3, C2, offset=2u); C2.draw();
+pair a = (B.terminal[1].x, (C2.center.y + C3.center.y)/2);
+pair b = (B.terminal[0].x, a.y);
+C1.centerto(B.terminal[1], a, offset=2u); C1.draw();
+C4.centerto(B.terminal[0], b, offset=-2u); C4.draw();
-a = (a.x - u, a.y); // shift to split x difference between C1.end and B.end
+// shift to split x difference between C1.terminal[0] and B.terminal[0]
+a = (a.x - u, a.y);
b = (b.x + u, b.y);
-wire(B.end, C1.beg, rlsq);
-wire(C1.end, a, udsq);
-wire(a, C2.beg, udsq);
-wire(a, C3.beg, udsq);
+wire(B.terminal[1], C1.terminal[0], rlsq);
+wire(C1.terminal[1], a, udsq);
+wire(a, C2.terminal[0], udsq);
+wire(a, C3.terminal[0], udsq);
dot(a);
-wire(C2.end, b, rlsq);
-wire(C3.beg, b, rlsq);
-wire(b, C4.end, rlsq);
+wire(C2.terminal[1], b, rlsq);
+wire(C3.terminal[1], b, rlsq);
+wire(b, C4.terminal[1], rlsq);
dot(b);
-wire(C4.beg, B.beg, udsq);
+wire(C4.terminal[0], B.terminal[0], udsq);
\end{asy}
\end{center}
\end{problem*}
real u = 1cm;
-TwoTerminal B = battery((0,0), ang=180, "$V$");
-TwoTerminal C1 = capacitor("$C_1$", draw=false);
-TwoTerminal C23 = capacitor("$C_{23}$", draw=false);
-TwoTerminal C4 = capacitor("$C_4$", draw=false);
-centerto(B, C23, offset=2u, reverse=true); C23.draw();
-pair a = (B.end.x, C23.beg.y);
-pair b = (B.beg.x, a.y);
-C1.centerto(B.end, a, offset=u); C1.draw();
-C4.centerto(B.beg, b, offset=-u); C4.draw();
-wire(B.end, C1.beg, rlsq);
-wire(C1.end, C23.beg, udsq);
-wire(C23.end, C4.end, rlsq);
-wire(C4.beg, B.beg, udsq);
+MultiTerminal B = battery(dir=180, "$V$");
+MultiTerminal C1 = capacitor("$C_1$", draw=false);
+MultiTerminal C23 = capacitor("$C_{23}$", draw=false);
+MultiTerminal C4 = capacitor("$C_4$", draw=false);
+two_terminal_centerto(B, C23, offset=2u, reverse=true); C23.draw();
+pair a = (B.terminal[1].x, C23.center.y);
+pair b = (B.terminal[0].x, a.y);
+C1.centerto(B.terminal[1], a, offset=u); C1.draw();
+C4.centerto(B.terminal[0], b, offset=-u); C4.draw();
+wire(B.terminal[1], C1.terminal[0], rlsq);
+wire(C1.terminal[1], C23.terminal[0], udsq);
+wire(C23.terminal[1], C4.terminal[1], rlsq);
+wire(C4.terminal[0], B.terminal[0], udsq);
B.shift((6u, 0));
B.draw();
-TwoTerminal C1234 = capacitor("$C_{1234}$", draw=false);
-centerto(B, C1234, offset=2u, reverse=true); C1234.draw();
-wire(B.end, C1234.beg, rlsq, dist=-u/2);
-wire(B.beg, C1234.end, rlsq, dist=+u/2);
+MultiTerminal C1234 = capacitor("$C_{1234}$", draw=false);
+two_terminal_centerto(B, C1234, offset=2u, reverse=true); C1234.draw();
+wire(B.terminal[1], C1234.terminal[0], rlsq, dist=-u/2);
+wire(B.terminal[0], C1234.terminal[1], rlsq, dist=+u/2);
-pair c = ((C4.mid.x + B.end.x - u/2)/2, C4.mid.y);
+pair c = ((C4.center.x + B.terminal[0].x - u/2)/2, C4.center.y);
draw((c-(u,0)) -- (c+(u,0)), kirchhoff_pen, Arrows);
\end{asy}
\end{center}
is an uncoordinated quivering of the heart. An electric shock to the
chest can cause momentary paralysis of the heart muscle, after which
the heart sometimes resumes its proper beating. One type of
-\emph{defibrillator} (chapter opening photo, page 740) applies a stron
-electric shock to the chest over a time interval of a few
+\emph{defibrillator} (chapter opening photo, page 740) applies a
+strong electric shock to the chest over a time interval of a few
milliseconds. This device contains a capacitor of several
microfarads, charged to several thousand volts. Electrodes called
paddles are held against the chest on both sides of the heart, and the
\cdot(5.00 - 1.00)
= \ans{40.0\U{$\mu$J}} \;.
\end{align}
+
+\Part{b}
+Because the charge doesn't change, we can find the final potential
+difference across the capacitor using the capacitance equation.
+\begin{equation}
+ \Delta V_f = \frac{Q}{C'} = \frac{\kappa}{\kappa'}\frac{Q}{C}
+ = \frac{\kappa}{\kappa'}\Delta V_i
+ = \frac{5.00}{1.00}\cdot 100\U{V}
+ = \ans{500\U{V}} \;.
+\end{equation}
\end{solution}
real u = 1cm;
real s = 6u;
-TwoTerminal B = battery("$V$");
-TwoTerminal C1 = capacitor("$C_1$", draw=false);
-TwoTerminal C2 = capacitor("$C_2$", draw=false);
-centerto(B, C1, offset=2u); C1.draw();
-centerto(C1, C2, offset=2u); C2.draw();
-wire(B.end, C1.end, rlsq, dist=u/2);
-wire(B.end, C2.end, rlsq, dist=u/2);
-wire(B.beg, C1.beg, rlsq, dist=-u/2);
-wire(B.beg, C2.beg, rlsq, dist=-u/2);
-label("$+Q_1$", C1.end, align=dir(70));
-label("$-Q_1$", C1.beg, align=dir(110));
-label("$+Q_2$", C2.end, align=dir(70));
-label("$-Q_2$", C2.beg, align=dir(110));
+MultiTerminal B = battery("$V$");
+MultiTerminal C1 = capacitor("$C_1$", draw=false);
+MultiTerminal C2 = capacitor("$C_2$", draw=false);
+two_terminal_centerto(B, C1, offset=2u); C1.draw();
+two_terminal_centerto(C1, C2, offset=2u); C2.draw();
+wire(B.terminal[1], C1.terminal[1], rlsq, dist=u/2);
+wire(B.terminal[1], C2.terminal[1], rlsq, dist=u/2);
+wire(B.terminal[0], C1.terminal[0], rlsq, dist=-u/2);
+wire(B.terminal[0], C2.terminal[0], rlsq, dist=-u/2);
+label("$+Q_1$", C1.terminal[1], align=dir(70));
+label("$-Q_1$", C1.terminal[0], align=dir(110));
+label("$+Q_2$", C2.terminal[1], align=dir(70));
+label("$-Q_2$", C2.terminal[0], align=dir(110));
-pair c = C1.mid + (s/2, 0);
+pair c = C1.center + (s/2, 0);
draw((c-(u,0)) -- (c+(u,0)), kirchhoff_pen, Arrow);
-C1.centerto(B.mid, C2.mid, -s); C1.draw();
-centerto(C1, C2, offset=u, reverse=true); C2.draw();
-label("$+Q_1$", C1.end, align=NW);
-label("$-Q_1$", C1.beg, align=SW);
-label("$+Q_2$", C2.end, align=SE);
-label("$-Q_2$", C2.beg, align=NE);
+C1.centerto(B.center, C2.center, -s); C1.draw();
+two_terminal_centerto(C1, C2, offset=u, reverse=true); C2.draw();
+label("$+Q_1$", C1.terminal[1], align=NW);
+label("$-Q_1$", C1.terminal[0], align=SW);
+label("$+Q_2$", C2.terminal[1], align=SE);
+label("$-Q_2$", C2.terminal[0], align=NE);
-c = C2.mid + (s/2, 0);
+c = C2.center + (s/2, 0);
draw((c-(u,0)) -- (c+(u,0)), kirchhoff_pen, Arrow);
C1.shift(s+u); C1.draw();
C2.shift(s+u); C2.draw();
-wire(C1.end, C2.beg);
-wire(C2.end, C1.beg);
-label("$+Q_1'$", C1.end, align=NW);
-label("$-Q_1'$", C1.beg, align=SW);
-label("$-Q_2'$", C2.end, align=SE);
-label("$+Q_2'$", C2.beg, align=NE);
+wire(C1.terminal[0], C2.terminal[1]);
+wire(C2.terminal[0], C1.terminal[1]);
+label("$+Q_1'$", C1.terminal[1], align=NW);
+label("$-Q_1'$", C1.terminal[0], align=SW);
+label("$-Q_2'$", C2.terminal[1], align=SE);
+label("$+Q_2'$", C2.terminal[0], align=NE);
\end{asy}
\end{center}
V_1' = \frac{Q_1'}{C_1} &= V_2' = \frac{Q_2'}{C_2} \\
Q_2' &= Q_1'\frac{C_2}{C_1} \\
Q_1' + Q_1'\frac{C_2}{C_1} &= Q_t \\
- Q_1' &= \frac{Q_t}{1+\frac{C_2}{C_1}} = \ans{750.0\U{$\mu$C}} \\
+ Q_1' &= \frac{Q_t}{1+\frac{C_2}{C_1}} = \ans{750\U{$\mu$C}} \\
Q_2' &= Q_1'\frac{C_2}{C_1}
- = \frac{Q_t}{\frac{C_1}{C_2} + 1} = \ans{250.0\U{$\mu$C}}
+ = \frac{Q_t}{\frac{C_1}{C_2} + 1} = \ans{250\U{$\mu$C}} \;.
\end{align}
\end{solution}
real dx = u/2;
real dy = u/2;
-TwoTerminal S = switchSPST((0,0), ang=0, name="$S$");
-TwoTerminal R1 = resistor(S.end, ang=0, name="$R_1$", val="$12.0\U{k\Ohm}$");
-pair Pu = R1.end + (dx,0); // top junction
-pair Pul = S.beg - (dx,0); // upper-left corner
+MultiTerminal S = switchSPST(label="$S$");
+MultiTerminal R1 = resistor(
+ S.terminal[1], label="$R_1$", value="$12.0\U{k\Ohm}$");
+pair Pu = R1.terminal[1] + (dx,0); // top junction
+pair Pul = S.terminal[0] - (dx,0); // upper-left corner
pair Pur = Pu + (2u,0); // upper-right corner
-TwoTerminal C = capacitor(
- Pur-(0,dy), ang=-90, name="$C$", val="$10.0\U{$\mu$F}$");
-TwoTerminal R3 = resistor(
- C.end+(0,-dy), -90, name="$R_3$", val="$3.00\U{k\Ohm}$");
-TwoTerminal R2 = resistor(name="$R_2$", val="$15.0\U{k\Ohm}$", draw=false);
-R2.centerto(R3.end, C.beg, offset=Pur.x - Pu.x);
+MultiTerminal C = capacitor(
+ Pur-(0,dy), dir=-90, label="$C$", value="$10.0\U{$\mu$F}$");
+MultiTerminal R3 = resistor(
+ C.terminal[1]+(0,-dy), -90, label="$R_3$", value="$3.00\U{k\Ohm}$");
+MultiTerminal R2 = resistor(
+ label="$R_2$", value="$15.0\U{k\Ohm}$", draw=false);
+R2.centerto(R3.terminal[1], C.terminal[0], offset=Pur.x - Pu.x);
R2.draw();
-pair Pb = (R2.beg.x, R3.end.y - dy);
-TwoTerminal V = source(type=DC, name="$V$", val="$9.00\U{V}$", draw=false);
-V.centerto(R3.end, C.beg, offset=Pur.x - Pul.x);
+pair Pb = (R2.terminal[0].x, R3.terminal[1].y - dy);
+MultiTerminal V = source(type=DC, label="$V$", value="$9.00\U{V}$", draw=false);
+V.centerto(R3.terminal[1], C.terminal[0], offset=Pur.x - Pul.x);
V.draw();
-wire(R1.end, R2.end, rlsq);
-wire(Pu, C.beg, rlsq);
-wire(C.end, R3.beg);
-wire(R3.end, Pb, udsq);
-wire(R2.beg, Pb);
-wire(Pb, V.beg, rlsq);
-wire(V.end, S.beg, udsq);
+wire(R1.terminal[1], R2.terminal[1], rlsq);
+wire(Pu, C.terminal[0], rlsq);
+wire(C.terminal[1], R3.terminal[0]);
+wire(R3.terminal[1], Pb, udsq);
+wire(R2.terminal[0], Pb);
+wire(Pb, V.terminal[0], rlsq);
+wire(V.terminal[1], S.terminal[0], udsq);
dot(Pu);
dot(Pb);
\end{asy}
real dx = 6pt;
-TwoTerminal I1 = current((0, 0), ang=0, name="$I_1$");
-pair P = I1.end + (dx, 0);
-TwoTerminal I2 = current(P - (0, dx), ang=90, name="$I_2$", draw=false);
-I2.shift((0, -I2.len-dx));
+MultiTerminal I1 = current((0, 0), label="$I_1$");
+real ilen = I1.terminal[1].x - I1.terminal[0].x;
+pair P = I1.terminal[1] + (dx, 0);
+MultiTerminal I2 = current(P - (0, dx), dir=90, label="$I_2$", draw=false);
+I2.shift((0, -ilen-dx));
I2.draw();
-TwoTerminal I3 = current(P + (dx, 0), ang=180, name="$I_3$", draw=false);
-I3.shift((I3.len, 0));
+MultiTerminal I3 = current(P + (dx, 0), dir=180, label="$I_3$", draw=false);
+I3.shift((ilen, 0));
I3.draw();
-wire(I1.end, I3.end);
-wire(P, I2.end);
+wire(I1.terminal[1], I3.terminal[1]);
+wire(P, I2.terminal[1]);
dot(P);
\end{asy}
\end{center}
dot((u, 0));
dot((u, u));
-TwoTerminal I1 = current(name="$I_1$", draw=false);
+MultiTerminal I1 = current(label="$I_1$", draw=false);
I1.centerto((0, 0), (0, u));
I1.draw();
-TwoTerminal I2 = current(name="$I_2$", draw=false);
+MultiTerminal I2 = current(label="$I_2$", draw=false);
I2.centerto((u, 0), (u, u));
I2.draw();
-TwoTerminal I3 = current(name="$I_3$", draw=false);
+MultiTerminal I3 = current(label="$I_3$", draw=false);
I3.centerto((2u, 0), (2u, u));
I3.draw();