6

I am having trouble aligning the following inequalities in such a way that, on the right hand side, the first bracketed parts within the cube root are aligned below each other.

Additionally i would like the topmost right hand side to be left-aligned. Is this possible somehow?

\documentclass{article}
\usepackage{amsmath}
%used definitions
\newcommand{\mb}[1]{\mathbf{#1}}
\newcommand{\skp}[2]{\langle#1,\;#2\rangle} 
\newcommand{\cuberoot}[1]{\sqrt[\leftroot{0}\uproot{2}\scriptstyle 3]{#1}} 

\begin{document}
%inequalities
\begin{align}
    &&-\alpha\skp{\mb{a}}{\mb{n}_\mathcal{W}} &\;\geq\;& \skp{\mb{a}}{\mb{n}_\mathcal{W}}   \left( \cuberoot{\left(\left( 1+ \frac{h_\mathcal{F}}{a_z}\right)^3 -1\right)k_t+\alpha^3} -\alpha\right) \nonumber \\
    &\Leftrightarrow& -\alpha &\;\leq\;& \cuberoot{\left(\left( 1+ \frac{h_\mathcal{F}}{a_z}\right)^3 -1\right)k_t+\alpha^3} -\alpha \nonumber \\
    &\Leftrightarrow&  0 &\;\leq\;& \left(\left( 1+ \frac{h_\mathcal{F}}{a_z}\right)^3 -1\right)k_t+\alpha^3 \nonumber \\
    &\Leftrightarrow&  \alpha &\;\geq\;& \cuberoot{\left( 1- \left(1+ \frac{h_\mathcal{F}}{a_z}\right)^3 \right)\frac{\Delta t}{t_\mathcal{F}}} .
\end{align}
\end{document}

The result currently looks like: enter image description here

I have also tried to create a quick and dirty solution by placing negative \hspace between the inequality signs and the right parts, but they are ignored.

1
  • Welcome to TeX.SE! Please post not code snippets, but compilable examples that eliminate any pointless guesswork as to which packages may be needed. I've taken the liberty of adding four instructions to make your code compilable.
    – Mico
    Mar 5, 2015 at 22:56

4 Answers 4

5

perhaps this is what you had in mind. (a little different from egreg's approach.)

output or example code

\begin{alignat}{5}
  &&\qquad -\alpha\skp{\mb{a}}{\mb{n}_\mathcal{W}}
    &\geq \skp{\mb{a}}{\mb{n}_\mathcal{W}}
       &&\Biggl( \cuberoot{\left(\left( 1+ \frac{h_\mathcal{F}}{a_z}\right)^3 -1\right)k_t+\alpha^3} -\alpha\Biggr) \nonumber \\
  &\Leftrightarrow& -\alpha &\leq  
       && \phantom{\Biggl(}\cuberoot{\left(\left( 1+ \frac{h_\mathcal{F}}{a_z}\right)^3 -1\right)k_t+\alpha^3} -\alpha \nonumber \\
  &\Leftrightarrow&  0 &\leq
       && \phantom{\Biggl(\cuberoot{}}\left(\left( 1+ \frac{h_\mathcal{F}}{a_z}\right)^3 -1\right)k_t+\alpha^3 \nonumber \\
  &\Leftrightarrow&  \alpha &\geq
       && \phantom{\Biggl(}\cuberoot{\left( 1- \left(1+ \frac{h_\mathcal{F}}{a_z}\right)^3 \right)\frac{\Delta t}{t_\mathcal{F}}} .
\end{alignat}
4

Use alignat with manually sized parentheses around the big expression:

\documentclass{article}
\usepackage{amsmath}

\newcommand{\mb}[1]{\mathbf{#1}}
\newcommand{\skp}[2]{\langle#1,#2\rangle} 
\newcommand{\cuberoot}[1]{\sqrt[\leftroot{0}\uproot{2}\scriptstyle 3]{#1}}


\begin{document}

\begin{alignat}{3}
&& 
 -\alpha\skp{\mb{a}}{\mb{n}_\mathcal{W}} & \geq \skp{\mb{a}}{\mb{n}_\mathcal{W}}
 \Biggl(&& \cuberoot{\left(\left( 1+ \frac{h_\mathcal{F}}{a_z}\right)^{\!3} -1\right)k_t+\alpha^3}
           -\alpha\Biggr) \nonumber \\
&\Leftrightarrow\qquad&
 -\alpha &\leq 
        &&\cuberoot{\left(\left( 1+ \frac{h_\mathcal{F}}{a_z}\right)^{\!3} -1\right)k_t+\alpha^3}
          -\alpha \nonumber \\
&\Leftrightarrow&
 0 &\leq
        && \left(\left( 1+ \frac{h_\mathcal{F}}{a_z}\right)^{\!3} -1\right)k_t+\alpha^3
           \nonumber \\
&\Leftrightarrow&
 \alpha &\geq 
       &&\cuberoot{\left( 1- \left(1+ \frac{h_\mathcal{F}}{a_z}\right)^{\!3} \right)
         \frac{\Delta t}{t_\mathcal{F}}} .
\end{alignat}

\end{document}

Personally, I'd not try aligning those terms, leaving them near the inequality they refer to.

Note that your manual spacings \; are all wrong. There is no need that the outer parentheses fully cover the cube root.

enter image description here

You can make the alignment worse by moving the item in the third line to the right:

\documentclass{article}
\usepackage{amsmath}

\newcommand{\mb}[1]{\mathbf{#1}}
\newcommand{\skp}[2]{\langle#1,#2\rangle} 
\newcommand{\cuberoot}[1]{\sqrt[\leftroot{0}\uproot{2}\scriptstyle 3]{#1}}

\newcommand{\cuberootspace}{%
  \hphantom{\cuberoot{\vphantom{\left(\left(\frac{h_\mathcal{F}}{a_z}\right)^{3}\right)}}}%
}


\begin{document}

\begin{alignat}{3}
&& 
 -\alpha\skp{\mb{a}}{\mb{n}_\mathcal{W}} & \geq \skp{\mb{a}}{\mb{n}_\mathcal{W}}
 \Biggl(&& \cuberoot{\left(\left( 1+ \frac{h_\mathcal{F}}{a_z}\right)^{\!3} -1\right)k_t+\alpha^3}
           -\alpha\Biggr) \nonumber \\
&\Leftrightarrow\qquad&
 -\alpha &\leq 
        &&\cuberoot{\left(\left( 1+ \frac{h_\mathcal{F}}{a_z}\right)^{\!3} -1\right)k_t+\alpha^3}
          -\alpha \nonumber \\
&\Leftrightarrow&
 0 &\leq
        && \cuberootspace
           \left(\left( 1+ \frac{h_\mathcal{F}}{a_z}\right)^{\!3} -1\right)k_t+\alpha^3
           \nonumber \\
&\Leftrightarrow&
 \alpha &\geq 
       &&\cuberoot{\left( 1- \left(1+ \frac{h_\mathcal{F}}{a_z}\right)^{\!3} \right)
         \frac{\Delta t}{t_\mathcal{F}}} .
\end{alignat}

\end{document}

enter image description here

Or you can improve the appearance by using align and removing the double arrows

\documentclass{article}
\usepackage{amsmath}

\newcommand{\mb}[1]{\mathbf{#1}}
\newcommand{\skp}[2]{\langle#1,#2\rangle} 
\newcommand{\cuberoot}[1]{\sqrt[\uproot{2}\scriptstyle 3]{#1}}

\begin{document}

The following inequalities are easy seen to be equivalent
\begin{align}
-\alpha\skp{\mb{a}}{\mb{n}_\mathcal{W}} 
 &\geq \skp{\mb{a}}{\mb{n}_\mathcal{W}}
  \Biggl(\cuberoot{\biggl(\biggl( 1+ \frac{h_\mathcal{F}}{a_z}\biggr)^{\!3} -1\biggr)k_t+\alpha^3}
         -\alpha\Biggr) \nonumber \\
-\alpha &\leq 
        \cuberoot{\biggl(\biggl( 1+ \frac{h_\mathcal{F}}{a_z}\biggr)^{\!3} -1\biggr)k_t+\alpha^3}
        -\alpha \nonumber \\
0 &\leq
       \biggl(\biggl( 1+ \frac{h_\mathcal{F}}{a_z}\biggr)^{\!3} -1\biggr)k_t+\alpha^3
       \nonumber \\
\alpha &\geq 
       \cuberoot{\biggl( 1- \biggl(1+ \frac{h_\mathcal{F}}{a_z}\biggr)^{\!3} \biggr)
       \frac{\Delta t}{t_\mathcal{F}}} .
\end{align}

\end{document}

enter image description here

3
  • Thank you for the answer and your additional suggestions, egreg . However, how can i align the third line correctly? Ideally it should match up the first \left( WITHIN the cube root...?
    – Thomas
    Mar 5, 2015 at 23:04
  • @Thomas As I said, I would not attempt such alignments. They add nothing to clarity, in my opinion. But wait and I should be able to show it.
    – egreg
    Mar 5, 2015 at 23:11
  • Okay, that use of a vphantom inside to scale up the root is clever, however, surprisingly, the alignment is not as exact as with the non-scaled root of barbaras suggestion. I have no idea why. But thanks a lot for taking the time.
    – Thomas
    Mar 5, 2015 at 23:24
3

Here's a solution that dispenses with the massively long root symbols and uses square brackets and curly braces to achieve easy-to-discern grouping of some of the parentheses. All large "fence" symbols are set to size \bigg.

enter image description here

\documentclass{article}
\usepackage{amsmath} % for "align" environment

%used definitions
\newcommand{\mb}[1]{\mathbf{#1}}
\newcommand{\skp}[2]{\langle#1,\;#2\rangle} 
\newcommand\phskp{\phantom{\skp{\mb{a}}{\mb{n}_\mathcal{W}}}}
\begin{document}
%inequalities
\begin{align}
    &&-\alpha\skp{\mb{a}}{\mb{n}_\mathcal{W}} 
    &\ge  \skp{\mb{a}}{\mb{n}_\mathcal{W}} \biggl\{ \biggl[ 
    \biggl(\biggl( 1+ \frac{h_\mathcal{F}}{a_z}\biggr)^{\!3} -1\biggr)k_t+\alpha^3\biggr]^{1/3} -\alpha\biggr\} \nonumber \\
    &\Leftrightarrow& -\alpha 
    &\le \phskp \phantom{\biggl\{}\biggl[ 
    \biggl(\biggl( 1+ \frac{h_\mathcal{F}}{a_z}\biggr)^{\!3} -1\biggr)k_t+\alpha^3\biggr]^{1/3} -\alpha \nonumber \\
    &\Leftrightarrow&  0 
    &\le \phskp \phantom{\biggl\{\biggl[} 
    \biggl(\biggl( 1+ \frac{h_\mathcal{F}}{a_z}\biggr)^{\!3} -1\biggr)k_t+\alpha^3 \nonumber \\
    &\Leftrightarrow&  \alpha 
    &\ge \phskp \phantom{\biggl\{}\biggl[ 
    \biggl( 1- \biggl(1+ \frac{h_\mathcal{F}}{a_z}\biggr)^{\!3}\, \biggr) \frac{\Delta t}{t_\mathcal{F}}\biggr]^{1/3} .
\end{align}
\end{document}
2
  • Okay, not a bad idea in general. However i like to stick to the root sign for context reasons. Also, not that anyone would notice, you have flipped the \les to \ges... ;)
    – Thomas
    Mar 5, 2015 at 23:30
  • I'll fix the flipped inequality symbols. :-)
    – Mico
    Mar 5, 2015 at 23:33
1

I would propose this variant, with alignat{3}:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{amsmath}
\usepackage{mathtools}

%used definitions
\newcommand{\mb}[1]{\mathbf{#1}}
\newcommand{\skp}[2]{\langle#1,\;#2\rangle}
\newcommand{\cuberoot}[1]{√[\leftroot{0}\uproot{2}\scriptstyle 3]{#1}}


\begin{document}

%inequalities
\begin{alignat}{3}
                  & & \mathllap{-α \skp{\mb{a}}{\mb{n}_\mathcal{W}} \geq \skp{\mb{a}}{\mb{n}_\mathcal{W}}} \Biggl( & \cuberoot{\left(\left( 1+ \frac{h_\mathcal{F}}{a_z}\right)^3 -1\right)k_t+α^3} -α \Biggr) \notag \\
  \Leftrightarrow & \quad & -α \leq & \cuberoot{\left(\left( 1+ \frac{h_\mathcal{F}}{a_z}\right)^3 -1\right)k_t+α^3} -α \notag \\
  \Leftrightarrow & & 0 \leq & \hskip1em\left(\left( 1+ \frac{h_\mathcal{F}}{a_z}\right)^3 -1\right)k_t+α^3 \notag \\
  \Leftrightarrow & & α \geq & \cuberoot{\left( 1- \left(1+ \frac{h_\mathcal{F}}{a_z}\right)^3 \right)\frac{Δ t}{t_\mathcal{F}}}
\end{alignat}

\end{document}

enter image description here

You must log in to answer this question.

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