32 votes
Accepted

What are differences between 'a priori' and 'posteriori' error estimate in numerical analysis?

Error estimates usually have the form $$ \|u - u_h\| \leq C(h),$$ where $u$ is the exact solution you are interested in, $u_h$ is a computed approximate solution, $h$ is an approximation parameter you ...
Christian Clason's user avatar
17 votes
Accepted

Difference between l2 norm and L2 norm

Both norms are similar in that they are induced by the scalar product of the respective Hilbert space, but they differ because the different spaces are endowed with different inner products: For $\...
Christian Clason's user avatar
13 votes
Accepted

What does optimal convergence rate mean? How to prove whether a numerical method, e.g. FEM, has an optimal convergence rate or not?

The term is commonly used in the following way in the finite element context: Let's assume that $u\in V$ is the exact solution of the PDE, and $u_h\in V_h$ the finite element approximation. Then we ...
Wolfgang Bangerth's user avatar
11 votes

What is “tolerance” in ODE45 in Matlab?

And, it is my understanding that the 4 and the 5 are for the order of the global and local error, respectively. Your understanding is wrong. The local error of a Runge–Kutta method of order $n$ is ...
Wrzlprmft's user avatar
  • 2,032
10 votes
Accepted

Accuracy loss in single-precision Euclidean norm computation

The squares are harmless (as long as they don't overflow/underflow), because the relative perturbation they introduce is of the order of the machine precision $u\approx 10^{-8}$. Your troubles here ...
Federico Poloni's user avatar
9 votes
Accepted

How can I derive the a priori error estimate for a symmetric bilinear form using lagrange finite elements?

To extend VorKir's basically correct answer, to derive a priori error estimate for finite element approximations, you need to stack the following three Lego blocks: The well-posedness of the weak ...
Christian Clason's user avatar
7 votes
Accepted

Understanding the diffusion error of numerical schemes

Just figured it out. The solution diffuses BY A FACTOR OF $|G|^n$ after n time steps. So in my example, for the low frequency case, if let's say the original signal was a square wave advecting to the ...
F_B's user avatar
  • 111
6 votes

How to avoid the round-off errors in the larger calculations?

Below are some tips to reduce the effect of round off errors. A short method is to increment the floating point precision, for example from float to double, but many times this is too expensive or not ...
6 votes
Accepted

Error on a integral quantity with noise

Assuming that you mean the following inequality in your prompt $$ |F_\mathrm{true}(x) - F(x)| \le |dF(x)| \qquad \forall x,$$ a simple bound for $dM$ is the following $$ dM \equiv | M_\mathrm{true} - ...
Richard Zhang's user avatar
6 votes
Accepted

Different sources of error in Finite Element computations

The triangle inequality is your friend. Let's ignore the issue of boundary approximation for a moment, then you are computing a solution with inexact linear solver. Let's call it $u_h$. We will call ...
Wolfgang Bangerth's user avatar
6 votes
Accepted

How does non-dimensionalization improve the behavior of ODE solvers?

Background Let’s have a brief look at what parameters an integrator typically has and what they are used for. All of them govern step-size adaption: Relative tolerance (...
Wrzlprmft's user avatar
  • 2,032
5 votes

Difference between l2 norm and L2 norm

The 2-norm for sequences is denoted by $\ell^2$. For functions on the real line $L^2$ is the standard notation of the 2-norm.
S.B.'s user avatar
  • 151
5 votes

discrete definitions of curl $\nabla \times F$?

Continuous It looks like you only need 2d curl, so let's start with a simpler continuous definition: $$ \omega = \nabla \times \mathbf{u} = \frac{\delta v}{\delta x} - \frac{\delta u}{\delta y} $$ ...
hyperpallium's user avatar
5 votes
Accepted

Taylor expansion of error - Finite elements approximation

The question you ask is simpler than you may think. For any mesh size $h$, you can compute $\lambda(h)$. If this dependence is continuous, then you can do a Taylor expansion of $\lambda(h)$ around $h=...
Wolfgang Bangerth's user avatar
5 votes
Accepted

Step size updating scheme adaptive embedded RK methods

First of all I don't see how this estimates the local error defined as the error we make in a single step using correct previous values. What does a lower order method have anything to do with ...
Chris Rackauckas's user avatar
5 votes
Accepted

How to compute the $L^{2}$ error of the gradient in the Finite Element Method

Like any other integral, you evaluate the error integral through quadrature. Your suggestion at the end of the question is exactly what you would do: The norm of the gradient error square is a sum of ...
Wolfgang Bangerth's user avatar
5 votes
Accepted

Initial condition precision

In general, the initial error will already grow exponentially even if you solved the ODE exactly. The Lyapunov exponent (related to the Lipschitz condition) will tell you have fast. Separately, though,...
Wolfgang Bangerth's user avatar
5 votes
Accepted

Error in Simpson's 3/8 rule is higher than that of Simpson's 1/3 rule

The simple segment-$[a,b]$-with-midpoints error formulas are for the 1/3 rule $$ E=-\frac{(b-a)^5}{90·2^5}f^{(4)}(\zeta) $$ and for the 3/8 rule $$ E=-\frac{(b-a)^5}{90·72}f^{(4)}(\zeta) $$ Now the ...
Lutz Lehmann's user avatar
  • 5,544
5 votes
Accepted

The error propagation in calculating the inverse using a matrix decomposition

Irrespective of how you compute an approximate inverse $K\approx M^{-1}$, there is a limit to the (normwise) accuracy up to which $KM \approx I$ can hold: just because of the fact that $K$ and $M$ are ...
Federico Poloni's user avatar
4 votes
Accepted

Calculation of error

After a many days of discussions, your problems are 1) you choose too simple problem for which you reach the machine zero and therefore cannot observe normal properties 2) perhaps you do not use the ...
Michael Medvinsky's user avatar
4 votes

Numeric Quadrature with Derivatives

Although this thread is quite old, I thought it might be useful to have a reference to a peer-reviewed paper for generalizations of some common quadrature rules. Nenad Ujevic, "A generalization of ...
Lysistrata's user avatar
4 votes
Accepted

$L^2$-error in FEM: how to compute integral over reference element?

You can write $$\int_{0}^1 (f - \Pi_h^1(f))^2 dx = \sum_{i=0}^{N_e} \int_{e} (f - \Pi_h^1(f))^2 dx$$ where $e = [x_k, x_{k+1}]$ is an interval (triangle as you say). Method A (simple, no reference ...
Dr_Sam's user avatar
  • 1,246
4 votes
Accepted

What should I put on the paper to show the correctness and convergence of my solution?

You should definitely do a mesh refinement study (some conferences and journals require this). You should compare the results of this study to a known, analytical solution. You can either get this ...
Bill Barth's user avatar
  • 10.9k
4 votes
Accepted

error estimator VS error indicator in the context of FEM error estimation

In general, for a finite element approximation $u_h$ of the exact (but unknown) solution $u$ of a partial differential equation, it would of course be nice if we could compute something like $\|u-u_h\|...
Wolfgang Bangerth's user avatar
4 votes
Accepted

Error measure for a simple finite difference scheme

The error measure you have is not appropriate. That's because if you compute the quantities $df_i = \frac{f_{i+1}-f_i}{x_{i+1}-x_i}$, then they essentially approximate the error at location $\frac{x_{...
Wolfgang Bangerth's user avatar
4 votes
Accepted

Log-transformation of decision variables in parameter estimation

Transformations are usually a good idea if they are done to impose domain constraints. Using the exponential of a parameter (so storing the log, which I think is what you mean here) is a good way to ...
Chris Rackauckas's user avatar
4 votes
Accepted

Asymptotic error of forward Euler

When we say that Euler method is first order accurate, it means that for a class of ode with sufficiently smooth solutions, the error will be at most $O(h)$ and there is at least one ode for which it ...
cfdlab's user avatar
  • 2,993
4 votes
Accepted

Taylor expansion round-off error

Let $g(x)=\frac{f(x+h)-f(x)}{h}$, and let $\bar{g}(x)$ its floating point representation with machine precision denoted by $\mu$. Recall that $\text{fl}(f(x)) = f(x)(1+\delta)$ with $|\delta| \leq \mu$...
VoB's user avatar
  • 540
4 votes

A priori estimates in finite elements for inhomogeneous heat equation

Take a look at the papers by Vidar Thomee. Maybe Jim Bramble also has something. This would have been done in the 1970s and 1980s, maybe going into the 1990s. You will probably find that the points ...
Wolfgang Bangerth's user avatar
3 votes
Accepted

How can I compute the difference between shape function and dual solution in dwr?

You seem to be confused about what is a vector and what is a scalar. $z_h$ and $\phi_i$ are both scalars if evaluates at quadrature points. The fact that the $z_i$ form a vector really has no ...
Wolfgang Bangerth's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible