1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
|
%%
%% This is file `exfsamp.tex',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% exframe.dtx (with options: `samplesingle')
%%
%% Copyright (C) 2011-2024 Niklas Beisert
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%% https://www.latex-project.org/lppl.txt
%% and version 1.3c or later is part of all distributions of LaTeX
%% version 2008 or later.
%%
\NeedsTeXFormat{LaTeX2e}[1996/12/01]
\ProvidesFile{exfsamp.tex}[2024/10/18 v3.5 standalone sample for exframe]
\documentclass[12pt]{article}
\usepackage{geometry}
\geometry{layout=a4paper}
\geometry{paper=a4paper}
\geometry{margin=2.5cm}
\parindent0pt
\parskip0.5ex
\usepackage{amsmath}
\usepackage{hyperref}
\PassOptionsToPackage{loadlang=en|de}{metastr}
\PassOptionsToPackage{course=true}{metastr}
%%\usepackage{metastr}
%%\metasetlang{de}
\usepackage[extstyle]{exframe}
\exercisesetup{solutions=false}
%%\exercisesetup{solutions=true}
\exercisesetup{autolabelproblem=true}
\exercisestyle{plainheader}
\exerciseconfig{composeheaderbelowright}{\getsheetdata{points}}%
\exercisestyle{subproblemdelimitem}
\exerciseconfig{countersheet}{\Roman{sheet}}
\exerciseconfig{countersubproblem}{\roman{subproblem}}
\exerciseconfig{countersubproblemmax}{vii}
\exerciseconfig{insertsubprobleminfo}{%
\switchpoints{}{\addprobleminfo*{%
\hspace{-\getexerciseconfig{skipsubprobleminfo}}*}}%
{}{}{\getsubproblempoints{}}}
\ifdefined\metaset
\metasetterm[en]{sheet}{Exercise Sheet}
\metasetterm[en]{sheets}{Exercise Sheets}
\metasetterm[de]{sheet}{\"Ubungsblatt}
\metasetterm[de]{sheets}{\"Ubungsbl\"atter}
\else
\exerciseconfig{termsheet}{\"Ubungsblatt}
\exerciseconfig{termsheets}{\"Ubungsbl\"atter}
\fi
\exercisestyle{problempointsat=margin}
\reversemarginpar
\exerciseconfig{composepointsmargin}[1]{#1p.}
\exerciseconfig{composepointspairmargin}[2]{%
\ifdim#2pt=0pt#1p.%
\else\ifdim#1pt=0pt+#2p.%
\else#1+#2p.%
\fi\fi}
\exerciseconfig{styletitle}{\sffamily\bfseries}
\exerciseconfig{skipproblembelow}{1.5cm}
\exercisestyle{fracpoints}
\exercisestyle{solutionbelow=problem}
\exerciseconfig{skipsolutionitemsub}{-1pt}
\exercisestyle{solutionsep}
\exercisesetup{pdfdata=sheet}
\ifdefined\metaset
\metaset[sep]{subtitle}{, }
\metaset{subtitle}{\ifsolutions\metatranslate[#1]{solutions} \fi%
\metaif[use]{sheettitle}
{\metapick[#1]{sheettitle}}
{\metapick[#1]{material}}}
\metaset{author}{\exerciseifempty{\getsheetdata{author}}%
{\metapick[#1]{instructor}}{\metapick[#1]{sheetauthor}},
\metapick[#1]{institution}}
\else
\exerciseconfig{composemetasheet}[2]{\getexercisedata{course},
\ifsolutions\getexerciseconfig{termsolutions} \fi%
\exerciseifempty{#2}{\getexerciseconfig{termsheet} #1}{#2}}
\exercisedata{title=%
{\getexercisedata{course},
\ifsolutions\getexercisedata{solutions} \fi%
\getexercisedata{material}}}
\exercisedata{author=%
{\getexercisedata{instructor}, \getexercisedata{institution}}}
\fi
\ifdefined\metaset
\metaset{institution}{Katharinen-Volksschule}
\metaset[de]{course}{Mathematik}
\metaset[en]{course}{Mathematics}
\metaset{instructor}{J.\ G.\ B\"uttner}
\metaset{period}{ca.\ 1786}
\metaset[de]{material}{\"Ubungsaufgaben}
\metaset[en]{material}{Exercise Problems}
\else
\exercisedata{institution={Katharinen-Volksschule}}
\exercisedata{course={Mathematik}}
\exercisedata{instructor={J.\ G.\ B\"uttner}}
\exercisedata{period={ca.\ 1786}}
\exercisedata{material={\"Ubungsaufgaben}}
\fi
\begin{document}
\begin{sheet}[number=5,label={sheet5}]
\begin{problem}[title={Sums},points=99+4]
\exerciseloopstr{\getsubproblemlist{}}{c}%
\hfill\begin{tabular}{c|\exerciseloopret|c}
\exerciseloop{\getsubproblemlist{}}
{&\ref{\getexerciseconfig{labelsubproblem}{#1}}}
&\ref{prob:\problemtag}\\\hline
\getexerciseconfig{termpoints}
\exerciseloop{\getsubproblemlist{}}{&\extractpoints{\getsubproblempoints{#1}}}
&\extractpoints{\getproblempoints{}}
\\
extra
\exerciseloop{\getsubproblemlist{}}{&\extractpoints*{\getsubproblempoints{#1}}}
&\extractpoints*{\getproblempoints{}}
\end{tabular}
This problem deals with sums and series.
\begin{subproblem}[points=2,difficulty=simple,label={\problemtag-simplesum}]
Compute the sum
\showpoints
\begin{equation}
1+2+3.
\end{equation}
\begin{solution}
The result is
\begin{equation}
1+2+3=6.
\end{equation}
\end{solution}
\end{subproblem}
\begin{subproblem}[points=97+0.5,difficulty=lengthy]
Compute the sum
\begin{equation}
1+2+3+\ldots+98+99+100.
\end{equation}
Keep calm and calculate!
%%That ought to keep him occupied for a while
\end{subproblem}
\begin{solution}[author={C.\ F.\ Gau\ss}]
We use the result $1+2+3=6$ from part \ref{\problemtag-simplesum})
to jumpstart the calculation. The remaining sums yield
\awardpoints*[1 for each remaining sum]{97}
\begin{equation}
6+4+5+\ldots+99+100=5050.
\end{equation}
Alternatively the summands can be grouped into pairs as follows:
\begin{align}
1+100&=101,\\
2+99&=101,\\
3+98&=101,\\
\ldots &\nonumber\\
50+51&=101.
\end{align}
These amount to 50 times the same number 101.
Therefore the sum equals
\begin{equation}
1+2+\ldots+99+100=50\cdot 101=5050.
\end{equation}
\textit{Ligget se!} \awardpoints{97+0.5}
\end{solution}
You may give the final part a try:
\begin{subproblem}[optional={optional},
difficulty={requires inspiration},points={+3.5}]
Compute the series
\showpoints
\begin{equation}
1+2+3+\ldots
\end{equation}
\begin{solution}
The series is divergent, so the result is $\infty$ \awardpoints{+1}.
\par
However, after subtracting the divergent part,
the result clearly is
\begin{equation}
\zeta(-1)=-\frac{1}{12}\,,
\end{equation}
where the zeta-function $\zeta(s)$ is defined by
\begin{equation}
\zeta(s):=\sum_{k=1}^\infty \frac{1}{k^s}\,.
\end{equation}
This definition holds only for $s>1$ where the sum is convergent,
but one can continue the complex analytic function to $s<0$
\awardpoints{+1.5}.
\par
Another way of understanding the result
is to use the indefinite summation formula
for arbitrary exponent $s$ in the summand
(which also follows from the Euler--MacLaurin formula)
\begin{equation}
\sum_n n^s
= \frac{n^{s+1}}{s+1}
-\sum_{j=0}^s \frac{\zeta(j-s)\,s!}{(s-j)!\,j!}\,n^j
= \ldots - \zeta(-s)\,n^0.
\end{equation}
Curiously, the constant term with $j=0$ is just the desired result
but with the wrong sign
(in fact, the constant term of an indefinite sum is ambiguous;
for the claim we merely set $j=0$
in the expression which holds for others values of $j$)
\awardpoints{+0.5}.
In order to understand the sign,
we propose that the above formula describes the regularised result
for the sum with limits $+\infty$ and $n$
\begin{equation}
\sum_{k=+\infty}^n k^s
\simeq \frac{n^{s+1}}{s+1}
-\sum_{j=0}^s \frac{\zeta(j-s)\,s!}{(s-j)!\,j!}\,n^j.
\end{equation}
Then we flip the summation limits of the desired sum
to bring it into the above form
\awardpoints{+0.5}
\begin{equation}
\sum_{k=1}^\infty k^s
= -\sum_{k=\infty}^0 k^s
\simeq \zeta(-s).
\end{equation}
\end{solution}
\end{subproblem}
\end{problem}
\begin{problem}[points=1, difficulty=insane]
Show that the equation
\begin{equation}
a^3+b^3=c^3
\end{equation}
has no positive integer solutions.
\end{problem}
\begin{solution}
\normalmarginpar
This is beyond the scope of this example.
\marginpar{\footnotesize\raggedright does not fit here.\par}
\end{solution}
\ifsolutions\else
\textbf{Grading:}\par
\exerciseloopstr{\getproblemlist{}}{|c}
\begin{tabular}{|c|\exerciseloopret||c|}\hline
\getexerciseconfig{termsheet} \ref{sheet5}
\exerciseloop{\getproblemlist{*}}
{&\ref{\getexerciseconfig{labelproblem}{#1}}}
&total
\\\hline
value
\exerciseloop{\getproblemlist{*}}
{&\extractpoints{\getproblempoints{#1}}}%
&\extractpoints{\getsheetpoints{}}
\\\hline
\exerciseloop{\getproblemlist{*}}{&}
&\\\hline
\end{tabular}\qquad
\exerciseloop{\getproblemlist{*}}{
\exerciseloopstr{\getsubproblemlist{#1}}{|c}
\ifnum\value{exerciseloop}>0\relax
\begin{tabular}{|c|\exerciseloopret||c|}\hline
\getexerciseconfig{termproblem} \ref{\getexerciseconfig{labelproblem}{#1}}
\exerciseloop{\getsubproblemlist{#1}}
{&\ref{\getexerciseconfig{labelsubproblem}{##1}}}
&total
\\\hline
value
\exerciseloop{\getsubproblemlist{#1}}
{&\extractpoints{\getsubproblempoints{##1}}}%
&\extractpoints{\getproblempoints{#1}}
\\\hline
\exerciseloop{\getsubproblemlist{#1}}{&}
&\\\hline
\end{tabular}\quad
\fi
}
\fi
\end{sheet}
\end{document}
\endinput
%%
%% End of file `exfsamp.tex'.
|