# Align equal signs too much spacing in cases

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:

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):

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}


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}


I believe that the latter format is better.

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}


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