Gleichungen in Untergleichungen ausrichten

Gleichungen in Untergleichungen ausrichten

Ich möchte diese Gleichungen wie im Bild unter Gl. 3.1 dargestellt anordnen. Optimales Steuerungsproblem

Ich habe erfolglos versucht, den Befehl \begin{align*} zu verwenden. Meine Gleichungen werden automatisch zentriert. Ich habe auch versucht, die Gleichungen aufzuschlüsseln, aber ich erhalte eine Fehlermeldung.

% --------------
%\begin{align*}
\begin{subequations} \label{eq:optimalsteuerungsprob_zeitkont}
    \begin{equation} \label{eq:optProb_J_Phi_l}
        \min_{\textbf{u} \in \mathcal{A}} \quad J[\textbf{u}(\cdot)] = \varphi\big(t_f, \textbf{x}(t_f)\big) + \int_{t_s}^{t_f} l\big(t,\textbf{x}(t),\textbf{u}(t)\big)\,\mathrm{d}t
    \end{equation}
    \begin{equation}
        \text{u.B.v.} \quad \dot{\textbf{x}}(t) = \textbf{f}(t,\textbf{x}(t), \textbf{u}(t)) \qquad , \qquad \textbf{x}(0)=\textbf{x}_{0}
    \end{equation}
    \begin{equation} \label{eq:optProb_endbedin_PSI}
        \psi\big(\,t_f,\textbf{x}(t_f)\big) = \textbf{0}
    \end{equation}
    \begin{equation}
        \textbf{h}\big(t,\textbf{x}(t),\textbf{u}()t\big) \le \textbf{0} \quad , \quad \forall t \in [t_{s},t_{f}]
    \end{equation}
\end{subequations}
%\end{align*}
%-----------------

Können Sie mir bitte bei dieser Aufgabe für meine Abschlussarbeit helfen?

Vielen Dank

Antwort1

So geht das mit alignat. Ich habe systematisch \textbfdurch ersetzt \mathbf. Beachten Sie, dass es auch ein Paket für die Formatierung von Optimierungsproblemen gibt, optidef.

\documentclass{article}
\usepackage{mathtools}

\begin{document}

\begin{subequations} \label{eq:optimalsteuerungsprob_zeitkont}
    \begin{alignat}{3} \label{eq:optProb_J_Phi_l}
         & \min_{\mathbf{u} \in \mathcal{A}} & & J[\mathbf{u}(\cdot)] = \varphi\big(t_f, \mathbf{x}(t_f)\big)+ {}& & \int_{t_s}^{t_f} l\big(t,\mathbf{x}(t),\mathbf{u}(t)\big)\,\mathrm{d}t \\[2ex]
         & \text{u.B.v.} & \quad & \dot{\mathbf{x}}(t) = \mathbf{f}(t,\mathbf{x}(t), \mathbf{u}(t)),%
         & & \mathbf{x}(0)=\mathbf{x}_{0} \\ \label{eq:optProb_endbedin_PSI}
         & & & \psi\big(\,t_f,\mathbf{x}(t_f)\big) = \mathbf{0} \\
         & & & \mathbf{h}\big(t,\mathbf{x}(t),\mathbf{u}()t\big) \le \mathbf{0}, %
         & & \forall t \in [t_{s},t_{f}]
    \end{alignat}
\end{subequations}

 \end{document} 

Bildbeschreibung hier eingeben

Antwort2

alignatIch würde „inside“ subequationsohne zusätzlichen Abstand zwischen den Spalten verwenden . Der Code:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{subequations} \label{eq:optimalsteuerungsprob_zeitkont}
\begin{alignat}{2}
  \min_{\textbf{u} \in \mathcal{A}} \quad &J[\textbf{u}(\cdot)] = \varphi\big(t_f, \textbf{x}(t_f)\big)+{}&&\int_{t_s}^{t_f}
        l\big(t,\textbf{x}(t),\textbf{u}(t)\big)\,\mathrm{d}t\label{eq:optProb_J_Phi_l}\\
        \text{u.B.v.} \quad &\dot{\textbf{x}}(t) = \textbf{f}(t,\textbf{x}(t), \textbf{u}(t)),
  &&\textbf{x}(0)=\textbf{x}_{0}\\
  &\psi\big(\,t_f,\textbf{x}(t_f)\big) = \textbf{0}\label{eq:optProb_endbedin_PSI}\\
  &\textbf{h}\big(t,\textbf{x}(t),\textbf{u}()t\big) \le \textbf{0}, &&\forall t \in [t_{s},t_{f}]
\end{alignat}
\end{subequations}
\end{document}

Das Ergebnis (beachten Sie, dass die zweiten Spalten in den Zeilen 2 und 4 am Integralzeichen ausgerichtet sind): Bildbeschreibung hier eingeben

Antwort3

Das Layout und die Nummerierung scheinen ein wenig ungewöhnlich, ich musste am Ende alignein weiteres Display direkt dahinter platzieren und dann den dadurch verursachten Platzmangel korrigieren.

Bildbeschreibung hier eingeben

Da Sie die einzelnen Zeilen der Bedingungen in der gleichen Reihenfolge nummerieren wie die Gleichung, können Sie sie nicht alignedals Unterterm verwenden, was ich hier normalerweise verwenden würde.

\documentclass{article}

\usepackage{amsmath}

\begin{document}

% --------------

\begin{subequations} \label{eq:optimalsteuerungsprob_zeitkont}
\begin{equation}
    \label{eq:optProb_J_Phi_l}
        \min_{\textbf{u} \in \mathcal{A}} \quad J[\textbf{u}(\cdot)] = \varphi\bigl(t_f, \textbf{x}(t_f)\bigr) + \int_{t_s}^{t_f} l\bigl(t,\textbf{x}(t),\textbf{u}(t)\bigr)\,\mathrm{d}t
\end{equation}
\vspace{-\baselineskip}% sigh
\begin{align}
        \text{u.B.v.} \quad&\dot{\textbf{x}}(t) = \textbf{f}(t,\textbf{x}(t), \textbf{u}(t)), && \textbf{x}(0)=\textbf{x}_{0}
\\ & \label{eq:optProb_endbedin_PSI}
        \psi\bigl(\,t_f,\textbf{x}(t_f)\bigr) = \textbf{0}
\\&
        \textbf{h}\bigl(t,\textbf{x}(t),\textbf{u}()t\bigr) \le \textbf{0},&& \forall t \in [t_{s},t_{f}]
    \end{align}
\end{subequations}
%\end{align*}
%-----------------
\end{document}

verwandte Informationen