Skip to content

Commit 0f70b17

Browse files
committed
Add script to extract question/answer/solution triplets from given examples
1 parent 0cc9bc7 commit 0f70b17

5 files changed

+2298
-0
lines changed

wizard/OandW_sample_PS1_Complete.tex

+348
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,348 @@
1+
\documentclass[12pt]{article}
2+
3+
\input{../../Shared/header}
4+
5+
\pagestyle{empty}
6+
\setlength{\textheight}{9.6in} \setlength{\textwidth}{6.5in}
7+
\setlength{\oddsidemargin}{-0.15in} \setlength{\evensidemargin}{0.2in}
8+
\setlength{\topmargin}{-50pt}
9+
10+
\setlength{\arraycolsep}{2pt}
11+
\setlength{\parskip}{0pt}
12+
\setlength{\parindent}{0pt}
13+
14+
\begin{document}
15+
16+
\centerline{\Large Complex Numbers, Functions and Ordinary Differential Equations}
17+
\bigskip\bigskip
18+
19+
20+
\noindent
21+
Problem Sheet 1\hfill 2019
22+
23+
\vskip-9pt\hrulefill
24+
25+
26+
\bigskip
27+
28+
29+
30+
31+
%\subsubsection*{Exercises}
32+
33+
\begin{enumerate}
34+
35+
\item Find the real and imaginary parts of:
36+
37+
$
38+
\begin{array}[h!]{lll}
39+
{\rm (a)}\hskip5pt 8+3\,i\hskip24pt&
40+
{\rm (b)}\hskip5pt 4-15\,i\hskip24pt&
41+
{\rm (c)}\hskip5pt \cos\theta-i\,\sin\theta\\
42+
\noalign{\vskip12pt}
43+
{\rm (d)}\hskip5pt i^2&
44+
{\rm (e)}\hskip5pt i\,(2-5\,i)&
45+
{\rm (f)}\hskip5pt (1+2\,i)(2-3\,i)
46+
\end{array}
47+
$
48+
49+
\item Write each of the following expressions as a complex number in the form $x+i\,y$:
50+
51+
$
52+
\begin{array}[h!]{lll}
53+
{\rm (a)}\hskip5pt (5-i)(2+3\,i)\hskip24pt&
54+
{\rm (b)}\hskip5pt (3-4\,i)(3+4\,i)\hskip24pt&
55+
{\rm (c)}\hskip5pt (1+2\,i)^2\\
56+
\noalign{\vskip12pt}
57+
{\rm (d)}\hskip5pt \displaystyle{10\over4-2\,i}&
58+
{\rm (e)}\hskip5pt \displaystyle{3-i\over4+3\,i}&
59+
{\rm (f)}\hskip5pt \displaystyle{1\over i}
60+
\end{array}
61+
$
62+
63+
64+
\item Define $z=(5+7\,i)(5+b\,i)$.
65+
66+
$
67+
\begin{array}[h!]{l}
68+
{\rm (a)}\hskip5pt {\rm If}\ b\ {\rm and}\ z\ {\rm are\ both\ real,\ find}\ b.\\
69+
\noalign{\vskip12pt}
70+
{\rm (b)}\hskip5pt {\rm If}\ {\rm Im}(b)={4\over5},\ {\rm and}\ z\ {\rm is\ pure\ imaginary,\ find}\
71+
{\rm Re}(b).
72+
\end{array}
73+
$
74+
75+
\item Plot the following complex numbers in the complex plane:
76+
77+
$\begin{array}[h!]{l}
78+
{\rm (a)}\hskip5pt 2\,i\hskip24pt
79+
{\rm (b)}\hskip5pt -3+i\,2\hskip24pt
80+
{\rm (c)}\hskip5pt (-3+i\,2)^\ast\hskip24pt
81+
{\rm (d)}\hskip5pt \displaystyle{1+i\over\sqrt{2}}\hskip24pt
82+
\end{array}
83+
$
84+
85+
\item Write the following numbers in polar form:
86+
87+
$\begin{array}[h!]{l}
88+
{\rm (a)}\hskip5pt i\hskip24pt
89+
{\rm (b)}\hskip5pt -i\hskip24pt
90+
{\rm (c)}\hskip5pt 1+i\hskip24pt
91+
{\rm (d)}\hskip5pt 1-i\,\sqrt{3}\hskip24pt
92+
\end{array}
93+
$
94+
95+
\item Write the following complex numbers in Cartesian coordinates:
96+
97+
$\begin{array}[h!]{l}
98+
{\rm (a)}\hskip5pt e^{-3\pi i/4}\hskip24pt
99+
{\rm (b)}\hskip5pt e^{5\pi i/4}\hskip24pt
100+
{\rm (c)}\hskip5pt 3\,e^{i}\hskip24pt
101+
{\rm (d)}\hskip5pt \displaystyle{1\over\sqrt{3}\,e^{\pi i/3}}\hskip24pt
102+
\end{array}
103+
$
104+
105+
\item Consider the polar form of a complex number $z=r\,e^{i\,\theta}$. Show that
106+
$(z^2)^\ast=(z^\ast)^2$.
107+
108+
\item
109+
\begin{enumerate}
110+
\item Consider the polynomial $az^2+bz+c$, where $a$, $b$,
111+
and $c$ may be complex and $a\ne 0$. Given that $z_0$ and $z_0^\ast$ are distinct solutions to
112+
$az^2 + bz + c = 0$ and thus are also solutions to $z^2+(b/a)z+(c/a)=z^2+b'z+c'=0$, show that $b'$ and $c'$ must be real.
113+
Conversely, if $a$, $b$ and $c$ are all real, and $z_0$ is a solution of $az^2 + bz + c = 0$, deduce that $z_0^\ast$ is also a solution.
114+
115+
\item Let $b=c=1$ and $a=t$, $t>\frac{1}{4}$. Make a graph of the
116+
pattern that the solutions to this equation traces out in the
117+
complex plane (hint: work out $|z+1|$).
118+
119+
\item Derive functions $a(t)$, $b(t)$ and $c(t)$ for which
120+
the solutions to the equation traces out a pattern which is rotated
121+
by $90^\circ$ counterclockwise around the origin with respect to the previous
122+
pattern (n.b. it is no longer the case that $a$, $b$ and $c$ are all real. Why?).
123+
How can you achieve an arbitrary rotation?
124+
\end{enumerate}
125+
\end{enumerate}
126+
127+
128+
\end{document}
129+
\documentclass[12pt]{article}
130+
131+
\input{../../Shared/header}
132+
133+
\pagestyle{empty}
134+
\setlength{\textheight}{9.6in} \setlength{\textwidth}{6.5in}
135+
\setlength{\oddsidemargin}{-0.15in} \setlength{\evensidemargin}{0.2in}
136+
\setlength{\topmargin}{-50pt}
137+
138+
\setlength{\arraycolsep}{2pt}
139+
\setlength{\parskip}{0pt}
140+
\setlength{\parindent}{0pt}
141+
142+
\begin{document}
143+
144+
\centerline{\Large Complex Numbers, Functions and Ordinary Differential Equations}
145+
\bigskip\bigskip
146+
147+
148+
149+
\noindent
150+
Solutions to Problem Sheet 1\hfill 2023
151+
152+
\vskip-9pt\hrulefill
153+
154+
%\subsubsection*{Homework}
155+
156+
\begin{enumerate}
157+
158+
\item For a complex number $a+i\,b$, in which $a$ and $b$ are real, the real and imaginary parts
159+
are given by ${\rm Re}(a+i\,b)=a$ and ${\rm Im}(a+i\,b)=b$, respectively. Thus,
160+
161+
$
162+
\begin{array}[h!]{l}
163+
{\rm (a)}\hskip5pt {\rm Re}(8+3\,i)=8\, ,\qquad{\rm Im}(8+3\,i)=3\, .\\
164+
\noalign{\vskip12pt}
165+
{\rm (b)}\hskip5pt {\rm Re}(4-15\,i)=4\, ,\qquad {\rm Im}(4-15\,i)=-15\, .\\
166+
\noalign{\vskip12pt}
167+
{\rm (c)}\hskip5pt {\rm Re}(\cos\theta-i\,\sin\theta)=\cos\theta\, ,\qquad {\rm
168+
Im}(\cos\theta-i\,\sin\theta)=-\sin\theta\, .\\
169+
\noalign{\vskip12pt}
170+
{\rm (d)}\hskip5pt i^2=-1.\quad {\rm Re}(i^2)=-1\, ,\qquad {\rm Im}(i^2)=0\, .\\
171+
\noalign{\vskip12pt}
172+
{\rm (e)}\hskip5pt i\,(2-5\,i)=5+2\,i.\qquad {\rm Re}(5+2\,i)=5\, ,\qquad {\rm Im}(5+2\,i)=2\, .\\
173+
\noalign{\vskip12pt}
174+
{\rm (f)}\hskip5pt (1+2\,i)(2-3\,i)=2-3\,i+4\,i+6=8+i\, .\qquad {\rm Re}(8+i)=8\, ,\qquad {\rm
175+
Im}(8+i)=1\, .
176+
\end{array}
177+
$
178+
179+
\item Applying the rules for the multiplication and division of
180+
complex numbers yields:
181+
182+
$
183+
\begin{array}[h!]{lll}
184+
{\rm (a)}\hskip5pt (5-i)(2+3\,i)=10+15\,i-2\,i+3=13+13\,i\, .\\
185+
\noalign{\vskip12pt}
186+
{\rm (b)}\hskip5pt (3-4\,i)(3+4\,i)=9+12\,i-12\,i+16=25\, .\\
187+
\noalign{\vskip12pt}
188+
{\rm (c)}\hskip5pt (1+2\,i)^2=(1+2\,i)(1+2\,i)=1+2\,i+2\,i-4=-3+4\,i\, .\\
189+
\noalign{\vskip12pt}
190+
{\rm (d)}\hskip5pt \displaystyle{{10\over4-2\,i}={10\over4-2\,i}\times{4+2\,i\over4+2\,i}=
191+
{40+20\,i\over16+8\,i-8\,i+4}={40+20\,i\over20}=2+i\, .}\\
192+
\noalign{\vskip12pt}
193+
{\rm (e)}\hskip5pt \displaystyle{{3-i\over4+3\,i}={3-i\over4+3\,i}\times{4-3\,i\over4-3\,i}=
194+
{12-9\,i-4\,i-3\over16-12\,i+12\,i+9}={9-13\,i\over25}={9\over25}-i\,{13\over25}\, .}\\
195+
\noalign{\vskip12pt}
196+
{\rm (f)}\hskip5pt \displaystyle{{1\over i}={1\over i}\times{-i\over-i}=-i\, .}
197+
\end{array}
198+
$
199+
200+
\item We have that $z=(5+7\,i)(5+b\,i)=25+5b\,i+35\,i-7b$.
201+
202+
$
203+
\begin{array}[h!]{l}
204+
{\rm (a)}\hskip5pt {\rm If}\ b\ {\rm and}\ z\ {\rm are\ both\ real},\ {\rm then\ the \ imaginary\
205+
parts\ of\ both\ quantities\ vanish.}\ {\rm Thus,}\\
206+
\noalign{\vskip12pt}
207+
\hskip20pt {\rm Im}(z)=35+5b=0, {\rm so}\ b=-7.\\
208+
\noalign{\vskip12pt}
209+
{\rm (b)}\hskip5pt {\rm If}\ {\rm Im}(b)={4\over5},\ {\rm and}\ z\ {\rm is\ pure\ imaginary,}\
210+
{\rm then\ the\ real\ part\ of}\ z\ {\rm vanishes\!:}\\
211+
\noalign{\vskip12pt}
212+
\hskip20pt{\rm Re}(z)=25+5\bigl[i\,{\rm Im}(b)\bigr]i-7\,{\rm Re}(b)=25-4-7\,{\rm Re}(b)=21-7\,{\rm
213+
Re}(b)=0,\\
214+
\noalign{\vskip12pt}
215+
\hskip20pt{\rm so}\ {\rm Re}(b)=3.
216+
\end{array}
217+
$
218+
219+
220+
\item The graphical representation of the complex number $z=x+i\,y$ is
221+
the point $(x,y)$ on a set of axes where the $x$-axis corresponds to
222+
the real part of the complex number and the $y$-axis the imaginary
223+
part. The required points are
224+
225+
\begin{center}
226+
\includegraphics[width=8cm]{PS1-2}
227+
\end{center}
228+
229+
\item For a complex number $z=x+i\,y$, the polar form is $z=r\,e^{i\theta}$, where
230+
\begin{equation*}
231+
r=\sqrt{x^2+y^2}\, ,\qquad
232+
\theta={\rm tan}^{-1}\biggl({y\over x}\biggr)\, .
233+
\end{equation*}
234+
235+
$\begin{array}[h!]{l}
236+
{\rm (a)}\hskip5pt z=i.\ {\rm We\ have\ that}\ x=0\ {\rm and}\ y=1,\ {\rm so}\ r=1,\ {\rm and}\
237+
\theta={1\over2}\pi.\ {\rm Thus}\ i=e^{i\,\pi/2}.\\
238+
\noalign{\vskip12pt}
239+
{\rm (b)}\hskip5pt z=-i.\ {\rm We\ have\ that}\ x=0\ {\rm and}\ y=-1,\ {\rm so}\ r=1,\ {\rm and}\
240+
\theta={3\over2}\pi.\ {\rm Thus}\ -i=e^{3i\,\pi/2}.\\
241+
\noalign{\vskip12pt}
242+
{\rm (c)}\hskip5pt z=1+i.\ {\rm We\ have\ that}\ x=1\ {\rm and}\ y=1,\ {\rm so}\ r=\sqrt{2},\ {\rm
243+
and}\ \theta={1\over4}\pi.\\
244+
\noalign{\vskip12pt}
245+
\hskip20pt{\rm Thus}\ 1+i=\sqrt{2}\,e^{i\,\pi/4}.\\
246+
\noalign{\vskip12pt}
247+
{\rm (d)}\hskip5pt z=1-i\,\sqrt{3}.\ {\rm We\ have\ that}\ x=1\ {\rm and}\ y=-\sqrt{3},\ {\rm so}\
248+
r=2,\ {\rm and}\\
249+
\noalign{\vskip12pt}
250+
\hskip20pt\theta={\rm tan}^{-1}(-\sqrt{3})=-{1\over3}\pi.\ {\rm Thus}\
251+
1-i\,\sqrt{3}=2\,e^{-i\,\pi/3}.
252+
\end{array}
253+
$
254+
255+
256+
\item A complex number $z=r\,e^{i\,\theta}$ can be written as
257+
$z=r\cos\theta+i\,r\sin\theta$. Thus,
258+
259+
260+
$\begin{array}[h!]{l}
261+
{\rm (a)}\hskip5pt e^{-3\pi i/4}=\cos\bigl({3\over4}\pi\bigr)-i\,\sin\bigl({3\over4}\pi\bigr)=
262+
\displaystyle{-{1+i\over\sqrt{2}}}=-{1\over2}\sqrt{2}-i\,{1\over2}\sqrt{2}\, .\\
263+
\noalign{\vskip12pt}
264+
{\rm (b)}\hskip5pt e^{5\pi i/4}=\cos\bigl({5\over4}\pi\bigr)+i\,\sin\bigl({5\over4}\pi\bigr)=
265+
\displaystyle{-{1+i\over\sqrt{2}}}=-{1\over2}\sqrt{2}-i\,{1\over2}\sqrt{2}\, .\\
266+
\noalign{\vskip12pt}
267+
{\rm (c)}\hskip5pt 3\,e^{i}=3\cos 1+i\,\sin 1\, .\\
268+
\noalign{\vskip12pt}
269+
{\rm (d)}\hskip5pt \displaystyle{{1\over\sqrt{3}\,e^{\pi i/3}}=
270+
{\sqrt{3}\over3}\,e^{-\pi i/3}=
271+
{\sqrt{3}\over3}\cos\bigl({\textstyle{1\over3}}\pi\bigr)-
272+
{i\,\sqrt{3}\over3}\sin\bigl({\textstyle{1\over3}}\pi\bigr)=
273+
{\sqrt{3}\over6}-{i\over2}}\, .
274+
\end{array}
275+
$
276+
277+
%\end{enumerate}
278+
279+
%\subsubsection*{Tutorial}
280+
281+
282+
\item Given that $z=r\,e^{i\,\theta}$, we have
283+
\begin{eqnarray*}
284+
(z^2)^\ast=\bigl[\bigl(r\,e^{i\,\theta}\bigr)^2\bigr]^\ast=\bigl(r^2\,e^{2i\,\theta}\bigr)^\ast=r^2\,e^{-2i\,\theta}=\bigl(r\,e^{-i\,\theta}\bigr)^2=
285+
(z^\ast)^2\, .
286+
\end{eqnarray*}
287+
288+
\item
289+
\begin{enumerate}
290+
\item Suppose $z_0$ is a solution of $az^2+bz+c=0$, and therefore also of $z^2+b'z+c'=0$ where $b'=b/a$ and $c'=c/a$ and $a\ne0$. Given that $z_0^\ast$ is also a solution implies that
291+
\[
292+
(z-z_0)(z-z_0^\ast)=0~,
293+
\]
294+
or
295+
\[
296+
z^2-(z_0+z_0^\ast)z+|z_0|^2=0~,
297+
\]
298+
showing that $b'$ and $c'$ must be real. Conversely, if $a$, $b$, and $c$ are real, and $z_0$ is a solution of $az^2+bz+c=0$, then $az_0^2+bz_0+c=0$, and taking the conjugate yields
299+
\[
300+
a(z_0^2)^\ast+bz_0^\ast+c=0~,
301+
\]
302+
or
303+
\[
304+
a(z_0^\ast)^2+bz_0^\ast+c=0~,
305+
\]
306+
showing that $z_0^\ast$ is also a solution.
307+
308+
\item The roots of the polynomial are
309+
\[
310+
z_{\pm} = \frac{1}{2t} \left( -1 \pm \sqrt{1 - 4t} \right)
311+
\]
312+
which for $t>\frac{1}{4}$ has complex roots,
313+
\[
314+
z_{\pm} = - \frac{1}{2t} \pm i\, \frac{1}{2t}\sqrt{4t - 1} \, .
315+
\]
316+
The solutions will map out a circle centered at $z=-1$ in the complex plane.
317+
(To see this either show that $x={\rm Re}(z), y={\rm Im}(z)$ satisfies $(x+1)^2+y^2=1$,
318+
or that $|z+1|^2=1$.)
319+
\begin{center}
320+
\includegraphics[width=8cm]{PS1-1}
321+
\end{center}
322+
323+
\item Rotating the figure through $90^\circ$ is equivalent to multiplying both
324+
solutions by $e^{i\pi/2} = i$, thus
325+
\begin{align}
326+
z_{\pm} & = i \left( - \frac{1}{2t} \pm i\, \frac{1}{2t}\sqrt{4t - 1} \right)
327+
\nonumber \\
328+
& = \pm \frac{1}{2t}\sqrt{4t - 1} - \frac{i}{2t} \, . \nonumber
329+
\end{align}
330+
Forming the polynomial by multiplying together the two solutions gives
331+
\begin{align}
332+
p & =\left(z-z_+\right)\left(z-z_-\right)\nonumber\\
333+
&=
334+
\left( z - \frac{1}{2t}\sqrt{4t - 1} + \frac{i}{2t} \right)
335+
\left( z + \frac{1}{2t}\sqrt{4t - 1} + \frac{i}{2t} \right)
336+
\nonumber \\
337+
& = -\frac{1}{t}(-t z^2 - i\,z + 1) \nonumber \, ,
338+
\end{align}
339+
thus reducing $p=0$ to $-t z^2 - i\,z + 1=0$.
340+
%It can be seen that this is just the original polynomial with $z$ substituted with $iz=e^{i\pi/2}z$.
341+
So one solution is $a(t)=-t$, $b=-i$ and $c=1$. All other solutions are multiples of this set. The solutions that were conjugate pairs for the original equation are not conjugate pairs for the new equation as the coefficients of the latter are no longer real.
342+
An arbitrary rotation of angle $\theta$ can be made by substituting $z_{\pm}$ with $e^{i\theta}z_{\pm}$.
343+
\end{enumerate}
344+
\end{enumerate}
345+
346+
347+
348+
\end{document}

0 commit comments

Comments
 (0)