5

I am trying to write two equations that will be aligned at the equal signs and also connected together at the left with a curly bracket (like a piecewise definition), but when I use the \begin{cases} environment simultaneously with the amsmath's \begin{align*} environment, there seems to be a blank space added to the left of the equal signs, which I do not want (and does not appear with the \begin{align*} environment alone…)

    \begin{align*}
    \begin{cases}
    \dot{x} &= f(x) \\
    x(0)&=x_0
    \end{cases}
    \end{align*}

Results for me in:

enter image description here

though I would prefer the spacing as seen here using only the \begin{align*} environment (referring to the spacing to the left of the equal signs):

enter image description here

4

Use aligned.

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{equation*}
\begin{cases}
\begin{aligned}
\dot{x} &= f(x) \\
x(0) &= x_0
\end{aligned}
\end{cases}
\end{equation*}

\end{document}

enter image description here

Now compare with

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{equation*}
\begin{cases}
\dot{x} = f(x) \\
x(0) = x_0
\end{cases}
\end{equation*}

\end{document}

enter image description here

I believe that the latter format is better.

3

Use the empheq package (needless to load amsmath in this case):

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{empheq}

\begin{document}

\begin{empheq}[left=\empheqlbrace]{align*}
\dot x & = f(x)\\%
x(0) & = x_0
\end{empheq}

\end{document} 

enter image description here

2

Here's a solution that doesn't require loading any packages.

enter image description here

\documentclass{article}
\begin{document}
\[
\left\{
\begin{array}{r @{{}={}} l}
  \dot{x} & f(x) \\
  x(0)    & x_0
\end{array}
\right.
\]  
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.