Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have this norm

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation}
\lVert f \rVert_{L_{2}(\Omega)} = \text{sup}_{
\begin{cases} 
v \in L_{2}(\Omega) \\
v \not= 0
\end{cases}
}
\frac{|(f,v)|} {\lVert v \rVert_{L_{2}(\Omega)}}
\end{equation}
\end{document}

which looks like

enter image description here

In the Johnson book about Finite Element methods the regulations are under the suprenum. However, I am not sure if this is the best way to present this.

How can you write this equation rigorously?

share|improve this question
add comment

3 Answers

up vote 9 down vote accepted

If you have many norms in your document, it's better to use mathtools for simplifying input. I also add a \normL macro defined with the help of xparse.

Note that the commands \abs and \norm (as well as \normL) accept an optional argument which can be \big, \Big, \bigg or \Bigg in order to resize the fences; they can also be followed by * to imply usage of \left and \right.

The most important part is, however, \substack:

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

\DeclarePairedDelimiter{\abs}{\lvert}{\rvert}
\DeclarePairedDelimiter{\norm}{\lVert}{\rVert}
\NewDocumentCommand{\normL}{ s O{} m }{%
  \IfBooleanTF{#1}{\norm*{#3}}{\norm[#2]{#3}}_{L_2(\Omega)}%
}

\begin{document}
\begin{equation}
\norm{f}_{L_{2}(\Omega)} =
\sup_{\substack{v \in L_{2}(\Omega) \\ v \not= 0}}
  \frac{\abs{(f,v)}}{\norm{v}_{L_{2}(\Omega)}}
\end{equation}
% Simplified notation with \normL
\begin{equation}
\normL{f} =
\sup_{\substack{v \in L_{2}(\Omega) \\ v \not= 0}} \frac{\abs{(f,v)}}{\normL{v}}
\end{equation}
\end{document}

enter image description here

share|improve this answer
    
I can not see difference between (1) and (2). Should I change my glasses? lol –  Sigur Jan 3 at 17:28
    
@Sigur The two inputs are indeed supposed to give the same output. –  egreg Jan 3 at 17:29
    
Ah, great! See them here, with a small xshift to compare: dl.dropboxusercontent.com/u/42709342/q26hp.png –  Sigur Jan 3 at 17:33
    
I love your way of using DeclarePair, since it improves the readability of Mathematics inside TeX much. –  Masi Jan 3 at 22:14
1  
@masi You're supposed to say \abs[\Big]{x}. –  egreg Jan 3 at 22:49
show 2 more comments

First, you should use \sup. With amsmath you can use \substack{} which allows multiple lines on the index.

With \nolimits the index is not below the \sup.

\begin{equation}
\lVert f \rVert_{L_{2}(\Omega)} = \sup\nolimits_{
\substack{v \in L_{2}(\Omega) \\ v \neq 0 } }       %% \neq used
\frac{|(f,v)|}{\lVert v \rVert_{L_{2}(\Omega)}}
\end{equation}

The default is below the \sup.

\begin{equation}
\lVert f \rVert_{L_{2}(\Omega)} = \sup_{
\substack{v \in L_{2}(\Omega) \\ v \neq 0 } }
\frac{|(f,v)|}{\lVert v \rVert_{L_{2}(\Omega)}}
\end{equation}

enter image description here

share|improve this answer
add comment

Like @Sigur, I would use \sup and a \substack directive rather than a cases environment to place v \in L_{2}(\Omega) and v \not= 0 immediately below sup.

In addition, in order to achieve a slightly better positioning (IMNSHO) of the subscript term L_2(\Omega) with respect to the norm terms, I suggest you define a macro called \norm that uses explicit \left and \right directives, as in

\newcommand{\norm}[1]{\left\lVert #1 \right\rVert}

Note that the size of the double vertical bars that encase the f and v terms won't be affected by the presence of these additional directives. The purpose of using \left and \right, then, is purely to affect the positioning of the superscript term, which will be lower than if \left and \right weren't used in conjunction with \lVert and \rVert.

enter image description here

\documentclass{article}
\usepackage{amsmath}
\newcommand{\abs}[1]{ \left\lvert#1\right\rvert} % absolute value: single vertical bars
\newcommand{\norm}[1]{\left\lVert#1\right\rVert} % norm: double vertical bars

\begin{document}
\begin{equation}
\norm{f}_{L_{2}(\Omega)} = 
\sup_{ \substack{v \in L_{2}(\Omega) \\ v \not= 0} }
\frac{ \abs{(f,v)} }{ \norm{v}_{L_{2}(\Omega)} }
\end{equation}
\end{document} 
share|improve this answer
4  
Sorry, but the definition of \abs and \norm are wrong. –  egreg Jan 3 at 15:42
    
@egreg - Would you mind elaborating? In the examples at hand, there is no difference between the output created by "my" macros and those generated via the \DeclarePairedDelimiter macro of the mathtools package. Hence, "my" macros can't be that wrong! –  Mico Jan 3 at 17:10
1  
Yes, they are, because they always use \left and \right; you know I'm adamant at this. –  egreg Jan 3 at 17:12
    
@egreg - I agree with you that the automatic insertion of extra whitespace effected by \left and \right is, in general, undesirable. However, in the specific case of absolute-value and norm expressions, I believe there's actually a (modest) virtue to having LaTeX insert a bit of extra space outside these terms, especially when there are several consecutive such terms: the bit of extra space provides some visual "breathing room" that helps the eye parse the expressions. Give it a try with formulas such as $k\abs{f}\abs{g}$ and $a\norm{u}\norm{v}$... –  Mico Jan 3 at 17:23
    
No, that's solved by $a\norm{u}\,\norm{v}$. –  egreg Jan 3 at 17:30
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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