From a9ac7ef3dbb1e3e9f6a09d162c277c4ec86ab6eb Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Wed, 11 Apr 2012 13:07:27 -0400 Subject: [PATCH] Update MetaPost to Asymptote Giancoli v6's problem 17.40. --- latex/problems/Giancoli_6/problem17.40.tex | 124 +++++++++------------ 1 file changed, 55 insertions(+), 69 deletions(-) diff --git a/latex/problems/Giancoli_6/problem17.40.tex b/latex/problems/Giancoli_6/problem17.40.tex index b5f14eb..3a579a6 100644 --- a/latex/problems/Giancoli_6/problem17.40.tex +++ b/latex/problems/Giancoli_6/problem17.40.tex @@ -5,81 +5,67 @@ this capacitor ($C_1$) is then connected (Fig. 17-29b) to a second (initially uncharged) capacitor, $C_2$, the final voltage on each capacitor is $V_2 = 15\U{V}$. What is the value of $C_2$? [\emph{Hint:} charge is conserved.] -\end{problem*} +\begin{center} +\begin{asy} +% C1 C1 +% +--||--+ +--||--+ +% | | | | +% +--i|--+ +--||--+ +% V C2 +% +% (a) (b) +import Circ; -\empaddtoprelude{ - input makecirc; % circuit drawing functions - initlatex(""); - pair A, B, Cl, Cr, Dl, Dr, El, Er; - numeric a; - a := 3cm; - A := (-3a/4,0); - B := (3a/4, 0); - def drawA = - % add elements - centreof.b(A+(1,0), A-(1,0), bat); - battery.B(c.b, phi.b, "V", ""); - centreof.c(B.B.n, B.B.p, cap); - capacitor.C(c.c+(0,a), normal, phi.c, "C_1", ""); - % add wiring along the bottom - wire(B.B.n, A+(a/2,0), nsq); - wire(B.B.p, A-(a/2,0), nsq); - % add wiring along the sides and top - wire(A+(a/2,0), C.C.l, udsq); - wire(A-(a/2,0), C.C.r, udsq); - puttext.bot("($a$)", A-(0,24pt)); - Cl = C.C.r; - Cr = C.C.l; - enddef; - def drawB = - % add elements - centreof.d(B+(1,0), B-(1,0), cap); - capacitor.D(c.d, normal, phi.d, "C_2", ""); - centreof.e(C.D.l, C.D.r, cap); - capacitor.E(c.e+(0,a), normal, phi.e, "C_1", ""); - % add wiring along the bottom - wire(C.D.l, B+(a/2,0), nsq); - wire(C.D.r, B-(a/2,0), nsq); - % add wiring along the sides and top - wire(B+(a/2,0), C.E.l, udsq); - wire(B-(a/2,0), C.E.r, udsq); - puttext.bot("($b$)", B-(0,24pt)); - Dl = C.D.r; - Dr = C.D.l; - El = C.E.r; - Er = C.E.l; - enddef; -} +real u = 1cm; +real dx = u; +real dy = 1.5u; -\begin{nosolution} -\begin{center} -\begin{empfile}[5p] -\begin{emp}(0cm, 0cm) - drawA; - drawB; -\end{emp} -\end{empfile} +TwoTerminal bat = battery("$V$"); +TwoTerminal c1 = capacitor("$C_1$", draw=false); +centerto(bat, c1, dy); c1.draw(); +wire(bat.end, c1.end, rlsq, dx/2); +wire(bat.beg, c1.beg, rlsq, -dx/2); +label("(a)", bat.mid + (0, -dy/2)); + +c1.shift(3*dx); c1.draw(); +TwoTerminal c2 = capacitor("$C_2$", draw=false); +centerto(c1, c2, -dy); c2.draw(); +wire(c2.end, c1.end, rlsq, dx/2); +wire(c2.beg, c1.beg, rlsq, -dx/2); +label("(b)", c2.mid + (0, -dy/2)); +\end{asy} \end{center} -\end{nosolution} +\end{problem*} \begin{solution} \begin{center} -\begin{empfile}[5] -\begin{emp}(0cm, 0cm) - drawA; - drawB; - puttext.ulft("$Q_{1a}$", Cl); - puttext.urt("$-Q_{1a}$", Cr); - puttext.ulft("$Q_{2b}$", Dl); - puttext.urt("$-Q_{2b}$", Dr); - puttext.ulft("$Q_{1b}$", El); - puttext.urt("$-Q_{1b}$", Er); - labeloffset := 9pt; - puttext.top("$V$", (Cl+Cr)/2); - puttext.top("$V_2$", (Dl+Dr)/2); - puttext.top("$V_2$", (El+Er)/2); -\end{emp} -\end{empfile} +\begin{asy} +import Circ; + +real u = 1cm; +real dx = u; +real dy = 1.5u; + +TwoTerminal bat = battery("$V$"); +TwoTerminal c1 = capacitor("$C_1$", draw=false); +centerto(bat, c1, dy); c1.draw(); +wire(bat.end, c1.end, rlsq, dx/2); +wire(bat.beg, c1.beg, rlsq, -dx/2); +label("(a)", bat.mid + (0, -dy/2)); +label("$Q_{1a}$", c1.end, NE); +label("$-Q_{1a}$", c1.beg, NW); + +c1.shift(3*dx); c1.draw(); +TwoTerminal c2 = capacitor("$C_2$", draw=false); +centerto(c1, c2, -dy); c2.draw(); +wire(c2.end, c1.end, rlsq, dx/2); +wire(c2.beg, c1.beg, rlsq, -dx/2); +label("(b)", c2.mid + (0, -dy/2)); +label("$Q_{1b}$", c1.end, NE); +label("$-Q_{1b}$", c1.beg, NW); +label("$Q_{2b}$", c2.end, SE); +label("$-Q_{2b}$", c2.beg, SW); +\end{asy} \end{center} Because the voltage drop across $C_1$ in situation $a$ is the same as -- 2.26.2