答案1
\documentclass[12pt,a4paper]{article}
\usepackage{amsmath}
\begin{document}
\begin{align}
g\Bigl(x\mathrel{\Big|}\mu_i,\sum_i\Bigr) = {}&\frac{1}{\sqrt{(2\pi)^D |\sum_i|}} \exp\biggl(-\frac{1}{2}(x-\mu_i)^{'} \notag \\
& \times\sum_i^{-1}(x-\mu_i)\biggr),
\end{align}
\[H_2 = \sum_\Omega^{} \log(|B(f_k,f_k)|)\]
\end{document}
对第二个方程进行编号并对齐两个=
符号(感谢@Mico 纠正二项分布的符号):
\documentclass[12pt,a4paper]{article}
\usepackage{amsmath}
\begin{document}
\begin{align}
g(x\mathrel{|}\mu_i,\Sigma_i^{})
&= \frac{1}{\sqrt{(2\pi)^D |\Sigma_i|}} \exp\Bigl(-\frac12(x-\mu_i)^{'}\notag \\
& \phantom{={}} \times\Sigma_i^{-1}(x-\mu_i)\Bigr),\\
H_2 &= \sum_\Omega^{} \log(|B(f_k,f_k)|)
\end{align}
\end{document}
答案2
和alignedat
:
\documentclass{article}
\usepackage{mathtools} %
\begin{document}
\begin{equation}
\begin{alignedat}{2}
&g\Bigl(x \mathrel{\Big\vert} \mu_i,∑_i\Bigr) ={} & &\frac{1}{√{(2π)^D}\lvert∑_i\rvert}\exp\biggl(-\frac{1}{2}(x-\mu_i)' \\[-1ex]
& & & × ∑_i^{-1 } (x-\mu_i)\biggr),\\
& H₂ = {} \mathrlap{∑_{Ω}\log()\lvert B(f_k, f_k)\rvert)}
\end{alignedat}
\end{equation}
\end{document}