Take the 2-minute tour ×
Computational Science Stack Exchange is a question and answer site for scientists using computers to solve scientific problems. It's 100% free, no registration required.

I am reading a book on numerical methods and the square of the discrete $L^2$ norm is defined as $$||x||^2_2=h\sum_1^Nx^2_i$$ Every point gets a "weight", which is $h$, thus this is like an average over the squares of the values at all points. This in fact comes from the approximation of a continuous integral. On the other hand, can I define similar norm where the grid is nonuniform with spacing $h_i$ as $$||x||^2_2=\sum_1^Nh_ix^2_i$$ that seems to me natural as I could approximate a continuous integral this way too but as I don't see that in the books made me suspicious I am missing something! So, if I have non-uniform grid and I want to make some estimates in this norm, how one should define it?

share|improve this question
    
there is no reference as I have NOT seen that in the book, that's why I am asking what is wrong by defining it this way? –  Kamil Jan 24 '13 at 12:07
    
@David, I don't think I have a typo there, do I? I just opend first pdf eecs.berkeley.edu/~colella/E266AFall2012/E266A20120920.pdf and it looks the same to me on page 2. –  Kamil Jan 27 '13 at 14:49
    
@David, I opened the book by Leveque on subsection A1.5 where the norm is defined the same as in the question, the elements in the sum are numbered from $0...N$ and $h=1/N$, I did not write explicitly that $h=1/(N-1)$, is that the issue? In fact, in the article above I linked the scaling is done by the number of points and in the book I mentioned the scaling is by the number of grid intervals. Can you be specific what is the issue here please? –  Kamil Jan 27 '13 at 22:42
    
I apologize. You confused me by claiming that you would define the norm. I never looked at the left side of your equation, since I assumed it was consistent with the text preceding it. I see now that you have (correctly) defined the norm squared. I edited the text to be consistent with that. This is a fine question. –  David Ketcheson Jan 28 '13 at 11:50
add comment

2 Answers

up vote 5 down vote accepted

You are exactly right: The norm is defined in such a way that the discrete (vector) norm equals (or at least approximates) the continuous norm of a corresponding function.

When you have non-uniform meshes, the form you give (with the $h_i$ inside the sum) is correct and frequently used in the analysis of non-uniform meshes.

Of course, in 2d, the correct formula would contain a factor of $h^2$ and in 3d of $h^3$.

share|improve this answer
add comment

Given a function $f(x)$, $x \in (a,b)$, let we define the $L^2$ norm as \begin{equation} \lVert f \rVert_2^2 = \int_a^b \lvert f(x)\rvert^2 \, dx. \end{equation} Given a vector $\mathbf f \equiv \{ f_i = f(x_i), \; i=0\dots N\}$, with $x_i = a + i \frac{b-a}{N}$ we define the discrete $L^2$ norm as

\begin{align} \lVert \mathbf f \rVert_{2,\text{d}}^2 &= h \sum_{i=0}^N \lvert f_i \rvert^2, &h = \frac{b-a}{N} \end{align} In your question you assume that this is done because we want that \begin{equation} \lim_{h \rightarrow 0} \: \lVert \mathbf f \rVert_{2,\text{d}} = \lVert f \rVert_2 \end{equation} and you are interpreting the discrete norm as a sort of quadrature rule, and wonder why for non uniform grids a better formula is not used.

This interpretation is not wrong, but not the only one possible. As an engineer working with physical quantities, instead of pure numbers, I prefer to think of the discrete norm as of an $\ell^2$-euclidean norm scaled in such a way to make it dimensionally homogeneous to the continuum $L^2$ norm. So if we can prove that $\lVert f - f^h \rVert_2 \rightarrow 0$, we may expect that $\lVert \mathbf f -\mathbf f^h\rVert_{2,\text{d}} \rightarrow 0$. Without the scaling factor this would not be true.

EDIT:

I deleted my conclusions here. See the answer by Wolfgang.

Note that the scaled euclidean norm is easy to compute, while your proposal is a little bit imprecise (may raise some concerns as a quadrature formula) and expensive to compute.

Bottom line: the discrete $L^2$-norm is not (needs not to be) and approximation to the continuous one, but can be simply interpreted as a scaled $\ell^2$-euclidean norm, dimensionally consistent to continuous $L^2$ norm.

share|improve this answer
    
ok, I agree with a scaling factor. Even though it might be expensive to compute it's not a fundamental reason not to use it though. Moreover, if I can't define it anyway, looks like I can't do than any stability estimates for non-uniform grid as stability comes with a norm and I am not able to come up with one. How would one handle than the proofs for non-uniform grid? –  Kamil Jan 25 '13 at 2:14
    
@Kamil my reply was just one possible rationale for the discrete $L^2$ norm in $1D$. (Following the same reasoning you arrive at a $h^d$ scaling for $d$-dimensional spaces.) It is not my intention forbidding you the use of any norm defined in the way you may prefer; however to address your concerns you should provide concrete examples in which you think that the "standard" definition is not valid or leads to wrong results. –  Stefano M Jan 25 '13 at 8:47
    
I see. The example is I have a non-uniform grid, doesn't have to be anything crazy, just a simple non-equidistancy. Thus, I am considering a method, say Euler implicit and willing to prove its stability. Therefore, how to define a norm then? I see in books all the theory is built for uniform meshes, however, there are advantages of the non0uniform grid in terms of a local truncation error... –  Kamil Jan 26 '13 at 0:51
    
I appreciate your answer but I have excepted the second one as it did in fact answer the question of the possibility to define such a norm. –  Kamil Jan 30 '13 at 1:37
add 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.