Add question text and figures for Serway and Jewett v8's 25.7, .12, and .16.
[course.git] / latex / notes / style / style.asy
1 // Example of a clearly worked problem and reasoning behind it.
2 // Command-line options to enable stepping and/or reverse video:
3 // asy [-u stepping=true] [-u reverse=true] slidedemo
4
5 orientation=Landscape;
6
7 import slide;
8 settings.tex = "pdflatex";
9 usersetting();
10
11 // Commands to generate optional bibtex citations:
12 // asy slidedemo
13 // bibtex slidedemo_
14 // asy slidedemo
15 //
16 bibliographystyle("alpha");
17 //texpreamble("\usepackage{problempack}"); // optionclash
18 texpreamble("\usepackage{amsmath}");
19 texpreamble("\newcommand{\U}[1]{\text{ #1}}      % units shortcut");
20 texpreamble("\newcommand{\E}[1]{\ensuremath{\cdot 10 ^{#1}}} % exponent shortcut");
21 texpreamble(bulletcolor("black"));
22
23 string eqnstring(string s, real width=100bp)
24 {
25   return minipage("\begin{align*}"+s+"\end{align*}",width);
26 }
27 // Override slide.equations to use the prettier align* env from amsmath
28 void equations(string s, pen p=itempen)
29 {
30   vbox("\begin{align*}"+s+"\end{align*}",p);
31 }
32 // Wrap textblock from the textpos package
33
34 // Generated needed files if they don't already exist.
35 asy(nativeformat(),"drawing");
36
37 // Optional background color or header:
38 // import x11colors;
39 // fill(background,box((-1,-1),(1,1)),Azure);
40 // label(background,"Header",(0,startposition.y));
41
42 pair titlealign = W;
43 titlepagepen = colorless(titlepagepen);
44 authorpen = colorless(authorpen);
45 institutionpen = colorless(authorpen);
46 pen questionPen = fontsize(18pt);
47 pen genEqnPen = 0.5*red + fontsize(18pt);
48 pen partEqnPen = 0.5*blue + fontsize(18pt);
49 pen solnEqnPen = 0.5*green + fontsize(18pt);
50 pair solutionposition = startposition-(0,0.5); // paper (-1,-1) to (1,1)
51
52 titlepage(title="Solving physics problems:\\ a detailed solution style",
53           author="W. Trevor King",
54           institution="Drexel University",
55           date="\today",
56           url="http://www.physics.drexel.edu/$\sim$wking");
57
58 title("Presenting solutions in an organized manner");
59 remark(
60 "Physics isn't just about getting the ``right answer,'' but also about
61 demonstrating to others why your answer is right and how you came to
62 that conclusion.  This solution framework makes your argument clearer,
63 which will help you as you develop the argument, and others when you
64 try and teach/convince them.");
65 remark(
66 "This layout is along the lines of the homework solution format from my
67 high-school physics class, and I like it a lot.  However, if you have
68 another format that works for you, go ahead and use that.  Remember,
69 the purpose is to make the solution look obvious, with very clear
70 reasoning, both for you and any potential readers.");
71
72 outline("Procedure");
73 item("Copy down the assigned problem");
74 item("Draw a picture of the problem, labeling useful quantities");
75 item("Make a list of relevant formulas");
76 item("Apply the formulas to the particular cases in the problem");
77 item("Solve for the unknown quantities");
78 item("Are your answers reasonable?");
79
80 title("Copy down the assigned problem");
81 remark("This step ensures you read the problem carefully");
82 currentposition=solutionposition;
83 remark(
84 "
85 {
86 17.24) \\
87 A $10.0\U{m}$ length of wire consists of $5.0\U{m}$ of copper followed
88 by $5.0\U{m}$ of aluminum, both of diameter $1.0\U{mm}$.  A voltage
89 difference of $85\U{mV}$ is placed across the composite wire.
90 (a) What is the total resistance (sum) of the two wires?
91 (b) What is the currnent through the wire?
92 (c) What are the voltages across the aluminum part and across the copper part?
93 }
94 ", questionPen);
95
96 title("Draw a picture of the problem");
97 remark(
98 "This step doublechecks your understanding of the problem, helps you
99 translate it into your own terms, and makes it clear what quantities
100 your various symbols refer to.");
101
102 currentposition=solutionposition;
103 remark(
104 "
105 {\
106 17.24) \\
107 A $10.0\U{m}$ length of wire consists of $5.0\U{m}$ of copper followed
108 by $5.0\U{m}$ of aluminum, both of diameter $1.0\U{mm}$.  A voltage
109 difference of $85\U{mV}$ is placed across the composite wire.
110 (a) What is the total resistance (sum) of the two wires?
111 (b) What is the currnent through the wire?
112 (c) What are the voltages across the aluminum part and across the copper part?
113 }
114 ", questionPen);
115 //new*
116 figure("drawing");
117
118 title("Make a list of relevant formulas");
119 remark(
120 "This is the key step, digging deep into your physics knowledge to
121 dredge up any appropriate formulas. :p");
122
123 currentposition=solutionposition;
124 remark(
125 "
126 {\
127 17.24) \\
128 A $10.0\U{m}$ length of wire consists of $5.0\U{m}$ of copper followed
129 by $5.0\U{m}$ of aluminum, both of diameter $1.0\U{mm}$.  A voltage
130 difference of $85\U{mV}$ is placed across the composite wire.
131 (a) What is the total resistance (sum) of the two wires?
132 (b) What is the currnent through the wire?
133 (c) What are the voltages across the aluminum part and across the copper part?
134 }
135 ", questionPen);
136 figure("drawing");
137 //new*
138 pair genEqnPos = currentposition+(-.1,.2);
139 label(eqnstring("
140   R &= \rho \frac{L}{A} \\
141   V &= IR \\
142   R_{1,2} &= R_1 + R_2 \\
143   A &= \pi r^2 = \pi (d/2)^2
144 ", minipagewidth/3), genEqnPos, E, genEqnPen);
145
146 title("Apply formulas to patricular cases");
147 remark(
148 "Here we simply apply the general equations to the problem at hand, and
149 look up any constants we don't know.");
150
151 currentposition=solutionposition;
152 remark(
153 "
154 {\
155 17.24) \\
156 A $10.0\U{m}$ length of wire consists of $5.0\U{m}$ of copper followed
157 by $5.0\U{m}$ of aluminum, both of diameter $1.0\U{mm}$.  A voltage
158 difference of $85\U{mV}$ is placed across the composite wire.
159 (a) What is the total resistance (sum) of the two wires?
160 (b) What is the currnent through the wire?
161 (c) What are the voltages across the aluminum part and across the copper part?
162 }
163 ", questionPen);
164 figure("drawing");
165 label(eqnstring("
166   R &= \rho \frac{L}{A} \\
167   V &= IR \\
168   R_{1,2} &= R_1 + R_2 \\
169   A &= \pi r^2 = \pi (d/2)^2
170 ", minipagewidth/3), genEqnPos, E, genEqnPen);
171 //new*
172 pair partEqnPos = genEqnPos+(0,-.4);
173 label(eqnstring("
174   R_T &= R_c + R_a  &  R_c &= \rho_c \frac{l}{A}  &  R_a &= \rho_a \frac{l}{A} \\
175   V_T &= I R_T  &  V_c &= I R_c  &  V_a &= I R_a \\
176   \rho_c &= 1.68\E{-8}\U{$\Omega$m} \\
177   \rho_a &= 2.65\E{-8}\U{$\Omega$m}
178 ", minipagewidth/1.8), partEqnPos, E, partEqnPen);
179
180 title("Solve for the unknown quantities");
181 remark("From this point out it's just math.");
182 currentposition=solutionposition;
183 remark(
184 "
185 {\
186 17.24) \\
187 A $10.0\U{m}$ length of wire consists of $5.0\U{m}$ of copper followed
188 by $5.0\U{m}$ of aluminum, both of diameter $1.0\U{mm}$.  A voltage
189 difference of $85\U{mV}$ is placed across the composite wire.
190 (a) What is the total resistance (sum) of the two wires?
191 (b) What is the currnent through the wire?
192 (c) What are the voltages across the aluminum part and across the copper part?
193 }
194 ", questionPen);
195 figure("drawing");
196 label(eqnstring("
197   R &= \rho \frac{L}{A} \\
198   V &= IR \\
199   R_{1,2} &= R_1 + R_2 \\
200   A &= \pi r^2 = \pi (d/2)^2
201 ", minipagewidth/3), genEqnPos, E, genEqnPen);
202 label(eqnstring("
203   R_T &= R_c + R_a  &  R_c &= \rho_c \frac{l}{A}  &  R_a &= \rho_a \frac{l}{A} \\
204   V_T &= I R_T  &  V_c &= I R_c  &  V_a &= I R_a \\
205   \rho_c &= 1.68\E{-8}\U{$\Omega$m} \\
206   \rho_a &= 2.65\E{-8}\U{$\Omega$m}
207 ", minipagewidth/1.8), partEqnPos, E, partEqnPen);
208 //new*
209 pair solnEqnPos = genEqnPos+(0.9,-.1);
210 label(eqnstring("
211   R_c &= \rho_c \frac{l}{A} = \rho_c \frac{4l}{\pi d^2} = 0.10654\U{$\Omega$}\\
212   R_a &= \rho_a \frac{l}{A} = \rho_a \frac{4l}{\pi d^2} = 0.16870\U{$\Omega$}\\
213   R_T &= R_c + R_a = 0.28\U{$\Omega$} \\
214   V_T &= IR_T \qquad I = V_T/R_T = 0.31\U{A} \\
215   V_c &= IR_c = 33\U{mV} \qquad V_a = IR_a = 52\U{mV}
216 ", minipagewidth/1.8), solnEqnPos, SE, solnEqnPen);
217
218 title("Are your answers reasonable?");
219 remark(
220 "Yes.  The wire is made out of copper and aluminum, both good
221 conductors, and has a reasonable length and diameter, so we expect low
222 resistance.  We also expect the more resistive aluminum to have a
223 higher resistance and a greater voltage drop.");
224
225 currentposition=solutionposition;
226 remark(
227 "
228 {\
229 17.24) \\
230 A $10.0\U{m}$ length of wire consists of $5.0\U{m}$ of copper followed
231 by $5.0\U{m}$ of aluminum, both of diameter $1.0\U{mm}$.  A voltage
232 difference of $85\U{mV}$ is placed across the composite wire.
233 (a) What is the total resistance (sum) of the two wires?
234 (b) What is the currnent through the wire?
235 (c) What are the voltages across the aluminum part and across the copper part?
236 }
237 ", questionPen);
238 figure("drawing");
239 label(eqnstring("
240   R &= \rho \frac{L}{A} \\
241   V &= IR \\
242   R_{1,2} &= R_1 + R_2 \\
243   A &= \pi r^2 = \pi (d/2)^2
244 ", minipagewidth/3), genEqnPos, E, genEqnPen);
245 label(eqnstring("
246   R_T &= R_c + R_a  &  R_c &= \rho_c \frac{l}{A}  &  R_a &= \rho_a \frac{l}{A} \\
247   V_T &= I R_T  &  V_c &= I R_c  &  V_a &= I R_a \\
248   \rho_c &= 1.68\E{-8}\U{$\Omega$m} \\
249   \rho_a &= 2.65\E{-8}\U{$\Omega$m}
250 ", minipagewidth/1.8), partEqnPos, E, partEqnPen);
251 pair solnEqnPos = genEqnPos+(0.9,-.1);
252 label(eqnstring("
253   R_c &= \rho_c \frac{l}{A} = \rho_c \frac{4l}{\pi d^2} = 0.10654\U{$\Omega$}\\
254   R_a &= \rho_a \frac{l}{A} = \rho_a \frac{4l}{\pi d^2} = 0.16870\U{$\Omega$}\\
255   R_T &= R_c + R_a = 0.28\U{$\Omega$} \\
256   V_T &= IR_T \qquad I = V_T/R_T = 0.31\U{A} \\
257   V_c &= IR_c = 33\U{mV} \qquad V_a = IR_a = 52\U{mV}
258 ", minipagewidth/1.8), solnEqnPos, SE, solnEqnPen);
259
260 title("Some thoughts");
261 remark(
262 "Obviously this formal approach is not neccessary for simple problems
263 that you can almost do in your head.  However, for more complicated
264 problems, the extra work of drawing a labeled figure and explicitly
265 writing out the general equations you use will help you solve the
266 problem faster by making it very easy to remember what each symbol
267 means, see where you have information that you haven't used in your
268 solution yet, and get a good overview of your line of reasoning.");
269 label("This document was produced using Asymptote.
270   {\tt http://asymptote.sourceforge.net/}", (-0.8,-0.8), NE, fontsize(12pt));