5

The text size shrinks in a multiline equation when I use fractions. How can I keep it the same as the non-multiline equation size?

\begin{equation}
    \begin{cases}
    p = -\frac{1}{\chi}\text{div}(\mathbf{u}),\\
    \rho \frac{\partial^2}{\partial t^2} = - \nabla p.
    \end{cases}
\end{equation}

I need it the same size as this -

\begin{equation}
 p = -\frac{1}{\chi}\text{div}(\mathbf{u})
\end{equation}
5

Using \dfrac instead of \frac will force the fraction to display at the "usual" size.

Hence using this code will work:

\begin{equation}
    \begin{cases}
        p = -\dfrac{1}{\chi}\mathrm{div}(\mathbf{u}),\\
        \rho \dfrac{\partial^2}{\partial t^2} = - \nabla p.
    \end{cases}
\end{equation}

Edit: As suggested by Manuel, using \dcases is a better alternative

The code becomes

\begin{equation}
    \begin{dcases}
        p = -\frac{1}{\chi}\mathrm{div}(\mathbf{u}),\\
        \rho \frac{\partial^2}{\partial t^2} = - \nabla p.
    \end{dcases}
\end{equation}
1
  • May be better use dcases instead of cases? – Manuel Nov 29 '15 at 13:28
4

You can use the dcases environment provided by mathtools. Note also some improvements to your code.

\documentclass{article}
\usepackage{amsmath,mathtools}

\DeclareMathOperator{\Div}{div}
\newcommand{\vect}[1]{\mathbf{#1}}

\begin{document}

\begin{equation}
\begin{dcases}
p=-\frac{1}{\chi}\Div\vect{u}, \\
\rho\frac{\partial^2}{\partial t^2}=-\nabla p
\end{dcases}
\end{equation}

\end{document}

enter image description here

A further improvement for the partial derivative: with

\newcommand{\pder}[3][]{%
  \frac{\partial\if\relax\detokenize{#1}\relax\else^{#1}\fi#2}
       {\partial#3\if\relax\detokenize{#1}\relax\else^{#1}\fi}%
}

in the preamble, you can use

\pder{f}{t}
\pder[2]{f}{t}
\pder{}{t}
\pder[2]{}{t}

and your case would be the last one.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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