Having math equations in a report can be painful. Here are some LaTeX commands often used in scientific reports. I will try to keep this post updated.

The LaTeX rendering on this website is done by an open-source package KaTeX.

Common Structures

LaTeX Code Output
\frac{abc}{xyz} abcxyz\frac{abc}{xyz}
\overline{abc} abc\overline{abc}
\underline{abc} abc\underline{abc}
\overrightarrow{abc} abc\overrightarrow{abc}
\overleftarrow{abc} abc\overleftarrow{abc}
\sqrt{abc} abc\sqrt{abc}
\sqrt[n]{abc} abcn\sqrt[n]{abc}
\widehat{abc} abc^\widehat{abc}
\widetilde{abc} abc~\widetilde{abc}
𝚏'' ff''
\overbrace{abc} abc\overbrace{abc}
\underbrace{abc} abc\underbrace{abc}
\underbrace{x+\cdots+x}_{n\text{ times}} x++xn times\underbrace{x+\cdots+x}_{n\text{ times}}
\frac{\partial y}{\partial x1} yx1\frac{\partial y}{\partial x1}
\frac{\mathrm{d} Q}{\mathrm{d} t} dQdt\frac{\mathrm{d} Q}{\mathrm{d} t}
\sum^{n}_{i=1} $$\sum^{n}_{i=1}$$
\prod^{n}_{i=1} $$\prod^{n}_{i=1}$$
\lim_{x\to\infty} f(x) $$\lim_{x\to\infty} f(x)$$
\int_{a}^{b} x^2 dx $$\int_{a}^{b} x^2 dx$$

Math Operators

Code Output
\delta δ\delta
\Delta Δ\Delta
\nabla \nabla
\forall \forall
\mathbb{R} R\mathbb{R}
\in \in

Arrows and Brackets

Code Output
\leftarrow \leftarrow
\Leftarrow \Leftarrow
\rightarrow \rightarrow
\Rightarrow \Rightarrow
\leftrightarrow \leftrightarrow
\Leftrightarrow \Leftrightarrow

Greek Letters

\alpha α \beta β \gamma γ \delta δ \epsilon ϵ \zeta ζ \eta η \theta θ \iota ι \kappa κ \lambda λ \mu μ \nu ν \xi ξ \omicron ο \pi π \rho ρ \sigma σ \tau τ \upsilon υ \phi ϕ \chi χ \psi ψ \omega ω \varepsilon ε \vartheta ϑ \varkappa ϰ \varpi ϖ \varrho ϱ \varsigma ς \varphi φ \digamma ϝ

Sample Equations

1. Code

\frac{\mathrm{d}}{\mathrm{d} x}\left[|w x-y|^{2}\right]=2(w x-y) \cdot w

1. Output

ddx[wxy2]=2(wxy)w\frac{\mathrm{d}}{\mathrm{d} x}\left[|w x-y|^{2}\right]=2(w x-y) \cdot w

2. Code

\sigma=\frac{e^z}{1+e^z}

\sigma’=\frac{e^z}{(1+e^z)^2}=\frac{e^z}{1+e^z} \cdot \frac{1}{1+e^z} =\sigma(1-\sigma)

2. Output

σ=ez1+ez\sigma=\frac{e^z}{1+e^z}

σ=ez(1+ez)2=ez1+ez11+ez=σ(1σ)\sigma’=\frac{e^z}{(1+e^z)^2}=\frac{e^z}{1+e^z} \cdot \frac{1}{1+e^z} =\sigma(1-\sigma)

3.Code

\left\{
             \begin{array}{lr}
             x=\dfrac{3\pi}{2}(1+2t)\cos(\dfrac{3\pi}{2}(1+2t)), &  \\
             y=s, & 0\leq s\leq L,|t|\leq1.\\
             z=\dfrac{3\pi}{2}(1+2t)\sin(\dfrac{3\pi}{2}(1+2t)), &  
             \end{array}
\right.

3.Output

{x=3π2(1+2t)cos(3π2(1+2t)),y=s,0sL,t1.z=3π2(1+2t)sin(3π2(1+2t)),\left\{ \begin{array}{lr} x=\dfrac{3\pi}{2}(1+2t)\cos(\dfrac{3\pi}{2}(1+2t)), & \\ y=s, & 0\leq s\leq L,|t|\leq1.\\ z=\dfrac{3\pi}{2}(1+2t)\sin(\dfrac{3\pi}{2}(1+2t)), & \end{array} \right.