# Inconsistent bracket sizes in a piecewise function

There are a number of similar questions to this one, but many of them suggest manually setting the size of my brackets. I would prefer not to do this, but if it is the only solution, I guess I will have to settle.

In my piecewise function the 2nd and 3rd steps have very similar contents within the brackets; however, the brackets look to be sized differently. Each step has one large set of brackets and and one small set of brackets, just in reverse order to each other. What is the reasoning for this and is there a solution other than manually setting the sizing?

The piecewise function:

Sample code:

\documentclass [a4paper,12pt]{report}

\usepackage{amsmath}
\usepackage{amssymb}

\begin{document}

$$\label{eqn:damage piecewise} d_i = \begin{cases} \quad \quad \quad \left( 1-\dfrac{E_i^{hrd}}{E_i}\right) \left( 1-\dfrac{1}{k_i} \right) & \forall \quad 1 \leq k_i \leq k_i^{ult} \\[12pt] d_i^{ult} \cdot \dfrac{k_i^{ult}}{k_i} + \left( 1 + \dfrac{E_i^{sft}}{E_i} \right) \left( 1 - \dfrac{k_i^{ult}}{k_i} \right) & \forall \quad k_i^{ult} \leq k_i \leq k_i^{sft} \\[12pt] d_i^{sft} \cdot \dfrac{k_i^{sft}}{k_i} + \left( 1 + \dfrac{E_i^{res}}{E_i} \right) \left( 1 - \dfrac{k_i^{sft}}{k_i} \right) & \forall \quad k_i^{sft} \leq k_i \leq k_i^{max} \end{cases}$$

\end{document}

• Unrelated: are hrd, ult, … products of variables or simple abbreviations? – Bernard Sep 18 '20 at 14:31
• simple abbreviations. I know they should be written in \text{} format. – Aaron Rhodes Sep 18 '20 at 14:36
• No they should not, use \mathrm, the \text command does not do what you think. Unrelated you might want to look up the dcases env from mathtools – daleif Sep 18 '20 at 15:10
• You could make all the exponents the same size by adding a \strut (too big) or a \vphantom{f}. – John Kormylo Sep 18 '20 at 15:35
• @John Kormylo is there a benefit to this? Is it taken as standard practice to do this or is this just a personal preference. – Aaron Rhodes Sep 18 '20 at 15:44

With the \biggl( ... \biggr) pairs, you get a better result, aand it's generally recommended to choose their size manually. Delimiters, aesthetically, can be a bit less high than their contents. I also slightly reduced the spacing between the quantifiers, and centred better the first equation in cases w.r.t. the others (this can be done automatically with package eqparbox, but I don't think it was worth wrting more code in this case). Last, I used the dcases environment, from mathtools to save having to type \dfrac.

\documentclass [a4paper,12pt]{report}

\usepackage{mathtools}
\usepackage{amssymb}

\begin{document}

$$\label{eqn:damage piecewise} d_i = \begin{dcases} \hskip2.7em\biggl( 1-\frac{E_i^\text{hrd}}{E_i}\biggr) \biggl( 1-\dfrac{1}{k_i} \biggr) & \forall \; 1 \leq k_i \leq k_i^\text{ult} \\[12pt] % d_i^\text{ult} \cdot \dfrac{k_i^\text{ult}}{k_i} + \biggl( 1 + \frac{E_i^\text{sft}}{E_i} \biggr) \biggl( 1 - \dfrac{k_i^\text{ult}}{k_i} \biggr) & \forall \; k_i^\text{ult} \leq k_i \leq k_i^\text{sft} \\[12pt] % d_i^\mathrm{sft} \cdot \dfrac{k_i^\text{sft}}{k_i} + \biggl( 1 + \frac{E_i^\text{res}}{E_i} \biggr) \biggl( 1 - \dfrac{k_i^\text{sft}}{k_i} \biggr) & \forall \; k_i^\text{sft} \leq k_i \leq k_i^{\max} \end{dcases}$$

\end{document}


• This is perfect. It looks much better than what I had down, I have accepted this answer, thanks. What is the difference between \Bigg and \biggl( ... \biggr) ? Is this what allows the delimiters to be slightly shorter than the contents? – Aaron Rhodes Sep 18 '20 at 15:29

You can make the same size brackets with \Big( and \Big) commands.

The code is as:

\documentclass [a4paper,12pt]{report}

\usepackage{amsmath}
\usepackage{amssymb}

\begin{document}

$$\label{eqn:damage piecewise} d_i = \begin{cases} \displaystyle \quad \quad \quad \Bigg( 1-\dfrac{E_i^{hrd}}{E_i}\Bigg) \Bigg( 1-\dfrac{1}{k_i} \Bigg) & \forall \quad 1 \leq k_i \leq k_i^{ult} \\[12pt] d_i^{ult} \cdot \dfrac{k_i^{ult}}{k_i} + \Bigg( 1 + \dfrac{E_i^{sft}}{E_i} \Bigg) \Bigg( 1 - \dfrac{k_i^{ult}}{k_i} \Bigg) & \forall \quad k_i^{ult} \leq k_i \leq k_i^{sft} \\[12pt] \displaystyle d_i^{sft} \cdot \dfrac{k_i^{sft}}{k_i} + \Bigg( 1 + \dfrac{E_i^{res}}{E_i} \Bigg) \Bigg( 1 - \dfrac{k_i^{sft}}{k_i} \Bigg) & \forall \quad k_i^{sft} \leq k_i \leq k_i^{max} \end{cases}$$

\end{document}


• I marked this answer as useful as it solves my problem. However, I will accept Bernard's answer, it corrects many of my "bad practices". – Aaron Rhodes Sep 18 '20 at 15:28