Aligning cases conditions from multiple nesting levels
I think I would do it in the way that egreg hinted at, and just use one dcases
envrionment
Note that I have replaced your split
environment with an array
and used @{}c@{}
to remove column space (check your original .log
file- you should have got a warning that you weren't allowed to use split
in that context).
\documentclass{article}
\usepackage{mathtools}
\begin{document}
\[
y_{ic}[n] =
\begin{dcases}
y_0 + x_0 - x_0 (1 - k_2)^n & k_1 = 0 \\
k_5 + \left( y_0 - k_5 \right) (1 - k_1)^n + x_0 k_1 n (1 - k_1)^{n-1} & k_1 \neq 0, k_1 = k_2 \\
k_5 + \left( y_0 - k_5 \right) (1 - k_1)^n+ x_0 \frac{k_2}{k_1 - k_2} \left[ \begin{array}{@{}c@{}}(1 - k_2)^n \\ - (1 - k_1)^n \end{array} \right] & k_1 \neq 0, k_1 \neq k_2
\end{dcases}
\]
\end{document}
If I were to do this, I would have listened to egreg's comments above. But the following works though coding may be ugly:
\documentclass{article}
\usepackage{mathtools,breqn}
\begin{document}
\begin{dmath*}
y_{ic}[n] = \begin{dcases}
y_0 + x_0 - x_0 (1 - k_2)^n & k_1 = 0 \\
k_5 + \left( y_0 - k_5 \right) (1 - k_1)^n + \begin{dcases}
x_0 k_1 n (1 - k_1)^{n-1} & \makebox[-11pt][l]{$k_1 \neq 0, k_1 = k_2$}\\
x_0 \frac{k_2}{k_1 - k_2} \left[ \begin{aligned}(1 - k_2)^n \\ - (1 - k_1)^n \end{aligned} \right] & \makebox[-11pt][l]{$k_1 \neq 0, k_1 \neq k_2$}
\end{dcases}
\end{dcases}
\end{dmath*}
\end{document}
Here are some more options that you could explore. Note that cases
and friends can be easily emulated using an ordinary array
:
\documentclass{article}
\begin{document}
\[
\setbox1=\hbox{$k_1 \neq 0, k_1 = k_2$}
y_{ic}[n] = \left\{\begin{array}{@{}l@{\quad}l}
y_0 + x_0 - x_0 (1 - k_2)^n, & \hspace*{\dimexpr-1em-\wd1-\nulldelimiterspace}k_1 = 0 \\[2\jot]
k_5 + (y_0 - k_5) (1 - k_1)^n + \left\{\begin{array}{@{}l@{\quad}l@{}}
x_0 k_1 n (1 - k_1)^{n-1}, & k_1 \neq 0, k_1 = k_2 \\[\jot]
\frac{x_0 k_2}{k_1 - k_2} [(1 - k_2)^n - (1 - k_1)^n], & k_1 \neq 0, k_1 \neq k_2
\end{array}\right.
\end{array}\right.
\]
\bigskip
\[
\setbox1=\hbox{$k_1 \neq 0, k_1 = k_2$}
y_{ic}[n] = \left\{\begin{array}{@{}l@{\quad}l}
y_0 + x_0 - x_0 (1 - k_2)^n, & \hspace*{\dimexpr-1em-\wd1-\nulldelimiterspace}k_1 = 0 \\[2\jot]
k_5 + (y_0 - k_5) (1 - k_1)^n \\ \qquad {} + \left\{\begin{array}{@{}l@{\quad}l@{}}
x_0 k_1 n (1 - k_1)^{n-1}, & k_1 \neq 0, k_1 = k_2 \\[\jot]
\frac{x_0 k_2}{k_1 - k_2} [(1 - k_2)^n - (1 - k_1)^n ], & k_1 \neq 0, k_1 \neq k_2
\end{array}\right.
\end{array}\right.
\]
\end{document}
The space-correction in the first row consists of 3 parts:
- An
em
skip, stemming from the forced@{\quad}
in the separation between the two columns; \wd1
(or the width of\box1
) equal to the width of the condition(s) in row 2 and 3;\nulldelimiterspace
, since using\right.
actually inserts a small gap.