1

I have several long equations like the one below which bleed to the right margin of the document and lead to equation number being placed below them. Is there a way I can center them -- maybe by moving them a little inside the left margin? I tried using the solution here but it didn't work. I don't want to use smaller font size to handle this issue. Is there a way to handle them that I might not be aware of or is there some sort of 'best practice'?

enter image description here

Here is the MWE

\documentclass[12pt,a4paper]{article}
\usepackage[margin=1.9cm]{geometry}
\usepackage{mathtools}
\usepackage{bbm}
\usepackage{amsmath, amsfonts, amsthm, amssymb, epsfig}
\usepackage[scr=boondoxo,scrscaled=1.05]{mathalfa}
\begin{document}
The second part of impatient household's problem includes maximizing their utility, given their choice of loans. This can be written as 
\begin{equation}
\mathscr{L}_{t} = 
\mathbb{E}_{t}
\begin{Bmatrix}
    \sum_{t = 0}^{\infty}\left(\beta^{I}\right)^{t}
    \begin{bmatrix}
    \log\left(C_{m, t}^{I} - \gamma^{I}C_{m, t-1}^{I}\right) - \iota_{t}N_{m, t}^{I} + \varsigma_{t}\log H_{m, t}^{I} \\
    - \lambda_{m, t}^{I}
    \begin{bmatrix}
    C_{m, t}^{I} + \int_{0}^{1}R_{t-1}^{L}l_{mk, t-1}^{I}\mathrm{d}k - W_{t}^{I}N_{m, t}^{I} + Q_{t}^{H}\left(H_{m, t}^{I} - H_{m, t-1}^{I}\right) - x_{m, t}^{I} - \Phi_{t}^{I} - \Psi_{t}^{I}
    \end{bmatrix} \\
    - \mu_{m, t}^{I}
    \begin{bmatrix}
    R_{k, t}^{L}\int_{0}^{1}l_{mk, t}^{I}\mathrm{d}k - \int_{0}^{1}\theta_{k, t}\mathrm{d}k \mathbb{E}_{t}\left(Q_{t+1}^{H}H_{m, t}^{I}\right)
    \end{bmatrix} \\
    - \epsilon_{m, t}^{I}
    \begin{bmatrix}
    x_{m, t}^{I} - \left\{\int_{0}^{1}\left(l_{mk, t}^{I} - \gamma^{L}s_{k, t-1}^{I}\right)^{\frac{\xi - 1}{\xi}}\mathrm{d}k\right\}^{\frac{\xi}{\xi - 1}}
    \end{bmatrix} 
    \end{bmatrix}
\end{Bmatrix}
\end{equation}
\end{document}
3
  • 1
    You really ought to rephrase the equation instead. No-one want to read something like that.
    – daleif
    Dec 2, 2022 at 9:29
  • @daleif Any suggestions on how to 'rephrase' the equation? In other words, what exactly would you have liked to see?
    – V Kahn
    Dec 2, 2022 at 9:34
  • You could probably just move - x_{m, t}^{I} - \Phi_{t}^{I} - \Psi_{t}^{I} to the next line also don't use bmatrix for equations, that uses textstyle not displaystyle (see limits on \sum for example) but it would be far more readable if you split this up, giving names to the subterms. Dec 2, 2022 at 9:44

1 Answer 1

1

I would stagger, rather than center.

\documentclass[12pt,a4paper]{article}
\usepackage[margin=1.9cm]{geometry}
\usepackage{mathtools}
\usepackage{bbm}
\usepackage{amsmath, amsfonts, amsthm, amssymb}
\usepackage[scr=boondoxo,scrscaled=1.05]{mathalfa}

\newcommand{\diff}{\mathop{}\!\mathrm{d}}

\begin{document}

The second part of impatient household's problem includes maximizing their utility, 
given their choice of loans. This can be written as 
\begin{equation}
\begin{gathered}
\mathscr{L}_{t} = 
\mathbb{E}_{t} = \sum_{t = 0}^{\infty}(\beta^{I})^{t} \biggl\{
  \begin{aligned}[t]
    & \log(C_{m, t}^{I} - \gamma^{I}C_{m, t-1}^{I}) 
      - \iota_{t}N_{m, t}^{I} + \varsigma_{t}\log H_{m, t}^{I}
    \\
    & - \lambda_{m, t}^{I} \biggl[
      \begin{aligned}[t]
        & C_{m, t}^{I} + \int_{0}^{1}R_{t-1}^{L}l_{mk, t-1}^{I}\diff k - W_{t}^{I}N_{m, t}^{I}
        \\
        &+ Q_{t}^{H}(H_{m, t}^{I} - H_{m, t-1}^{I}) - x_{m, t}^{I} - \Phi_{t}^{I} - \Psi_{t}^{I}
      \biggr]
      \end{aligned}
    \\
    & - \mu_{m, t}^{I} \biggl[
      R_{k, t}^{L}\int_{0}^{1}l_{mk, t}^{I}\diff k
      - \mathbb{E}_{t}(Q_{t+1}^{H}H_{m, t}^{I}) \int_{0}^{1}\theta_{k, t}\diff k 
      \biggr]
    \\
    & - \epsilon_{m, t}^{I} \biggl[
      x_{m, t}^{I} - \biggl(
        \int_{0}^{1}(l_{mk, t}^{I} - \gamma^{L}s_{k, t-1}^{I})^{\frac{\xi - 1}{\xi}}\diff k
      \biggr)^{\frac{\xi}{\xi - 1}}
  \biggr]\biggr\}
\end{aligned}
\end{gathered}
\end{equation}

\end{document}

The enclosing gathered places the equation number at the vertical center.

Note that all of your \left and \right were useless (apart from adding unwanted spacing).

I also added a better way to type in the differential.

enter image description here

The epsfig package only exists for back compatibility and should never be used in documents written in the last 25 years.

1
  • 1
    @daleif Yeah, right. I'll fix in a moment.
    – egreg
    Dec 2, 2022 at 10:18

You must log in to answer this question.

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