4

When I write

$$
\begin{cases}
f(x)-\int_C f& x\in C\\
0 & otherwise
\end{cases}
$$

I have a small integral as in the picture below. Is there a way to have a big integral?

enter image description here

Mico
  • 506,678
idm
  • 163
  • 1
  • 6
  • 8
    A quick tip: load the mathtools package and use its dcases environment instead of cases. – GuM Jan 19 '19 at 10:26
  • 3
    Off topic: see also https://tex.stackexchange.com/questions/503/why-is-preferable-to – CarLaTeX Jan 19 '19 at 10:27
  • 2
    Well \displaystyle f(x)-\int_C f& x\in C would do the job very nicely, but the cases brace doesn't change size to accommodate the large integral sign unfortunately – Au101 Jan 19 '19 at 12:41
  • @Au101 You're absolutely right. I tried that this morning, too, and I had found the same difficulty. Upvoted your comment. – Sebastiano Jan 19 '19 at 15:48
  • @Au101 - In my opinion, the fact that the cases environment does not change the size of the left-hand curly brace is actually a rather nice feature. :-) I elaborate this point in the answer I just posted. – Mico Jan 20 '19 at 01:14

3 Answers3

8

My preferred solution would be to keep using the cases environment, while adding a \displaystyle directive immediately before the \int expression. Using a dcases environment -- short for "displastyle cases", I suppose; see the third "case" in the following screenshot -- would appear to encourage needlessly loose spacing.

That said, I can't really see anything wrong with using cases along with a \textstyle-mode integral symbol; see the first case below.

enter image description here

\documentclass{article}
\usepackage{mathtools} % loads 'amsmath' automatically

\begin{document}
\begin{align*}
\shortintertext{Case 1: \texttt{cases}}
b_j &=
  \begin{cases}
    f(x) - \int_{C_j} f & \text{if $x\in C_j$,} \\
    0 & \text{otherwise.}
  \end{cases}\\
\shortintertext{Case 2: \texttt{cases} with \texttt{\string\displaystyle}}
b_j &=
  \begin{cases}
    f(x) - \displaystyle\int_{C_j}\! f & \text{if $x\in C_j $,} \\
    0 & \text{otherwise.}
  \end{cases}\\
\shortintertext{Case 3: \texttt{dcases}}
b_j &=
  \begin{dcases}
    f(x) - \int_{C_j}\! f & \text{if $x\in C_j$,} \\
    0 & \text{otherwise.}
  \end{dcases}
\end{align*}
\end{document}
Mico
  • 506,678
7

The code

% My standard header for TeX.SX answers:
\documentclass[a4paper]{article} % To avoid confusion, let us explicitly 
                                 % declare the paper format.

\usepackage[T1]{fontenc}         % Not always necessary, but recommended.
% End of standard header.  What follows pertains to the problem at hand.

\usepackage{mathtools} % also loads "amsmath"

\DeclarePairedDelimiter\abs{\lvert}{\rvert} % unrelated to the issue being
                                            % discussed, but good practice: 
                                            % see the manual of the "mathtools" 
                                            % package, section 3.6



\begin{document}

\ldots where \( \{W_{\ell}\}_{\ell} \) are sets of dyadic cube [cubes?],
\( x\in W_{\ell} \)
and \( \abs{W_{\ell}} \xrightarrow[\ell\to\infty]{} 0 \).
The function
% I recommend this:
\( b = \sum_{j\in\mathcal{J}} b_{j} \)
% instead of:
% \( b = \sum\limits_{j\in\mathcal{J}} b_{j} \)
% or, still worse:
% \( \displaystyle b = \sum_{j\in\mathcal{J}} b_{j} \)
is given by
\[
    b_{j} =
        \begin{dcases*}
            f(x) - \int_{C_{j}} f & if \( x\in C_{j} \), \\
            0 & otherwise.
        \end{dcases*}
\]

\end{document}

produces the output

Output of the code

See the manual of the mathtools package, subsection 3.4.3, for more information.

GuM
  • 21,558
5

You could use (the 1st is the best solution see the comment of @Mico):

1. Using a matrix with option \displaystyle: surely is a better result than the 2nd option.

enter image description here

\documentclass[a4paper,12pt]{article}
\usepackage{mathtools}
\begin{document}
\[\left\{\begin{matrix} 
f(x)-{\displaystyle \int_{C_j}f}     &x\in C\\ 
0 & \text{otherwise}
\end{matrix}\right.\]
\end{document}

2. Or to use bigints package:

\documentclass[a4paper,12pt]{article}
\usepackage{mathtools}
\usepackage{bigints}
\begin{document}
\[\begin{cases}
f(x)-\bigint_{\!C_j}f& x\in C\\
0 & \text{otherwise}
\end{cases}\]
\end{document}

Here there is a screenshot of the possible calls:

enter image description here

Sebastiano
  • 54,118
  • 1
    I would mention the second solution first. (The use of \bigints, etc is almost surely overkill...) – Mico Jan 20 '19 at 00:34