LaTeX – Align set of equations

This note will teach us how to write multiple equations, specifically when writing articles in an inline mode on microblogging sites. In simple words, it demonstrates how to align a set of multiline equations using LaTeX.

Align a set of multiline equations in LaTeX:

Example 1: Align square root solving equations

In the below example, we have demonstrated how to write a series of equations in the same aligned order while solving a square root problem.

\begin{aligned} \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{aligned}

\begin{aligned}
 \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{aligned}

Example 2: Align string of equations

In the below example, we have demonstrated how to write a series of equations in the same aligned order to represent string of equations.

 \begin{aligned} ((2x+3)^3)' &= 3(2x+3)^2 \cdot (2x+3)' \\ &= 3(2x+3)^2 \cdot 2 \\ &= 6(2x+3)^2. \end{aligned}

\begin{aligned}
((2x+3)^3)' &= 3(2x+3)^2 \cdot (2x+3)' \\
&= 3(2x+3)^2 \cdot 2 \\
&= 6(2x+3)^2.
\end{aligned}

Example 3: Align summation function

\begin{aligned} f(u) & =\sum_{j=1}^{n} x_jf(u_j)&\\ & =\sum_{j=1}^{n} x_j \sum_{i=1}^{m} a_{ij}v_i&\\ & =\sum_{j=1}^{n} \sum_{i=1}^{m} a_{ij}x_jv_i \end{aligned}

\begin{aligned}
f(u) & =\sum_{j=1}^{n} x_jf(u_j)&\\
     & =\sum_{j=1}^{n} x_j \sum_{i=1}^{m} a_{ij}v_i&\\
     & =\sum_{j=1}^{n} \sum_{i=1}^{m} a_{ij}x_jv_i
\end{aligned}

Example 4: Align cumulative distribution function

In the below example, we have demonstrated how to write a series of equations in the same aligned order to represent cumulative distributation function.

\begin{aligned}P(X \in A) &= P(X \in (-\infty, x]) \\  &= P(- \infty < X \leq x) \\ &= P(X \leq x)\end{aligned}

\begin{aligned}P(X \in A) &= P(X \in (-\infty, x]) \\  &= P(- \infty < X \leq x) \\ &= P(X \leq x)\end{aligned}

Example 5: Align and cases probability distributation function together

Suppose the random variable X has distribution function:

 F(x) = \begin{cases} 1 - exp(-x^2), & x > 0 \\ 0, & x \leq 0 \end{cases}

The probability that X exceeds 1 is found as follows:

\begin{aligned}P(X > 1) &= 1 - P(X \leq 1) \\ &= 1 - F(1) \\ &= 1 - (1 - exp(-1^2)) \\ &=exp(-1) \end{aligned}

Suppose the random variable X has distribution function: 

F(x) = \begin{cases} 1 - exp(-x^2), & x > 0 \\ 0, & x \leq 0 \end{cases} 

The probability that X exceeds 1 is found as follows:

\begin{aligned}P(X > 1) &= 1 - P(X \leq 1) \\ &= 1 - F(1) \\ &= 1 - (1 - exp(-1^2)) \\ &=exp(-1) \end{aligned}

References


CITE THIS AS:

“LaTeX – How to align set of equations”  From NotePub.io – Publish & Share Note! https://notepub.io/notes/technical-writing/latex/latex-align-set-of-equations/

 3,538 total views,  1 views today

Scroll to Top
Scroll to Top
%d bloggers like this: