編輯:

編輯:
\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課堂上,我確實遇到了錯誤,但回憶錄中不存在此錯誤,並且文件仍然編譯為所示圖片

相關內容