長い数式はテキストブロック内に収まりません

長い数式はテキストブロック内に収まりません

質問:

非常に長い方程式を入力しているのですが、ページに収まりません。次の MWE に提供したのは、ページarticleのドキュメント クラス用ですlandscape。元のページは、縦向きの A4 用紙の記事です。この問題についてどなたか助けていただけませんか? この長い方程式をページに配置するにはどうしたらよいでしょうか?

MWE:

ここに画像の説明を入力してください

\documentclass[a4paper,landscape]{article}
\usepackage[a4paper,margin=1in,landscape]{geometry}
\usepackage{amsmath}

\begin{document}
    \begin{flalign}
        \begin{aligned}
            f_{1}\left(y\,,\,t\right) & = L^{-1}\left(\frac{1}{s-a}\,e^{-\sqrt{\frac{s+a_{0}}{a_{1}}}\,y}\right) =\dfrac{e^{-at}}{2}\left[e^{-y\sqrt{\frac{1}{a_{1}}\left(a_{0}-a\right)}}\,erf_{c}\left(\dfrac{y}{2\sqrt{a_{1}\,t}}-\sqrt{\left(a_{0}-a\right)t}\right)+e^{y\sqrt{\frac{1}{a_{1}}\left(a_{0}-a\right)}}\,erf_{c}\left(\dfrac{y}{2\sqrt{a_{1}\,t}}+\sqrt{\left(a_{0}-a\right)t}\right)\right]
        \end{aligned}&&
    \end{flalign}
\end{document}

答え1

ここでは、改行に同じアプローチを採用した2つのソリューションを示します。@nplatis の回答最初のソリューションでは、記法\expの代わりに記法を使用します。2 番目のソリューションでは、さらに記法からインライン分数記法にe^{...}切り替えます。どちらのソリューションでも、横長モードは必要ないことに注意してください。\frac

ここに画像の説明を入力してください

\documentclass{article}
\usepackage{amsmath} % for 'align' and 'aligned' environments and \DeclareMathOperator macro
\DeclareMathOperator{\erf}{erf}

\begin{document}
\begin{align}
f_1(y,t) 
&= L^{-1}\biggl(\frac{1}{s-a} 
\exp\biggl( -\sqrt{\frac{s+a_{0}}{a_1}}y\biggr) \biggr) \notag \\[\jot]
&\begin{aligned}[b]
{}=\frac12 e^{-at} \biggl[
&\exp \biggl(-y\sqrt{\frac{1}{a_1}(a_{0}-a)}\,\biggr)
\erf_{c}\biggl(\frac{y}{2\sqrt{a_1t}}-\sqrt{(a_{0}-a)t}\biggr) \\
{}+&\exp\biggl(+y\sqrt{\frac{1}{a_1}(a_{0}-a)}\,\biggr)
\erf_{c}\biggl(\frac{y}{2\sqrt{a_1t}}+\sqrt{(a_{0}-a)t}\biggr)
\biggr]
\end{aligned}
\end{align}

\begin{align}
f_1(y,t) 
&= L^{-1}\bigl((s-a)^{-1}
\exp\bigl( -\sqrt{(s+a_{0})/a_1}y\bigr) \bigr) \notag \\[\jot]
&\begin{aligned}[b]
{}=\tfrac12 e^{-at} \bigl[
&\exp \bigl(-y\sqrt{(a_{0}-a)/a_1}\,\bigr)
\erf_{c}\bigl(y/(2\sqrt{a_1t}\,)-\sqrt{(a_{0}-a)t}\,\bigr) \\
{}+&\exp\bigl(+y\sqrt{(a_{0}-a)/a_1}\,\bigr)
\erf_{c}\bigl(y/(2\sqrt{a_1t}\,)+\sqrt{(a_{0}-a)t}\,\bigr)
\bigr]
\end{aligned}
\end{align}
\end{document}

答え2

@Sebastiano の回答に基づいて、私は別の方法で分割します (\quadより良い配置のために に注意してください)。

\documentclass[a4paper,12pt]{article}
\usepackage[margin=1in]{geometry}
\usepackage{amsmath}
\DeclareMathOperator{\erf}{erf}
\begin{document}
    \begin{flalign}
        \begin{aligned}
            f_{1}(y,t) & = L^{-1}\left(\frac{1}{s-a}\,e^{-\sqrt{\frac{s+a_{0}}{a_{1}}}\,y}\right)\\
            &=\dfrac{e^{-at}}{2}\biggl[e^{-y\sqrt{\frac{1}{a_{1}}\left(a_{0}-a\right)}}\erf_{c}\biggl(\dfrac{y}{2\sqrt{a_{1}\,t}}-\sqrt{\left(a_{0}-a\right)t}\biggr)\\
                & \quad\quad\quad +e^{y\sqrt{\frac{1}{a_{1}}\left(a_{0}-a\right)}}\erf_{c}\left(\dfrac{y}{2\sqrt{a_{1}\,t}}+\sqrt{\left(a_{0}-a\right)t}\right)\biggr]
        \end{aligned}
    \end{flalign}
\end{document}

コードの結果

答え3

MWE を修正しました。これで解決できるかもしれません。

\documentclass[a4paper,12pt]{article}
\usepackage[margin=1in]{geometry}
\usepackage{amsmath}
\DeclareMathOperator{\erf}{erf}
\begin{document}
    \begin{flalign}
        \begin{aligned}
            f_{1}(y,t) & = L^{-1}\left(\frac{1}{s-a}\,e^{-\sqrt{\frac{s+a_{0}}{a_{1}}}\,y}\right)=\dfrac{e^{-at}}{2}\biggl[e^{-y\sqrt{\frac{1}{a_{1}}\left(a_{0}-a\right)}}\erf_{c}\biggl(\dfrac{y}{2\sqrt{a_{1}\,t}}\\ 
                &-\sqrt{\left(a_{0}-a\right)t}\biggr)+e^{y\sqrt{\frac{1}{a_{1}}\left(a_{0}-a\right)}}\erf_{c}\left(\dfrac{y}{2\sqrt{a_{1}\,t}}+\sqrt{\left(a_{0}-a\right)t}\right)\biggr]
        \end{aligned}
    \end{flalign}
\end{document}

ここに画像の説明を入力してください

答え4

「erf」を数学演算子として宣言する必要があります。また、\,使用している の配置が間違っています。必要なのは 1 つだけで、別の場所に置く必要があります。

最初の行の幅を使用しますalignatが、非表示にします。大きな角括弧の後にさらに配置ポイントを設定できます。

\documentclass[a4paper]{article}
\usepackage{amsmath}

\DeclareMathOperator{\erf}{erf}

\begin{document}

\begin{alignat}{2}
f_{1}(y,t)
& = L^{-1}\left(\frac{1}{s-a} e^{-y\sqrt{\frac{1}{a_1}(s+a_{0})}}\,\right)\hidewidth
\notag\\
&=\frac{e^{-at}}{2}\biggl[&&
  e^{-y\sqrt{\frac{1}{a_{1}}(a_{0}-a)}}
  \erf_{c}\left(\frac{y}{2\sqrt{a_{1}t}}-\sqrt{(a_{0}-a)t}\right)
\notag\\
&&&+e^{y\sqrt{\frac{1}{a_{1}}(a_{0}-a)}}
  \erf_{c}\left(\frac{y}{2\sqrt{a_{1}t}}+\sqrt{(a_{0}-a)t}\right)
\biggr]
\end{alignat}

\end{document}

ここに画像の説明を入力してください

関連情報