# Combining split and rcases

I have an equation, that is split along multiple lines. All equations should be aligned to the equal sign. All but the first equation form a group.

The following gives almost the expected result (These are two examples I have tried, the difference is the ampersand preceding the rcases-environment):

\documentclass{scrartcl}
\usepackage{amsmath}
\usepackage{mathtools}
\usepackage{bm}

\begin{document}

$$\begin{split} y &= \Psi_1 \left(\xi_1, \Psi_1^\pm \right) \\ \begin{rcases} \dot{\xi}_1 &= \Psi_2 \left( \xi_2, \Psi_2^\pm(\xi_1) \right) \\ \dot{\xi}_2 &= \Psi_3 \left( \xi_3, \Psi_3^\pm(\bm{\xi}_2) \right) \\ & \qquad \vdots \\ \dot{\xi}_r &= \Psi_{r+1} \left(v, \Psi_{r+1}^\pm(\bm{\xi}_r) \right) \\ \end{rcases} \dot{\bm{\xi}}= \bm{\Psi}_{r+1}\left(\bm{\xi}_r, v\right) \end{split}$$

$$\begin{split} y &= \Psi_1 \left(\xi_1, \Psi_1^\pm \right) \\ &\begin{rcases} \dot{\xi}_1 &= \Psi_2 \left( \xi_2, \Psi_2^\pm(\xi_1) \right) \\ \dot{\xi}_2 &= \Psi_3 \left( \xi_3, \Psi_3^\pm(\bm{\xi}_2) \right) \\ & \qquad \vdots \\ \dot{\xi}_r &= \Psi_{r+1} \left(v, \Psi_{r+1}^\pm(\bm{\xi}_r) \right) \\ \end{rcases} \dot{\bm{\xi}}= \bm{\Psi}_{r+1}\left(\bm{\xi}_r, v\right) \end{split}$$

\end{document}


This produces the following output:

But the first equation (y=...) is not aligned with the others. How do I get it aligned?

-
David Carlisle has posted a solution. But note rcases seems to give the wrong spacing here around the =. You may want to experiment with \left.\begin{aligned}\dot\xi_1&=...\end{aligned}\right\} instead. –  Andrew Swann Aug 10 '12 at 10:45

I wasn't sure if you want the = in the first row to align with the inner group or the outer equals, so this shows both forms:

\documentclass{scrartcl}
\usepackage{amsmath}
\usepackage{mathtools}
\usepackage{bm}

\begin{document}

$$\begin{split} y &= \Psi_1 \left(\xi_1, \Psi_1^\pm \right)\\ \begin{rcases} \dot{\xi}_1 &= \Psi_2 \left( \xi_2, \Psi_2^\pm(\xi_1) \right) \\ \dot{\xi}_2 &= \Psi_3 \left( \xi_3, \Psi_3^\pm(\bm{\xi}_2) \right) \\ & \qquad \vdots \\ \dot{\xi}_r &= \Psi_{r+1} \left(v, \Psi_{r+1}^\pm(\bm{\xi}_r) \right) \\ \end{rcases} \dot{\bm{\xi}}&= \bm{\Psi}_{r+1}\left(\bm{\xi}_r, v\right) \end{split}$$

\hrule

\vspace{15pt}
\begin{split} \begin{rcases} \noalign{\vskip-20pt} y &= \Psi_1 \left(\xi_1, \Psi_1^\pm \right)\\ \noalign{\vskip5pt} \dot{\xi}_1 &= \Psi_2 \left( \xi_2, \Psi_2^\pm(\xi_1) \right) \\ \dot{\xi}_2 &= \Psi_3 \left( \xi_3, \Psi_3^\pm(\bm{\xi}_2) \right) \\ & \qquad \vdots \\ \dot{\xi}_r &= \Psi_{r+1} \left(v, \Psi_{r+1}^\pm(\bm{\xi}_r) \right) \\ \end{rcases} \dot{\bm{\xi}}&= \bm{\Psi}_{r+1}\left(\bm{\xi}_r, v\right) \end{split}

\end{document}

-
Thank you, that does it. I am interested in the second solution you provided. Would you mind explaining what is going on here or refer to an explanation of \noalign (google doesnt help here; searching 'noalign' gives just 'misplaced noalign error' entries). –  PetPaulsen Aug 10 '12 at 10:59
\noalign (which @egreg claims I sneak into all my answers) is a TeX primitive which allows vertical material to be inserted between the rows of an alignment. Here I put the first row in the alignment so it lines up, put in some negative spacing so the total height of the alignment is small so the brace gets to be the right size then add some spacing to avoid the row overprinting stuff. –  David Carlisle Aug 10 '12 at 11:10
why the ugly spacing before the = with rcases, and also with the "non-cased" line when you've deviously included it in rcases although outside the brace? looks like a bug to me, maybe in mathtools, or a bad interaction with amsmath? –  barbara beeton Aug 10 '12 at 14:12
babrara not sure never used rcases before I just copied that part from the OP, perhaps \left.\begin{aligned}...\right} would give better spacing? –  David Carlisle Aug 10 '12 at 14:30
@DavidCarlisle -- since rcases is a feature i'm suggesting be considered when amsmath` is upgraded, i'd like to make sure there are no gotchas -- and this odd spacing is something that will need to be looked into then. thanks. –  barbara beeton Aug 10 '12 at 16:15