8

Consider:

\documentclass[a4paper]{article}
\usepackage{amsmath,amssymb}
\usepackage{amsfonts}
\usepackage{mathtools}
\begin{document}
\[
\begin{array}{llr}
\begin{rcases*}
    $\lim\limits_{x\to2^+}f(x)&=\lim\limits_{x\to2^+}\sqrt{5x-1}&=3$\\
    $\lim\limits_{x\to2^-}f(x)&=\lim\limits_{x\to2^-}(3x^2-4x-1)&=3$\\
    $f(2)&=\sqrt{5\cdot2-1}&=3$
\end{rcases*}\Leftrightarrow \displaystyle \lim\limits_{x\to2^-}f(x)=f(2)=\lim\limits_{x\to2^+}f(x)
\end{array}
\]
\end{document}

I was getting:

Enter image description here

But I want the result like this:

Enter image description here

What should I do?

3 Answers 3

7
\documentclass[a4paper]{article}
\usepackage{amsmath,amssymb}
\usepackage{mathtools}
\begin{document}  
    \[\def\arraystretch{2}\arraycolsep=1.6pt
    \left.\begin{array}{llr}
        \lim\limits_{x\to2^+}f(x) &= \lim\limits_{x\to2^+}\sqrt{5x-1} &= 3\\
        \lim\limits_{x\to2^-}f(x) &= \lim\limits_{x\to2^-}(3x^2-4x-1) &= 3\\
        f(2)                     &= \sqrt{5\cdot2-1}                  &=3
    \end{array}\right\}
    \Leftrightarrow \displaystyle \lim\limits_{x\to2^-}f(x)=f(2)=\lim\limits_{x\to2^+}f(x)
    \]
\end{document}

enter image description here

5
  • Thanks sir, it was solve my problem.
    – manh3
    Commented Sep 24, 2022 at 6:25
  • Your use of an array environment induces a strong degree of asymmetry around the = symbols inside the array. Can you think of a method places the = symbols more symmetrically?
    – Mico
    Commented Sep 24, 2022 at 6:41
  • I still haven't found a suitable way to solve it. How do you think we can do it in an array environment?
    – manh3
    Commented Sep 24, 2022 at 6:50
  • i was try put \ after &= to create more distance, it become &=\ \lim\limits_{.... but it doesn't seem to work.
    – manh3
    Commented Sep 24, 2022 at 6:54
  • 1
    use \def\arraystretch{2}\arraycolsep=2pt
    – user187802
    Commented Sep 24, 2022 at 6:59
11

I have three proposals, none of which uses cases or variants, which are not suited for the job.

\documentclass[a4paper]{article}
\usepackage{amsmath,amssymb}
\usepackage{mathtools}
\usepackage{array}

\begin{document}  

\[
\left.
\begin{alignedat}{2}
  \lim_{x\to2^+}f(x) &= \lim_{x\to2^+}\sqrt{5x-1}&&=3\\
  \lim_{x\to2^-}f(x) &= \lim_{x\to2^-}(3x^2-4x-1)&&=3\\
  f(2)&=\sqrt{5\cdot2-1}&&=3
\end{alignedat}
\right\}\Leftrightarrow \lim_{x\to2^-}f(x)=f(2)=\lim_{x\to2^+}f(x)
\]

\[
\left.
\renewcommand{\arraystretch}{1.5}
\setlength{\arraycolsep}{0pt}
\newcolumntype{A}{>{\displaystyle}l}
\newcolumntype{B}{>{\displaystyle{}}l}
\begin{array}{ABB}
  \lim_{x\to2^+}f(x) &= \lim_{x\to2^+}\sqrt{5x-1}&=3\\
  \lim_{x\to2^-}f(x) &= \lim_{x\to2^-}(3x^2-4x-1)&=3\\
  f(2)&=\sqrt{5\cdot2-1}&=3
\end{array}
\right\}\Leftrightarrow \lim_{x\to2^-}f(x)=f(2)=\lim_{x\to2^+}f(x)
\]

\[
\left.
\begin{aligned}
&\! \lim_{x\to2^+}f(x) = \lim_{x\to2^+}\sqrt{5x-1}=3 \\
&\! \lim_{x\to2^-}f(x) = \lim_{x\to2^-}(3x^2-4x-1)=3 \\
&   f(2)=\sqrt{5\cdot2-1}=3
\end{aligned}
\right\}\lim_{x\to2^-}f(x)=f(2)=\lim_{x\to2^+}f(x)
\]

\end{document}

I'd much prefer the last one: the three parts left to the brace are not really connected to one another and aligning the equals signs is not needed and makes for bad blanks. The \Leftrightarrow symbol is mathematically wrong.

enter image description here

5
  • can you explain to me the purpose of \! you use in the last one?
    – manh3
    Commented Sep 24, 2022 at 10:05
  • @manh3 For good reasons, the material after the odd-numbered & in aligned and similar environments is implicitly preceded by {}, to get the spacing right, as usually a relation symbol follows. When (ab)using aligned for global left alignment, a math operator such as \lim would be preceded by a thin space and \! cancels it.
    – egreg
    Commented Sep 24, 2022 at 10:14
  • maybe because my english is not good i still don't understand it well. I've tried removing \! at the command line but it doesn't seem to make a difference. Can you give an example?
    – manh3
    Commented Sep 24, 2022 at 10:30
  • @manh3 Look closely. The x in the limit will be slightly to the right of the “f” in the bottom line.
    – egreg
    Commented Sep 24, 2022 at 10:32
  • oh right, I was see it. Thank you.
    – manh3
    Commented Sep 24, 2022 at 10:39
6

You're not making good use of the rcases* machinery; I would ditch it in favor a simple \left. ... \right\} wrapper. To format the material to left of the tall curly brace, I suggest you employ an alignedat{3} environment. This will allow you to get rid of all \displaystyle and \limits directives.

Optionally, you could use \mathclap directives to get rid of the whitespace around the \lim terms. The solutions without and with the \mathclap idea are shown in the following screenshot.

enter image description here

\documentclass[a4paper]{article}
\usepackage{%%amsmath, %% amsmath is loaded automatically by mathtools
            amssymb}
%%\usepackage{amsfonts} %% amsfonts is loaded automatically by amssymb
\usepackage{mathtools} % for \mathclap macro
\begin{document}  

\noindent
Basic solution:
\[
\left.
\begin{alignedat}{3}
    &\lim_{x\to2^+}f(x)&&=\lim_{x\to2^+}\sqrt{5x-1}&&=3\\
    &\lim_{x\to2^-}f(x)&&=\lim_{x\to2^-}(3x^2-4x-1)&&=3\\
    &f(2)              &&=\sqrt{5\cdot2-1}         &&=3
\end{alignedat}
\,\right\}
\Leftrightarrow  \lim_{x\to2^-}f(x)=f(2)=\lim_{x\to2^+}f(x)
\]


\bigskip\noindent
With \verb+\mathclap+:
\[
\left.
\begin{alignedat}{3}
    &\lim_{\mathclap{x\to2^+}}f(x)&&=\lim_{\mathclap{x\to2^+}}\sqrt{5x-1}&&=3\\
    &\lim_{\mathclap{x\to2^-}}f(x)&&=\lim_{\mathclap{x\to2^-}}(3x^2-4x-1)&&=3\\
    &f(2)                         &&=\sqrt{5\cdot2-1}                    &&=3
\end{alignedat}
\,\right\}
\Leftrightarrow  \lim_{\mathclap{x\to2^-}}f(x)=f(2)=\lim_{\mathclap{x\to2^+}}f(x)
\]
\end{document}
1
  • thanks for your advice. I will pay attention to this issue.
    – manh3
    Commented Sep 24, 2022 at 6:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .