编辑:

编辑:
\begin{equation}

\begin{aligned}
\f(\kappa,\rho,\alpha,\beta_i,X_i;x_i,y_i) & =\dfrac{\exp \big(k cos(x_i-X_i)\big)}{2\pi I_0}\dfrac{(1-\rho^2)}{2\pi\big[1+\rho^2-2\rho \cos(y_i-\alpha-\beta_i X_i)\big]}\\
 & =\dfrac{1}{(2\pi)^2 I_0(\lambda \rho)}\exp \big(k \cos(x_i-X_i)\big)\dfrac{(1-\rho^2)}{(1+\rho^2)}\dfrac{1}{\big[1-\dfrac{2\rho}{(1+\rho^2)} \cos(y_i-\alpha-\beta_i X_i)\big]}\\
 & =\dfrac{1}{(2\pi)^2I_0(\lambda \rho)}\exp \big(k \cos(x_i-X_i)\big)\dfrac{(1-\rho^2)}{(1+\rho^2)}\big[1-\dfrac{2\rho}{(1+\rho^2)}\cos(y_i-\alpha-\beta_i X_i)\big]^{-1}\\
 & =\dfrac{1}{(2\pi)^2I_0(\lambda \rho)} \exp \big(\cos(x_i-X_i)\big)\dfrac{(1-\rho^2)}{(1+\rho^2)}\big[1-\dfrac{2\rho}{(1+\rho^2)}{\cos(y_i-\beta_i X_i) \cos\alpha+\sin(y_i-\beta_i X_i \sin\alpha)}\big]^{-1} 
\end{aligned}

\end{equation}

我应该把它放哪儿$

答案1

您没有定义宏\f;在下面的代码中,我将其设置\f为等于f

由于该术语\frac{\exp\big(k\cos(x_i-X_i)\big)}{(2\pi)^2 I_0}反复出现,我建议您给它一个新的、简洁的名称,比如说\zeta_i

以下内容可能就是您要找的内容;请注意最后一行的额外换行符。

在此处输入图片描述

\documentclass{article}
\usepackage{amsmath}
\newcommand\f{f} % ??
\begin{document}
Put $\zeta_i= \dfrac{\exp \bigl(k\cos(x_i-X_i)\bigr)}{(2\pi)^2 I_0}$. 
\begin{equation}
\begin{aligned}[b]
\f(\kappa,\rho,\alpha,\beta_i,X_i;x_i,y_i) 
 &= \zeta_i\,\frac{(1-\rho^2)}{\bigl[1+\rho^2-2\rho \cos(y_i-\alpha-\beta_i X_i)\bigr]}\\
 &= \frac{\zeta_i}{\lambda\rho}\,\frac{(1-\rho^2)}{(1+\rho^2)}
    \frac{1}{\bigl[1-\frac{2\rho}{(1+\rho^2)} \cos(y_i-\alpha-\beta_i X_i)\bigr]}\\
 &= \frac{\zeta_i}{\lambda\rho}\,\frac{(1-\rho^2)}{(1+\rho^2)}  
    \bigl[1-\frac{2\rho}{(1+\rho^2)}\cos(y_i-\alpha-\beta_i X_i)\bigr]^{-1}\\
 &= \frac{\zeta_i}{\lambda\rho}\,\frac{(1-\rho^2)}{(1+\rho^2)} 
    \bigl[1-\frac{2\rho}{(1+\rho^2)}\cos(y_i-\beta_i X_i) \cos\alpha\\
 &\qquad\qquad +\sin(y_i-\beta_i X_i \sin\alpha)\bigr]^{-1} 
\end{aligned}
\end{equation}
\end{document}

答案2

我稍微修改了一下你的代码,使其可以编译:

\documentclass{standalone}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{mathtools}
\begin{document}
\begin{equation}
\begin{aligned}
f(\kappa,\rho,\alpha,\beta_i,X_i;x_i,y_i) & =\dfrac{\exp \big(k cos(x_i-X_i)\big)}{2\pi I_0}\dfrac{(1-\rho^2)}{2\pi\big[1+\rho^2-2\rho \cos(y_i-\alpha-\beta_i X_i)\big]}\\
 & =\dfrac{1}{(2\pi)^2 I_0(\lambda \rho)}\exp \big(k \cos(x_i-X_i)\big)\dfrac{(1-\rho^2)}{(1+\rho^2)}\dfrac{1}{\big[1-\dfrac{2\rho}{(1+\rho^2)} \cos(y_i-\alpha-\beta_i X_i)\big]}\\
 & =\dfrac{1}{(2\pi)^2I_0(\lambda \rho)}\exp \big(k \cos(x_i-X_i)\big)\dfrac{(1-\rho^2)}{(1+\rho^2)}\big[1-\dfrac{2\rho}{(1+\rho^2)}\cos(y_i-\alpha-\beta_i X_i)\big]^{-1}\\
 & =\dfrac{1}{(2\pi)^2I_0(\lambda \rho)} \exp \big(\cos(x_i-X_i)\big)\dfrac{(1-\rho^2)}{(1+\rho^2)}\big[1-\dfrac{2\rho}{(1+\rho^2)}{\cos(y_i-\beta_i X_i) \cos\alpha+\sin(y_i-\beta_i X_i \sin\alpha)}\big]^{-1} \end{aligned}
\end{equation}
\end{document}

得出的结果为:

在此处输入图片描述

我已经删除了环境中的空白行aligned,并且\f

如果您确实想要空行,则需要用百分号标记它们:

\documentclass{standalone}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{mathtools}
\begin{document}
\begin{equation}
\begin{aligned}
%    
f(\kappa,\rho,\alpha,\beta_i,X_i;x_i,y_i) & =\dfrac{\exp \big(k cos(x_i-X_i)\big)}{2\pi I_0}\dfrac{(1-\rho^2)}{2\pi\big[1+\rho^2-2\rho \cos(y_i-\alpha-\beta_i X_i)\big]}\\
 & =\dfrac{1}{(2\pi)^2 I_0(\lambda \rho)}\exp \big(k \cos(x_i-X_i)\big)\dfrac{(1-\rho^2)}{(1+\rho^2)}\dfrac{1}{\big[1-\dfrac{2\rho}{(1+\rho^2)} \cos(y_i-\alpha-\beta_i X_i)\big]}\\
 & =\dfrac{1}{(2\pi)^2I_0(\lambda \rho)}\exp \big(k \cos(x_i-X_i)\big)\dfrac{(1-\rho^2)}{(1+\rho^2)}\big[1-\dfrac{2\rho}{(1+\rho^2)}\cos(y_i-\alpha-\beta_i X_i)\big]^{-1}\\
 & =\dfrac{1}{(2\pi)^2I_0(\lambda \rho)} \exp \big(\cos(x_i-X_i)\big)\dfrac{(1-\rho^2)}{(1+\rho^2)}\big[1-\dfrac{2\rho}{(1+\rho^2)}{\cos(y_i-\beta_i X_i) \cos\alpha+\sin(y_i-\beta_i X_i \sin\alpha)}\big]^{-1}     
%
\end{aligned}
\end{equation}
\end{document}

编辑:

我最初在类中编译了上述代码memoir,但数学太宽,这就是我改用的原因standalone。在standalone类中我确实遇到了错误,但这个错误在回忆录中不存在,文档仍然编译为所示的图片

相关内容