References
- Simple MathJax Plug-in for WordPress
- MathJax basic tutorial and quick reference
- MathJax in WordPress and LaTeX for Math Blogs by Yu Tsumura, Math dept., Ohio State University
- LaTeX:Symbols Art of Problem Solving
At first, we sample $f(x)$ in the $N$ ($N$ is odd) equidistant points around $x^*$:
\[
f_k = f(x_k),\: x_k = x^*+kh,\: k=-\frac{N-1}{2},\dots,\frac{N-1}{2}
\]
where $h$ is some step.
Then we interpolate points $\{(x_k,f_k)\}$ by polynomial
\begin{equation} \label{eq:poly}
P_{N-1}(x)=\sum_{j=0}^{N-1}{a_jx^j}
\end{equation}
Its coefficients $\{ a_j\}$ are found as a solution of system of linear equations:
\begin{equation} \label{eq:sys}
\left\{ P_{N-1}(x_k) = f_k\right\},\quad k=-\frac{N-1}{2},\dots,\frac{N-1}{2}
\end{equation}
Escape the Dollar Sign in Money
Differentiate the dollar sign in money from the LaTeX delimiter by escaping the monetary dollar sign with a backslash. For example, “the book costs \$ 1.00; the area is $x^2y^2$ feet”.
the book costs \$ 1.00; the area is $x^2y^2$ feet
In-line mode: $\sum_{i=0}^n i^2 = \dfrac{(n^2+n)(2n+1)}{6}$
$\sum_{i=0}^n i^2 = \dfrac{(n^2+n)(2n+1)}{6}$
Display mode:
$$\sum_{i=0}^n i^2 = \dfrac{(n^2+n)(2n+1)}{6}$$
$$\sum_{i=0}^n i^2 = \dfrac{(n^2+n)(2n+1)}{6}$$
Begin Align Equations
$$\small
\begin{align}
\sqrt{37} & = \sqrt{\frac{73^2-1}{12^2}} \\
& = \sqrt{\frac{73^2}{12^2}\cdot\frac{73^2-1}{73^2}} \\
& = \sqrt{\frac{73^2}{12^2}}\sqrt{\frac{73^2-1}{73^2}} \\
& = \frac{73}{12}\sqrt{1 – \frac{1}{73^2}} \\
& \approx \frac{73}{12}\left(1 – \frac{1}{2\cdot73^2}\right) \\
\end{align}
$$
\begin{align}
\sqrt{37} & = \sqrt{\frac{73^2-1}{12^2}} \\
& = \sqrt{\frac{73^2}{12^2}\cdot\frac{73^2-1}{73^2}} \\
& = \sqrt{\frac{73^2}{12^2}}\sqrt{\frac{73^2-1}{73^2}} \\
& = \frac{73}{12}\sqrt{1 - \frac{1}{73^2}} \\
& \approx \frac{73}{12}\left(1 - \frac{1}{2\cdot73^2}\right)
\end{align}
$$\small \begin{align} \sqrt{37} &= \sqrt{\frac{73^2-1}{12^2}} \\ &= \sqrt{\frac{73^2}{12^2}\cdot\frac{73^2-1}{73^2}} \\ &= \sqrt{\frac{73^2}{12^2}}\sqrt{\frac{73^2-1}{73^2}} \\ &= \frac{73}{12}\sqrt{1 - \frac{1}{73^2}} \\ &\approx \frac{73}{12}\left(1 - \frac{1}{2\cdot73^2}\right) \\ \end{align} $$
$$\small
\begin{align}
\sqrt{37} & = \sqrt{\frac{73^2-1}{12^2}} \\
& = \sqrt{\frac{73^2}{12^2}\cdot\frac{73^2-1}{73^2}} \\
& = \sqrt{\frac{73^2}{12^2}}\sqrt{\frac{73^2-1}{73^2}} \\
& = \frac{73}{12}\sqrt{1 - \frac{1}{73^2}} \\
& \approx \frac{73}{12}\left(1 - \frac{1}{2\cdot73^2}\right) \\
\end{align}
$$
Resize Integral Sign from default to Huge
\begin{align}
T &= {\int_{t_i}^{t_f}} \dfrac{\sqrt {1 + \bigg( \dfrac{dx}{y} \bigg)^2 } }{c(x,y)} dx \\
\\
T &= {\Huge \int_{t_i}^{t_f}} \dfrac{\sqrt {1 + \bigg( \dfrac{dx}{y} \bigg)^2 } }{c(x,y)} dx \\
\end{align}
\begin{align}
T &= {\int_{t_i}^{t_f}} \dfrac{\sqrt {1 + \bigg( \dfrac{dx}{y} \bigg)^2 } }{c(x,y)} dx \\
\\
T &= {\Huge \int_{t_i}^{t_f}} \dfrac{\sqrt {1 + \bigg( \dfrac{dx}{y} \bigg)^2 } }{c(x,y)} dx \\
\end{align}
Example of using a newcommand to define the absolute square of a number
$\newcommand{\abssq}[1]{{\lvert \, {#1} \, \rvert}^{\,2}}$
\begin{align}
\abssq{a_1} + \abssq{a_2} + \abssq{a_3} \dots = 1 \\
\abssq{a_1} \times \abssq{a_2} \\
log ( \abssq{a_1} \, \abssq{a_2} ) \\
\end{align}
$\newcommand{\abssq}[1]{{\lvert \, {#1} \, \rvert}^{\,2}}$
\begin{align}
\abssq{a_1} + \abssq{a_2} + \abssq{a_3} \dots = 1 \\
\abssq{a_1} \times \abssq{a_2} \\
log ( \abssq{a_1} \, \abssq{a_2} ) \\
\end{align}
newcommand for Dirac Notation Symbols
\[
\newcommand{\abs}[1]{\lvert \, {#1} \, \rvert}
\newcommand{\uvec}[1]{\boldsymbol{\hat{#1}}}
\newcommand{\braket}[2]{\left\langle{#1} \, \middle|\, {#2}\right\rangle}
\newcommand{\expval}[3]{\left \langle{#1} \, \middle |\, {#2}\, \middle |\, {#3} \right\rangle}
\]
\begin{align}
\ket{a} && \text{ket} \\
\bra{b} && \text{bra} \\
\braket{\Psi^*}{\Psi} && \text{braket} \\
\abs{\psi} && \text{absolute value} \\
\abssq{\psi} && \text{absolute value squared} \\
\braket{\frac{\Psi^*}{2}} {\Psi} && \text{braket} \\
\expval{\psi}{A}{\psi} && \text{expected value} \\
\end{align}
\[
\newcommand{\abs}[1]{\lvert \, {#1} \, \rvert}
\newcommand{\uvec}[1]{\boldsymbol{\hat{#1}}}
\newcommand{\braket}[2]{\left\langle{#1} \, \middle|\, {#2}\right\rangle}
\newcommand{\expval}[3]{\left \langle{#1} \, \middle |\, {#2}\, \middle |\, {#3} \right\rangle}
\]
\begin{align}
\ket{a} && \text{ket} \\
\bra{b} && \text{bra} \\
\braket{\Psi^*}{\Psi} && \text{braket} \\
\abs{\psi} && \text{absolute value} \\
\abssq{\psi} && \text{absolute value squared} \\
\braket{\frac{\Psi^*}{2}} {\Psi} && \text{braket} \\
\expval{\psi}{A}{\psi} && \text{expected value} \\
\end{align}
Add two kets
$$\ket{d} = \ket{b} + \ket{c} =
\begin{bmatrix}
b_1 \\
b_2 \\
\vdots \\
b_N
\end{bmatrix} +
\begin{bmatrix}
c_1 \\
c_2 \\
\vdots \\
c_N
\end{bmatrix} \
$$
$$\ket{d} = \ket{b} + \ket{c} =
\begin{bmatrix}
b_1 \\
b_2 \\
\vdots \\
b_N
\end{bmatrix} +
\begin{bmatrix}
c_1 \\
c_2 \\
\vdots \\
c_N
\end{bmatrix} \
$$
equation vs equation*
The non-starred version provides a numbered equation, which you can easily refer to with \label
and \ref
. The starred version does not provide the equation number, while keeping the same format. But the default configuration in Simple MathJax does not seem to number the equations.
\begin{equation}
e=mc^2
\end{equation}
\begin{equation*}
F = ma
\end{equation*}
\begin{equation}
e=mc^2
\end{equation}
\begin{equation*}
F = ma
\end{equation*}
Example: equation* in LaTeX
\begin{equation*}
\left( \sum_{k=1}^n a_k b_k \right)^2 \leq \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right)
\end{equation*}
\begin{equation*}
\left( \sum_{k=1}^n a_k b_k \right)^2 \leq \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right)
\end{equation*}
Summation limits above and below the summation sign
\begin{equation}
= \dfrac{\sum\limits_{S}^{N=R+S-1} \binom{n}k } { \sum\limits_{k=R}^{N=R+S-1} \binom{n}k }
\end{equation}
\begin{align}
&= \dfrac{\sum\limits_{S}^{N=R+S-1} \binom{n}k } {\sum\limits_{k=R}^{N=R+S-1} \binom {n}k
\end{align}
\color{ } tag
This is example of colored LaTeX ${\color{red} E = mc^2 \quad \text{some sample text}} \quad \text{revert to regular color}$
This is example of colored LaTeX ${\color{red} E = mc^2 \quad \text{some sample text}} \quad \text{revert to regular color}$
Split parentheses across two lines
\begin{aligned}
a=&\left(1+2+3+ \cdots \right. \\
& \cdots+ \left. \infty-2+\infty-1+\infty\right)
\end{aligned}
\begin{aligned}
a=&\left(1+2+3+ \cdots \right. \\
& \cdots+ \left. \infty-2+\infty-1+\infty\right)
\end{aligned}
Combinatorics: choose k objects from a set of n objects
\begin{equation}
P(k) = {n \choose k} p^k (1-p)^{ n-k}
\end{equation}
\begin{equation}
P(k) = {n \choose k} p^k (1-p)^{ n-k}
\end{equation}
Symbols for Set Theory
In the examples C = {1,2,3,4} and D = {3,4,5}
C $\cup$ D = {1,2,3,4} $\cup$ {3,4,5} = {1,2,3,4,5}
C $\cap$ D = {1,2,3,4} $\cap$ {3,4,5} = {3,4}
{3,4,5} $\subseteq$ D
{3,5} $\subset$ D
{1} $ \in C$
{1,6} $\notin$ C
{1,2,3} $\supseteq$ {1,2,3}
{1,2,3,4} $\supset$ {1,2,3}
{1,2,6} $\not\supset$ {1,9}
$D^c$ = {1,2,6,7}
x $\ni$ x = {1,2,3}
$\forall \, i = 1, 2, \dots, n$
$A \setminus B$
$\aleph_0$
In the examples C = {1,2,3,4} and D = {3,4,5}
C $\cup$ D = {1,2,3,4} $\cup$ {3,4,5} = {1,2,3,4,5}
C $\cap$ D = {1,2,3,4} $\cap$ {3,4,5} = {3,4}
{3,4,5} $\subseteq$ D
{3,5} $\subset$ D
{1} $ \in C$
{1,6} $\notin$ C
{1,2,3} $\supseteq$ {1,2,3}
{1,2,3,4} $\supset$ {1,2,3}
{1,2,6} $\not\supset$ {1,9}
$D^c$ = {1,2,6,7}
x $\ni$ x = {1,2,3}
$\forall \, i = 1, 2, \dots, n$
$A \setminus B$
$\aleph_0$
Continued Fractions
$$\cfrac{2}{1+\cfrac{2}{1+\cfrac{2}{1+\cfrac{2}{1}}}}$$
$$\cfrac{2}{1+\cfrac{2}{1+\cfrac{2}{1+\cfrac{2}{1}}}}$$
An Identity from Ramanujan (using continued fractions)
\begin{equation}
\frac{1}{\Bigl(\sqrt{\phi \sqrt{5}}-\phi\Bigr) e^{\frac25 \pi}} = 1+\cfrac{e^{-2\pi}} {1+\cfrac{e^{-4\pi}} {1+\cfrac{e^{-6\pi}} {1+\cfrac{e^{-8\pi}} {1+\ldots} } } }
\end{equation}
\begin{equation}
\frac{1}{\Bigl(\sqrt{\phi \sqrt{5}}-\phi\Bigr) e^{\frac25 \pi}} = 1+\cfrac{e^{-2\pi}} {1+\cfrac{e^{-4\pi}} {1+\cfrac{e^{-6\pi}} {1+\cfrac{e^{-8\pi}} {1+\ldots} } } }
\end{equation}
A Rogers-Ramanujan Identity
\begin{equation}
1 + \frac{q^2}{(1-q)}+\frac{q^6}{(1-q)(1-q^2)}+\cdots = \prod_{j=0}^{\infty}\frac{1}{(1-q^{5j+2})(1-q^{5j+3})}, \quad\quad \text{for $|q|<1$}.
\end{equation}
\begin{equation}
1 + \frac{q^2}{(1-q)}+\frac{q^6}{(1-q)(1-q^2)}+\cdots = \prod_{j=0}^{\infty}\frac{1}{(1-q^{5j+2})(1-q^{5j+3})}, \quad\quad \text{for $|q|<1$}.
\end{equation}
Cross Product
\begin{equation*}
\mathbf{V}_1 \times \mathbf{V}_2 =
\begin{vmatrix}
\mathbf{i} & \mathbf{j} & \mathbf{k} \\
\dfrac{\partial X}{\partial u} & \dfrac{\partial Y}{\partial u} & 0 \\
\dfrac{\partial X}{\partial v} & \dfrac{\partial Y}{\partial v} & 0
\end{vmatrix}
\end{equation*}
\begin{equation*}
\mathbf{V}_1 \times \mathbf{V}_2 =
\begin{vmatrix}
\mathbf{i} & \mathbf{j} & \mathbf{k} \\
\dfrac{\partial X}{\partial u} & \dfrac{\partial Y}{\partial u} & 0 \\
\dfrac{\partial X}{\partial v} & \dfrac{\partial Y}{\partial v} & 0
\end{vmatrix}
\end{equation*}
Set Fontsize
https://www.overleaf.com/learn/latex/Font_sizes%2C_families%2C_and_styles#Reference_guide
${\tiny tiny.}$
$\scriptsize \text{scriptsize}$
$\footnotesize \text{footnotesize}$
$\small \text{small}$
$\normalsize \text{normalsize.}$
$\large \text{large.}$
$\Large \text{Large}$
$\LARGE \text{LARGE.}$
${\huge huge.}$
${\Huge Huge.}$
${\texttt {\normalsize \text{ normalsize in typewriter font.}}}$
$\textbf{Example } \texttt{ Example } \texttt \textbf{Example}$
${\tiny tiny.}$
$\scriptsize \text{scriptsize}$
$\footnotesize \text{footnotesize}$
$\small \text{small}$
$\normalsize \text{normalsize.}$
$\large \text{large.}$
$\Large \text{Large}$
$\LARGE \text{LARGE.}$
${\huge huge.}$
${\Huge Huge.}$
${\texttt {\normalsize \text{ normalsize in typewriter font.}}}$
$\textbf{Example } \texttt{ Example } \texttt \textbf{Example}$
Numbering and Referencing Equations – Part 1
\begin{align}
e&=mc^2 \tag{1}\label{eq1} \\
\Big(\, -\, \dfrac{\hbar^2}{2m_e} {\nabla}^2 + V(\textbf{r}) \, \Big)\, \Psi &= E \, \Psi \tag{2a} \label{eq2a}\\
\widehat{\cal{H}} \, \Psi &= E \, \Psi \tag{2b} \label{eq2b}\\
\end{align}
Equation $\eqref{eq1}$ is one of the greatest equations in mankind’s history.
Equation $\eqref{eq2a} \text{ and } \eqref{eq2b}$ are time-independent Schrödinger Equation.
\begin{align}
e&=mc^2 \tag{1}\label{eq1} \\
\Big(\, -\, \dfrac{\hbar^2}{2m_e} {\nabla}^2 + V(\textbf{r}) \, \Big)\, \Psi &= E \, \Psi \tag{2a} \label{eq2a}\\
\widehat{\cal{H}} \, \Psi &= E \, \Psi \tag{2b} \label{eq2a}\\
\end{align}
Equation $\eqref{eq1}$ is one of the greatest equations in mankind's history.
Equation $\eqref{eq2a} \text{ and } \eqref{eq2b}$ are time-independent Schrödinger Equation.
Numbering and Referencing Equations – Part 2
Set fontsize and color for all equations
$\Huge \color{red}
\begin{align}
a &= b + c \tag{3}\label{eq3} \\
x &= yz \tag{4}\label{eq4}\\
l &= m – n \tag{5}\label{eq5}\\
\end{align}$
$\Huge \color{red}
\begin{align}
a &= b + c \tag{3}\label{eq3} \\
x &= yz \tag{4}\label{eq4}\\
l &= m - n \tag{5}\label{eq5}\\
\end{align}
$
Numbering and Referencing Equations – Part 3
Set fontsize and color for individual equations and variables
\begin{align}
\large \color{red} a &= \large \color{red} b + c \tag{6} \label{eq6} \\
\color{blue} x &= \color{purple} yz \tag{7} \label{eq7} \\
\color{green} l &= \color{cyan} m – n \tag{8} \label{eq8} \\
\end{align}
\begin{align}
\large \color{red} a &= \large \color{red} b + c \tag{6} \label{eq6} \\
\color{blue} x &= \color{purple} yz \tag{7} \label{eq7} \\
\color{green} l &= \color{cyan} m - n \tag{8} \label{eq8} \\
\end{align}
Elementary row operations (Gauss-Jordan elimination)
$
\left[\begin{array}{rrrr|r}
1 & 1 & 1 & 1 &1 \\
0 & 1 & 2 & 3 & 5 \\
0 & -2 & 0 & -2 & 2 \\
0 & 1 & -2 & 3 & 1 \\
\end{array} \right]
\xrightarrow{\substack{ {R_1-R_2} \\ {R_3-R_2} \\ {R_4-R_2} }}
\left[\begin{array}{rrrr|r}
1 & 0& -1 & -2 &-4 \\
0 & 1 & 2 & 3 & 5 \\
0 & 0 & 4 & 4 & 12 \\
0 & 0 & -4 & 0 & -4 \\
\end{array}\right]
\xrightarrow[\frac{-1}{4}R_4]{\frac{1}{4}R_3}
\left[\begin{array}{rrrr|r}
1 & 0& -1 & -2 &-4 \\
0 & 1 & 2 & 3 & 5 \\
0 & 0 & 1 & 1 & 3 \\
0 & 0 & 1 & 0& 1 \\
\end{array}\right]
$
$
\left[\begin{array}{rrrr|r}
1 & 1 & 1 & 1 &1 \\
0 & 1 & 2 & 3 & 5 \\
0 & -2 & 0 & -2 & 2 \\
0 & 1 & -2 & 3 & 1 \\
\end{array} \right]
\xrightarrow{\substack{ {R_1-R_2} \\ {R_3-R_2} \\ {R_4-R_2} }}
\left[\begin{array}{rrrr|r}
1 & 0& -1 & -2 &-4 \\
0 & 1 & 2 & 3 & 5 \\
0 & 0 & 4 & 4 & 12 \\
0 & 0 & -4 & 0 & -4 \\
\end{array}\right]
\xrightarrow[\frac{-1}{4}R_4]{\frac{1}{4}R_3}
\left[\begin{array}{rrrr|r}
1 & 0& -1 & -2 &-4 \\
0 & 1 & 2 & 3 & 5 \\
0 & 0 & 1 & 1 & 3 \\
0 & 0 & 1 & 0& 1 \\
\end{array}\right]
$
Use array for tabular
$$
\begin{array}{ |c|c|c| }
\hline
a & a^2 \pmod{5} & 2a^2 \pmod{5} \\
\hline
0 & 0 & 0 \\
1 & 1 & 2 \\
2 & 4 & 3 \\
3 & 4 & 3 \\
4 & 1 & 2 \\
\hline
\end{array}
$$
$$
\begin{array}{ |c|c|c| }
\hline
a & a^2 \pmod{5} & 2a^2 \pmod{5} \\
\hline
0 & 0 & 0 \\
1 & 1 & 2 \\
2 & 4 & 3 \\
3 & 4 & 3 \\
4 & 1 & 2 \\
\hline
\end{array}
$$
Giving reasons for each line in align
$\normalsize$
\begin{align*}
f(ab)&=(ab)^2 && (\text{by definition of $f$})\\
&=(ab)(ab)\\
&=a^2 b^2 && (\text{since $G$ is abelian})\\
&=f(a)f(b) && (\text{by definition of $f$}).
\end{align*}
$\normalsize$
\begin{align*}
f(ab)&=(ab)^2 && (\text{by definition of $f$})\\
&=(ab)(ab)\\
&=a^2 b^2 && (\text{since $G$ is abelian})\\
&=f(a)f(b) && (\text{by definition of $f$}).
\end{align*}
Explanations Above (overbrace) and below (underbrace) Equations
\begin{align}
\overbrace{a_0+a_1+a_2+\cdots+a_n}^{x} \\
\\
n=\underbrace{1+1+\cdots+1}_{\text{$n$ times}}. \\
\end{align}
\begin{align}
\overbrace{a_0+a_1+a_2+\cdots+a_n}^{x} \\
\\
n=\underbrace{1+1+\cdots+1}_{\text{$n$ times}}. \\
\end{align}
Markdown Block References
Example of List
Field theory is one of the cornerstones of classical physics. The most notable examples of classical fields are the force fields that one encounters in the description of gravitational and electromagnetic phenomena. These fields are caused by the presence of masses and electric charges, respectively. In this chapter we present a framework for classical field theory, which is known as the Lagrangian formulation. In this formulation the dynamics of a system is described by a single function, the Lagrangian. Via a variational principle the Lagrangian yields the equations of motion which govern the time evolution of that system, so it is a useful mnemonic for summarizing a theory in a concise form. The use of a variational principle to express the equations of classical physics is very old. Fermat’s principle in optics (1657) and Maupertuis’ principle in mechanics (1744) are famous examples.
Continue reading