I have a long expression (maximization problem) which I force down to the next line using //
.
I also have two functions ("subject to") which I want to place underneath. I use &
to make the expressions fit vertically.
Problem:
- The third integral expression which I have to force down looks weird and isn't aligned with the two integral expression above. I don't know how to fix it.
- The alignment is off. Fx "Another equation here" should be aligned with
Max(n_G, 0) \leq n_{min} \leq Min(n_B,1)
. Using&
obviously doesn't solve the problem. - Extra: The reason I use
\def\mclimits_#1{\limits_{\mathclap{#1}}}
is to make the long expressionn_{min}
fit in the limits of the integral.
Code:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{mathtools}
\def\mclimits_#1{\limits_{\mathclap{#1}}}
\begin{document}
\begin{equation}
\begin{aligned}
\underset{n_{min}}{\text{argmax}}
& & \Pi = \frac{1}{M}\[
\int\mclimits_{n_{min}}^M\! n_cP_c\, \mathrm{d}n_c
\] + \frac{p}{M}\[
\int\mclimits_{n_B}^M\! \delta\bigg(z\beta P_r\big(h(1-n_B)+(1-h)x_B\big)-D\bigg)\, \mathrm{d}n_c
\] \\
& & + \frac{1-p}{M}\[
\int\mclimits_{n_{min}}^M\! \delta\bigg(z\beta P_r\big(h(1-n_B)+(1-h)x_G\big)-D\bigg)\, \mathrm{d}n_c
\] \\
\text{subject to}
& & Max(n_G, 0) \leq n_{min} \leq Min(n_B,1)\\
& & \text{Another equation here}\\
\end{aligned}
\end{equation}
\end{document}
Current output:
Best Answer
Your MWE has errors: you nested equation (
\[ ... \]
) in equation ... I try to figured out what is your problem. After cleaning of your code I obtain the following results:Is this what you looking for? In your code I also added a
split
environment for the long first equation:Thanks to @egreg for the improvements he suggested in his comment.