Books Sample

Aligned systems

A single line is not enough. I need several equations stacked, sometimes aligned on the equals, sometimes just centred as a block.

Without an alignment mark, Typst stacks and I get a gathered block:

𝑎=𝑏+𝑐𝑑=𝑒\begin{gathered}𝑎=𝑏+𝑐 \\ 𝑑=𝑒\end{gathered}
(3.1)

With an alignment mark, the equals signs line up. That is the default for a derivation I want a reader to scan vertically.

𝑎=𝑏+𝑐𝑑=𝑒\begin{aligned}𝑎 & =𝑏+𝑐 \\ 𝑑 & =𝑒\end{aligned}
(3.2)

Two alignment marks, so a continuation can sit under the right-hand side instead of under the left.

𝑎=𝑏=𝑐+𝑑𝑒=𝑓=𝑔\begin{aligned}𝑎 & =𝑏 & & =𝑐+𝑑 \\ 𝑒 & =𝑓 & & =𝑔\end{aligned}
(3.3)

Inequalities use the same columns. I want the relations stacked, not the variables.

𝑎<𝑏<𝑐𝑑≤𝑒≤𝑓𝑥≥𝑦≥𝑧\begin{aligned}𝑎 & <𝑏 & & <𝑐 \\ 𝑑 & \leq 𝑒 & & \leq 𝑓 \\ 𝑥 & \geq 𝑦 & & \geq 𝑧\end{aligned}
(3.4)

A first-order system is the same pattern with primes. I will use this for linearisation later.

𝑥′=𝑎𝑥+𝑏𝑦𝑦′=𝑐𝑥+𝑑𝑦\begin{aligned}{𝑥}^{\prime } & =𝑎𝑥+𝑏𝑦 \\ {𝑦}^{\prime } & =𝑐𝑥+𝑑𝑦\end{aligned}
(3.5)

Three unknowns, still one alignment column:

𝑥′=𝑎11𝑥+𝑎12𝑦+𝑎13𝑧𝑦′=𝑎21𝑥+𝑎22𝑦+𝑎23𝑧𝑧′=𝑎31𝑥+𝑎32𝑦+𝑎33𝑧\begin{aligned}{𝑥}^{\prime } & ={𝑎}_{11}𝑥+{𝑎}_{12}𝑦+{𝑎}_{13}𝑧 \\ {𝑦}^{\prime } & ={𝑎}_{21}𝑥+{𝑎}_{22}𝑦+{𝑎}_{23}𝑧 \\ {𝑧}^{\prime } & ={𝑎}_{31}𝑥+{𝑎}_{32}𝑦+{𝑎}_{33}𝑧\end{aligned}
(3.6)

Initial conditions belong on the same stack:

𝑦′=𝑓(𝑥,𝑦)𝑦(𝑥0)=𝑦0\begin{aligned}{𝑦}^{\prime } & =𝑓(𝑥,𝑦) \\ 𝑦({𝑥}_{0}) & ={𝑦}_{0}\end{aligned}
(3.7)

Lorenz, because three nonlinear lines is where a converter usually gives up.

𝑥˙=σ(𝑦−𝑥)𝑦˙=𝑥(ρ−𝑧)−𝑦𝑧˙=𝑥𝑦−β𝑧\begin{aligned}\dot{𝑥} & =\sigma (𝑦-𝑥) \\ \dot{𝑦} & =𝑥(\rho -𝑧)-𝑦 \\ \dot{𝑧} & =𝑥𝑦-\beta 𝑧\end{aligned}
(3.8)

A pendulum is one line of Newton and one line of the small-angle lie I will not tell yet.

θ′′+(𝑔𝐿)sin⁡θ=0θ′′+(𝑔𝐿)θ=0\begin{aligned}{\theta }^{\prime\prime }+\left(\frac{𝑔}{𝐿}\right)\sin \theta & =0 \\ {\theta }^{\prime\prime }+\left(\frac{𝑔}{𝐿}\right)\theta & =0\end{aligned}
(3.9)

Van der Pol, so a first-derivative term sits next to a cubic:

𝑥′′−μ(1−𝑥2)𝑥′+𝑥=0{𝑥}^{\prime\prime }-\mu (1-{𝑥}^{2}){𝑥}^{\prime }+𝑥=0
(3.10)

A longer derivation, still one alignment column:

(𝑔∘𝑓)′(𝑎)=𝑔′(𝑓(𝑎))𝑓′(𝑎)=𝑔′(𝑏)𝑓′(𝑎)\begin{aligned}{(𝑔\circ 𝑓)}^{\prime }(𝑎) & ={𝑔}^{\prime }(𝑓(𝑎)){𝑓}^{\prime }(𝑎) \\ & ={𝑔}^{\prime }(𝑏){𝑓}^{\prime }(𝑎)\end{aligned}
(3.11)

The product rule stretched out, because I need to see every term survive a line break.

(𝑢𝑣)′=𝑢′𝑣+𝑢𝑣′(𝑢𝑣𝑤)′=𝑢′𝑣𝑤+𝑢𝑣′𝑤+𝑢𝑣𝑤′\begin{aligned}{(𝑢𝑣)}^{\prime } & ={𝑢}^{\prime }𝑣+𝑢{𝑣}^{\prime } \\ {(𝑢𝑣𝑤)}^{\prime } & ={𝑢}^{\prime }𝑣𝑤+𝑢{𝑣}^{\prime }𝑤+𝑢𝑣{𝑤}^{\prime }\end{aligned}
(3.12)

Integrating factor for a first-order linear equation, written the way I actually compute it:

𝑦′+𝑃(𝑥)𝑦=𝑄(𝑥)(μ𝑦)′=μ𝑄μ(𝑥)=𝑒∫𝑃(𝑥) d𝑥𝑦=μ−1(∫μ𝑄 d𝑥+𝐶)\begin{aligned}{𝑦}^{\prime }+𝑃(𝑥)𝑦 & =𝑄(𝑥) \\ {(\mu 𝑦)}^{\prime } & =\mu 𝑄 \\ \mu (𝑥) & ={𝑒}^{\int 𝑃(𝑥)\, \mathrm{d}𝑥} \\ 𝑦 & ={\mu }^{-1}(\int \mu 𝑄\, \mathrm{d}𝑥+𝐶)\end{aligned}
(3.13)

Three-way alignment is just more rows. The middle line is a definition I keep rewriting until it sticks.

𝐹(𝑥)=∫0𝑥𝑓(𝑡) d𝑡𝐹′(𝑥)=𝑓(𝑥)𝐹(0)=0\begin{aligned}𝐹(𝑥) & ={\int }_{0}^{𝑥}𝑓(𝑡)\, \mathrm{d}𝑡 \\ {𝐹}^{\prime }(𝑥) & =𝑓(𝑥) \\ 𝐹(0) & =0\end{aligned}
(3.14)

Maxwell in SI, as a block I will need when vector calculus shows up. If the nabla and the dots fall over, the rest of the book is fiction.

∇⋅𝐸=ρε0∇⋅𝐵=0∇×𝐸=−∂𝐵∂𝑡∇×𝐵=μ0𝐽+μ0ε0∂𝐸∂𝑡\begin{aligned}\nabla \cdot 𝐸 & =\frac{\rho }{{\varepsilon }_{0}} \\ \nabla \cdot 𝐵 & =0 \\ \nabla \times 𝐸 & =-\frac{\partial 𝐵}{\partial 𝑡} \\ \nabla \times 𝐵 & ={\mu }_{0}𝐽+{\mu }_{0}{\varepsilon }_{0}\frac{\partial 𝐸}{\partial 𝑡}\end{aligned}
(3.15)

A trig identity I refuse to compress onto one line:

sin⁡(𝑎+𝑏)=sin⁡𝑎cos⁡𝑏+cos⁡𝑎sin⁡𝑏cos⁡(𝑎+𝑏)=cos⁡𝑎cos⁡𝑏−sin⁡𝑎sin⁡𝑏tan⁡(𝑎+𝑏)=tan⁡𝑎+tan⁡𝑏1−tan⁡𝑎tan⁡𝑏\begin{aligned}\sin (𝑎+𝑏) & =\sin 𝑎\cos 𝑏+\cos 𝑎\sin 𝑏 \\ \cos (𝑎+𝑏) & =\cos 𝑎\cos 𝑏-\sin 𝑎\sin 𝑏 \\ \tan (𝑎+𝑏) & =\frac{\tan 𝑎+\tan 𝑏}{1-\tan 𝑎\tan 𝑏}\end{aligned}
(3.16)