Skip to content

Commit 46bfe5b

Browse files
authored
Add example with more math formulas (#46)
1 parent 50c32ac commit 46bfe5b

File tree

2 files changed

+45
-0
lines changed

2 files changed

+45
-0
lines changed

content/examples/math-formulas.sil

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
\begin[papersize=a5]{document}
2+
\use[module=packages.math]
3+
\nofolios
4+
\neverindent
5+
\define[command=section]{\medskip\noindent\font[size=12pt]{\strong{\process}}\medskip}
6+
\font[family=Libertinus Serif]
7+
8+
\section[numbered=false]{Laplace’s method}
9+
10+
Suppose \math{f(x)} is a twice continuously differentiable function on \math{[a,b]}, and there exists a unique point \math{x_0 \in (a,b)} such that:
11+
\math[mode=display]{f(x_0) = \max_{x \in [a,b]} f(x) \quad \text{and} \quad f''(x_0) < 0.}
12+
13+
Then:
14+
\math[mode=display, numbered=true]{\lim_{n\to\infty} \frac{\int_a^b e^{nf(x)} \, dx}{e^{nf(x_0)} \sqrt{\frac{2\pi}{n(-f''(x_0))}}}= 1.}
15+
16+
\section[numbered=false]{Euler Product Formula}
17+
18+
Let’s take \math{s \in \mathbb{C}}.
19+
The Euler Product Formula, when \math{\Re(s) > 1}, is given by:
20+
\math[mode=display, numbered=true]{\prod_{p \in \mathbb{P}} (\frac{1}{1 - p^{-s}})
21+
= \prod_{p \in \mathbb{P}} (\sum_{k=0}^{\infty}\frac{1}{p^{ks}})
22+
= \sum_{n=1}^{\infty} \frac{1}{n^s}
23+
= \zeta (s)
24+
= \frac{1}{\Gamma(s)} \int_0^\infty \frac{x ^ {s-1}}{e ^ x - 1} \, \mathrm{d}x}
25+
26+
Where:
27+
\math[mode=display]{\Gamma (s) = \int_0^\infty x^{s-1}\,e^{-x} \, \mathrm{d}x}
28+
29+
\section[numbered=false]{Stirling’s formula}
30+
31+
It is also called Stirling’s approximation for factorials:
32+
\math[mode=display, numbered=true]{\lim_{n\to +\infty} \frac{n\,!}{\sqrt{2 \pi n} \; (n/e)^{n}} = 1}
33+
34+
Also frequently written as:
35+
\math[mode=display]{n\,!\sim \sqrt{2\pi n}\, (\frac{n}{e})^n}
36+
37+
One can easily derive the following limit from Stirling’s formula:
38+
\math[mode=display]{\lim_{n\to\infty} \frac{(n!)^{1/n}}{n} = \frac{1}{e}}
39+
40+
\end{document}

data/examples.toml

+5
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,11 @@ fn = "math"
145145
source = "math.sil"
146146
title = "Math"
147147

148+
[[packages]]
149+
fn = "math-formulas"
150+
source = "math-formulas.sil"
151+
title = "More math formulas"
152+
148153
[[packages]]
149154
fn = "parallel"
150155
source = "parallel.sil"

0 commit comments

Comments
 (0)