3

Here is a formula each term of which includes a summation symbol:

\documentclass{article}

\usepackage{mathtools}

\DeclarePairedDelimiter{\norm}{\lVert}{\rVert}

\begin{document}

\begin{equation*} \lambda_{2}~\frac{1}{\alpha}\displaystyle\sum_{\mathclap{j\in[\mathcal{R}\setminus\{i\}]\dot{\cup}\mathcal{O}}}\dfrac{\norm{q_{i}-q^{T}_{i}}^{\frac{1}{\alpha}}}{\norm{q_{i}-q_{j}}^{2}\hfill}+\lambda_{3}\norm{q_{i}-q^{T}_{i}}^{2}\displaystyle\sum_{\mathclap{k\in[\mathcal{R}\setminus\{i\}]}}\norm{q_{k}-q^{T}_{k}}
\end{equation*}

\end{document}

enter image description here

As one observes, the first limit collides the denominator of the first term's fraction. What is the best approach to fix this issue? The \smashoperator looks useless here as it seems only to work for horizontal shift of limits not vertical ones. Another (potentially necessary) requirement would be the alignment of those limits after the down-shift of the first one. For the alignment, I am not sure whether the \adjustlimits (here) works since, in my case, summations are not back-to-back placed next to each other.

5

A possibility with \substack:

\documentclass{article}

\usepackage{mathtools}

\DeclarePairedDelimiter{\norm}{\lVert}{\rVert}

\begin{document}

\begin{equation*} \lambda_{2}~\frac{1}{\alpha}\displaystyle\sum_{\substack{ j \in \\ \mathclap{[\mathcal{R}\setminus\{i\}]\dot{\cup}\mathcal{O}}}}\dfrac{\norm[\big]{q_{i}-q^{T}_{i}}^{\frac{1}{\alpha}}}{\norm{q_{i}-q_{j}}^{2}\hfill}+\lambda_{3}\norm{q_{i}-q^{T}_{i}}^{2} \sum_{\substack{k\in \\\mathclap{[\mathcal{R}\setminus\{i\}]}}}\norm[\big]{q_{k}-q^{T}_{k}}
\end{equation*}

\end{document} 

enter image description here

3

You could just write the constraints in two lines. This will also make it easier for the reader to see the difference between these two sums.

\documentclass{article}

\usepackage{mathtools}

\DeclarePairedDelimiter{\norm}{\lVert}{\rVert}

\begin{document}

\begin{equation*} 
\lambda_{2}~\frac{1}{\alpha}
\sum_{\mathclap{\begin{smallmatrix}
j\ne i\\
j\in\mathcal{R}\dot{\cup}\mathcal{O}
\end{smallmatrix}}}
\dfrac{\norm{q_{i}-q^{T}_{i}}^{\frac{1}{\alpha}}}{\norm{q_{i}-q_{j}}^{2}\hfill}
+\lambda_{3}\norm{q_{i}-q^{T}_{i}}^{2}\sum_{\mathclap{k\in[\mathcal{R}\setminus\{i\}]}}\norm{q_{k}-q^{T}_{k}}
\end{equation*}
\begin{equation*} 
\lambda_{2}~\frac{1}{\alpha}
\sum_{\mathclap{\begin{smallmatrix}
j\ne i\\
j\in\mathcal{R}\dot{\cup}\mathcal{O}
\end{smallmatrix}}}
\dfrac{\norm{q_{i}-q^{T}_{i}}^{\frac{1}{\alpha}}}{\norm{q_{i}-q_{j}}^{2}\hfill}
+\lambda_{3}\norm{q_{i}-q^{T}_{i}}^{2}\sum_{\begin{smallmatrix}k\ne i\\
k\in\mathcal{R}\end{smallmatrix}}\norm{q_{k}-q^{T}_{k}}
\end{equation*}


\end{document}

enter image description here

BTW, \displaystyle is not needed here. (And one never needs two of them in a single expression.)

Overall it is a matter of taste whether or not one wants to jam things together, but this question won't have a universally accepted answer.

3

I suggest that you define two new sets -- say, \mathcal{R}_1 and \mathcal{R}_2 -- to run the summation indices over.

enter image description here

Incidentally, since the contents of an equation* environment are typeset in display style by default, the two \displaystyle directives and \dfrac (instead of just \frac) do nothing except add code clutter. Omit them.

\documentclass{article}
\usepackage{mathtools} % for '\DeclarePairedDelimiter' macro
\DeclarePairedDelimiter{\norm}{\lVert}{\rVert}

\begin{document}
Put $\mathcal{P}=[\mathcal{R}\setminus\{i\}]$ and 
$\mathcal{Q}=\mathcal{P}\mathbin{\dot{\cup}}\mathcal{O}$. 
We have 
\begin{equation*} 
\lambda_{2} \, \frac{1}{\alpha}
\sum_{\mathclap{j\in\mathcal{Q}}}
\frac{\norm{q_{i}-q^{T}_{i}}^{1/\alpha}}{\norm{q_{i}-q_{j}}^{2}}
+\lambda_{3}\norm{q_{i}-q^{T}_{i}}^{2}
\sum_{\mathclap{k\in\mathcal{P}}} 
\norm{q_{k}-q^{T}_{k}}
\end{equation*}
\end{document}' 
\DeclarePairedDelimiter{\norm}{\lVert}{\rVert}

\begin{document}
Put $\mathcal{R}_1=[\mathcal{R}\setminus\{i\}]$ and 
$\mathcal{R}_2=\mathcal{R}_1\mathbin{\dot{\cup}}\mathcal{O}$. 
We have 
\begin{equation*} 
\lambda_{2} \, \frac{1}{\alpha}
\sum_{\mathclap{j\in\mathcal{R}_2}}
\frac{\norm{q_{i}-q^{T}_{i}}^{1/\alpha}}{\norm{q_{i}-q_{j}}^{2}}
+\lambda_{3}\norm{q_{i}-q^{T}_{i}}^{2}
\sum_{\mathclap{k\in\mathcal{R}_1}} 
\norm{q_{k}-q^{T}_{k}}
\end{equation*}
\end{document}
2

How about

...\mathclap{\rule{0mm}{4mm}j...

enter image description here

  • 1
    There is also an alignment requirement, if you noted in the question. How can I "automatically" bring the second limit down to be aligned with the first one? – Roboticist Nov 21 at 17:41
  • Use the same \rule... in the second sum. It will force it down equally much. – mf67 Nov 21 at 20:18

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.