I am trying to type some text to the side of a cases environment. Below is my MWE. I seem to have two issues: Extra space between the numbers of the enumerated list and the contents of said list and the brackets not being large enough. My first attempt (which used the cases environment exclusively) resulted in errors. I saw this somewhere on the web (some tex forum, sorry not sure which one) and tried this.

   \documentclass{article}
   \usepackage[left=1.65cm,right=1.65cm,top=2.45cm,bottom=2.60cm]{geometry}
    \usepackage{amsmath,amssymb,amscd,amsbsy,array,color}
\usepackage{fancyhdr,framed,latexsym,multicol,pstricks,slashed,xcolor,multicol}
    \usepackage{picture}
    \usepackage{indentfirst}
    \usepackage{enumitem}

    \usepackage[amsmath,framed,thmmarks]{ntheorem}


\title{Analysis Notes}
\author{Michael Dykes}

\begin{document}

\maketitle



Prove that: 
    \begin{enumerate}
        \item   \begin{align*}
                    \begin{split}
                        2-x, &\textrm{ if } x \le 1\\
                        \frac{1}{x}, &\textrm{ if } x> 1.
                    \end{split}\;\bigg\} \quad \text{is one-to-one but  not onto $\mathbb{R}$.}
                \end{align*}

        \item   \begin{align*}
            \begin{split}
                x+4, &\textrm{ if } x \le -2\\
                -x, &\textrm{ if } -2 < x < 2\\
                x-4 &\textrm{ if } x \ge 2.
            \end{split}\;\bigg\} \quad \text{is onto $\mathbb{R}$ but not one-to-one.}
        \end{align*}
    \end{enumerate}

\end{document}

I am not sure what to do from here.

-MD

share|improve this question

To avoid the gap between the enumeration numerals and the associated formulas, switch from an align* to an aligned environment.

To get the correct sizing of the right-hand curly braces, I suggest you use a drcases* environment, which is provided by the mathtools package. (The "r" in "rcases" denotes the fact that the curly brace is placed to the right of the environment. The "starred" version of this environment saves you from having to encase the conditioning material in \text wrappers.)

enter image description here

\documentclass{article}
\usepackage[hmargin=1.65cm,top=2.45cm,bottom=2.6cm]{geometry}
\usepackage{mathtools,amsfonts}

\begin{document}

Prove that: 
\begin{enumerate}
\item \qquad 
$\begin{aligned}
\begin{drcases*}
     2-x, &if $x \le 1$\\
     1/x, &if $x> 1$.
\end{drcases*}
\text{is one-to-one but  not onto $\mathbb{R}$.}
\end{aligned}$

\item \qquad
$\begin{aligned}
\begin{drcases*}
     x+4, &if $x \le -2$  \\
     -x,  &if $-2 < x < 2$\quad\\
     x-4  &if $x \ge 2$.
\end{drcases*}
\text{is onto $\mathbb{R}$ but not one-to-one.}
\end{aligned}$
\end{enumerate}

\end{document}
share|improve this answer

Here are some options using an array and/or empheq:

enter image description here

\documentclass{article}

\usepackage{amsfonts}% ...for \mathbb
\usepackage{empheq}% Load mathtools, which loads amsmath

\begin{document}

Prove that: 
\begin{enumerate}
  \item \mbox{}

  \vspace{\dimexpr-\baselineskip-\abovedisplayskip-\parskip}
  \[
    \renewcommand{\arraycolsep}{0pt}
    \left.\kern-\nulldelimiterspace
    \begin{array}{ r l }
             2 - x, &\text{ if $x \leq 1$} \\[\jot]
      \dfrac{1}{x}, &\text{ if $x > 1$.}
    \end{array}\right\} \quad \text{is one-to-one but  not onto $\mathbb{R}$.}
  \]

  \item \mbox{}

  \vspace{\dimexpr-\baselineskip-\abovedisplayskip-\parskip}
  \begin{empheq}[right=\empheqrbrace \quad \text{is onto $\mathbb{R}$ but not one-to-one.}]{align*}
    x + 4, &\text{ if $x \leq -2$} \\
       -x, &\text{ if $-2 < x < 2$} \\
    x - 4, &\text{ if $x \geq 2$.}
    \end{empheq}
\end{enumerate}

\end{document}
share|improve this answer
    
@Mico: Thanks; updated. – Werner 5 hours ago

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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