I have a piecewise function with three "parts." I would like to have all three conditions aligned at the variable x. How do I achieve that? Here is the code I have so far:
\[
f(x) = \begin{cases}
mx^2 +nx +1, & x \le -1 \\
2m e^{|x|-1} + \sin \pi x - 3n, & -1 < x < 1 \\
3x^2 - (m+n)x, & x \ge 1
\end{cases}
\]
Best Answer
A different solution, which extends the
cases
environment. It adds an optional argument for defining array column options. The standardcases
behavior is the default, so without optional argument it's like the normal amsmath's cases.