by

Mathematical & Chemical API Integration

December 23, 2018

MathML Integral Formula

$\begin{array}{r}f\left(a\right)=\frac{1}{2\pi i}{\oint }_{\gamma }\frac{f\left(z\right)}{z-a}dz\end{array}$

or Tex base ... Integral Formula

\begin{align} f(a) = \frac{1}{2\pi i} \oint_{\gamma}\frac{f(z)}{z-a}dz \end{align}

Dynamic Equations - step by step

Expand the following:

\begin{align} (x+1)^2 &\cssId{Step1}{= (x+1)(x+1)}\\ &\cssId{Step2}{= x(x+1) + 1(x+1)}\\ &\cssId{Step3}{= (x^2+x) + (x+1)}\\ &\cssId{Step4}{= x^2 + (x + x) + 1}\\ &\cssId{Step5}{= x^2+2x+1}\\ \end{align}

\begin{align} When $a \ne 0$, there are two solutions to $ax^2 bx c = 0$ and they are \end{align}

\begin{align} x = {-b \pm \sqrt{b^2-4ac} \over 2a}. \end{align}

Double angle formula for Cosines

\begin{align} \cos(θ+φ)=\cos(θ)\cos(φ)−\sin(θ)\sin(φ) \end{align}

Gauss' Divergence Theorem

\begin{align} \int_D ({\nabla\cdot} F)dV=\int_{\partial D} F\cdot ndS \end{align}

Curl of a Vector Field

\begin{align} \vec{\nabla} \times \vec{F} = \left( \frac{\partial F_z}{\partial y} - \frac{\partial F_y}{\partial z} \right) \mathbf{i} + \left( \frac{\partial F_x}{\partial z} - \frac{\partial F_z}{\partial x} \right) \mathbf{j} + \left( \frac{\partial F_y}{\partial x} - \frac{\partial F_x}{\partial y} \right) \mathbf{k} \end{align}

Standard Deviation

\begin{align} \sigma = \sqrt{ \frac{1}{N} \sum_{i=1}^N (x_i -\mu)^2} \end{align}

Definition of Christoffel Symbols

\begin{align} (\nabla_X Y)^k = X^i (\nabla_i Y)^k = X^i \left( \frac{\partial Y^k}{\partial x^i} + \Gamma_{im}^k Y^m \right) \end{align}

The Lorenz Equations

\begin{align} \dot{x} & = \sigma(y-x) \\ \dot{y} & = \rho x - y - xz \\ \dot{z} & = -\beta z xy \end{align}

Cauchy's Integral Formula

\begin{align} f(a) = \frac{1}{2\pi i} \oint\frac{f(z)}{z-a}dz \end{align}

The Cauchy-Schwarz Inequality

$\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)$

A Cross Product Formula

$\mathbf{V}_1 \times \mathbf{V}_2 = \begin{vmatrix} \mathbf{i} & \mathbf{j} & \mathbf{k} \\ \frac{\partial X}{\partial u} & \frac{\partial Y}{\partial u} & 0 \\ \frac{\partial X}{\partial v} & \frac{\partial Y}{\partial v} & 0 \\ \end{vmatrix}$

The probability of getting $$k$$ heads when flipping $$n$$ coins is:

$P(E) = {n \choose k} p^k (1-p)^{ n-k}$

An Identity of Ramanujan

$\frac{1}{(\sqrt{\phi \sqrt{5}}-\phi) e^{\frac25 \pi}} = 1 \frac{e^{-2\pi}} {1 \frac{e^{-4\pi}} {1 \frac{e^{-6\pi}} {1 \frac{e^{-8\pi}} {1 \ldots} } } }$

A Rogers-Ramanujan Identity

$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}.$

Maxwell's Equations

\begin{align} \nabla \times \vec{\mathbf{B}} -\, \frac1c\, \frac{\partial\vec{\mathbf{E}}}{\partial t} & = \frac{4\pi}{c}\vec{\mathbf{j}} \\ \nabla \cdot \vec{\mathbf{E}} & = 4 \pi \rho \\ \nabla \times \vec{\mathbf{E}}\, \, \frac1c\, \frac{\partial\vec{\mathbf{B}}}{\partial t} & = \vec{\mathbf{0}} \\ \nabla \cdot \vec{\mathbf{B}} & = 0 \end{align}

In-line Mathematics

Finally, while display equations look good for a page of samples, the ability to mix math and text in a paragraph is also important. This expression $$\sqrt{3x-1} (1 x)^2$$ is an example of an inline equation. As you see, equations can be used this way as well, without unduly disturbing the spacing between lines.

Trig Identity Formulas

Use these fundemental formulas of trigonometry to help solve problems by re-writing expressions in another equivalent form.

Basic Identities

$\sin(x)=\frac{1}{\csc(x)}$

$\cos(x)=\frac{1}{\sec(x)}$

$\tan(x)=\frac{1}{\cot(x)}$

$\sec(x)=\frac{1}{\cos(x)}$

$\csc(x)=\frac{1}{\sin(x)}$

$\cot(x)=\frac{1}{\tan(x)}$

$\tan(x)=\frac{\sin(x)}{\cos(x)}$

$\sin(-x)=-\sin(x)$

$\cos(-x)=\cos(x)$

$\tan(-x)=-\tan(x)$

Pythagorean Identities

$\sin^2(x) \cos^2(x)=1$

$1 \tan^2(x)=\sec^2(x)$

$1 \cot^2(x)=\csc^2(x)$

Sum and Difference Formulas

$\sin(a b)=\sin(a)\cos(b) \cos(a)\sin(b)$

$\sin(a-b)=\sin(a)\cos(b)-\cos(a)\sin(b)$

$\cos(a b)=\cos(a)\cos(b)-\sin(a)\sin(b)$

$\cos(a-b)=\cos(a)\cos(b) \sin(a)\sin(b)$

$\tan(a b)=\frac{\tan(a) \tan(b)}{1-\tan(a)\tan(b)}$

$\tan(a-b)=\frac{\tan(a)-\tan(b)}{1 \tan(a)\tan(b)}$

$\sin(x) \sin(y)=2\sin(\frac{x y}{2})\cos(\frac{x-y}{2})$

$\sin(x)-\sin(y)=2\cos(\frac{x y}{2})\sin(\frac{x-y}{2})$

$\cos(x) \cos(y)=2\cos(\frac{x y}{2})\cos(\frac{x-y}{2})$

$\cos(x)-\cos(y)=-2\sin(\frac{x y}{2})\sin(\frac{x-y}{2})$

Double Angle Formulas

$\sin(2x)=2\sin(x)\cos(x)$

$\cos(2x)=\cos^2(x)-\sin^2(x)=1-2\sin^2(x) = 2\cos^2(x)-1$

Half Angle Formulas

$\sin(\frac{x}{2})=\pm\sqrt{\frac{1-\cos(x)}{2}}$

$\cos(\frac{x}{2})=\pm\sqrt{\frac{1 \cos(x)}{2}}$

$\tan(\frac{x}{2})=\pm\sqrt{\frac{1-\cos(x)}{1 \cos(x)}}=\frac{1-\cos(x)}{\sin(x)}=\frac{\sin(x)}{1 \cos(x)}$

Trigonometric Products

$\sin(x)\cos(y)=\frac{\sin(x y) \sin(x-y)}{2}$

$\cos(x)\cos(y)=\frac{\cos(x y) \cos(x-y)}{2}$

$\sin(x)\sin(y)=\frac{\cos(x-y)-\cos(x y)}{2}$

In-line Chemical Equations

Finally, while display equations look good for a page of samples, the ability to mix Chemical Equations and text in a paragraph is also important. This expression $$\ce{Zn^2 <=>[ 2OH-][ 2H ] \underset{\text{amphoteres Hydroxid}}{\ce{Zn(OH)2 v}} <=>[ 2OH-][ 2H ] \underset{\text{Hydroxozikat}}{\ce{[Zn(OH)4]^2-}}}$$ is an example of an inline equation. As you see, equations can be used this way as well, without unduly disturbing the spacing between lines.