Questions tagged [stability]

The study of the propagation of errors in a numerical algorithm.

Filter by
Sorted by
Tagged with
0
votes
1answer
86 views

Method of Lines Runge-Kutta nonlinear stability and behavior

I have a system of 4 nonlinear 1st-order PDEs. I want to solve them numerically by method of lines, first discretizing space. This leads to the system of $N\times 4$ coupled ODEs. $$ \mathbf{u}_{i} =...
0
votes
0answers
65 views

Why is my numerical solution to a set of ODEs infinite?

I am trying to solve the following linear PDEs $$\frac{\partial u_x}{\partial x}=-[i\omega b_{||}+\nabla_\perp u_\perp],$$ $$\frac{\partial b_{||}}{\partial x}=-\frac{i}{\omega}\mathcal{L}u_x,$$ $$\...
0
votes
0answers
26 views

Compute the sum of probabilities when they are given as logits

Say I have a set of numerous probabilities given by their logarithm : $\{\ln p_i, 1 \leq i \leq N\}$. I want to compute $\sum p_i$, if possible without exponentiating $\ln p_i$, since some of those ...
1
vote
0answers
25 views

von Neumann analysis: computation of maximum value of amplification factor

In this question I adress the stability property of a numerical scheme (a FDM described below) to the problem $$ \begin{align} u_{t} &= \alpha u_{xx}+\beta u_{xxxx}, & &x\in\mathbb{R},\;t&...
0
votes
1answer
45 views

Reinch's modification to the Clenshaw recurrence gives no improvement

The classical Clenshaw recurrence (see Algorithm 3.1 here) is less accurate as $x\to \pm 1$. So Reich proposed a modification to it, which is discussed as Algorithm 3.2 as well as by Oliver. While ...
2
votes
0answers
31 views

Convergent Finite Difference Scheme for Parabolic Equation

Consider the PDE $$u_t = b_{11}u_{xx} + 2b_{12}u_{xy} + b_{22}u_{yy},$$ where $b_{11}, b_{22} > 0$, and $b_{12}^2 < b_1b_2$. In Strikwerda's book, the ADI scehme \begin{align*} \left( 1 - \frac{...
0
votes
0answers
37 views

Unconditionally stable numerical method for 1st order non-linear coupled ODEs?

I am attempting to numerically solve the following system of ODEs: $$\begin{gather}\frac{dT_1}{dt} = f_1(T_1,T_2), \quad T_1(t=0)=T_{1,0} \\[3pt] \frac{dT_2}{dt} = f_2(T_1,T_2), \quad T_2(t=0)=T_{2,0}...
0
votes
1answer
41 views

Showing stability of numerical scheme: Decaying norm implies stability?

I have a little trouble formulating my question since I am not really sure what conclusions I am supposed to draw from the results I have obtained. I am sorry for the long problem formulation below, ...
3
votes
1answer
92 views

Determine stability of an algorithm?

This is related to a question I answered on Stack Overflow regarding calculating the square root of a number. I was thinking about it and realized that the formula is just the first in a family of ...
3
votes
1answer
194 views

log-sum-exp trick for signed/complex numbers

I need to evaluate a sum of values that are on many different orders of magnitude in scale but might be signed. I’ve had great luck with the “log-sum-exp” trick for an unsigned version of my problem, ...
2
votes
1answer
119 views

Numerical stability in the product of many matrices

I have to calculate in numpy the matrix-product of many matrices (~400). Are there common practices to increase numerical stability? If this is relevant, the matrices are $300\times 300$ orthogonal ...
2
votes
1answer
127 views

Modified Equation and Stability for Centred Finite Differences for Wave Equation

I am trying to use the modified equation to derive the stability condition for the finite difference approximation $$ \frac{u(x,t+\Delta t) - 2 u(x, t) + u(x, t -\Delta t)}{\Delta t^2} = c^2 \frac{...
2
votes
1answer
139 views

Step size and stability of Euler forward method

I'm trying to calculate the maximum step size that provides stability for the following nonlinear IVP using the Euler forward method: $u'(t) = -200tu(t)^2,\qquad u_0 = 1, \qquad t\in [0,3]$, with ...
2
votes
3answers
151 views

What is the flaw in my stability analysis?

The ODE $${d^2x\over dt^2}=-kx; k>0$$can be converted in the system of linear equations as $$\begin{align} {dx\over dt} & =v\\ {dv\over dt} &= -kx\\ \end{align}$$ Using Euler’s method, ...
2
votes
1answer
52 views

Stability of a finite-difference scheme for the reaction-diffusion equation

I currently need to solve numerically the following reaction-diffusion equation: $$\partial_tu=\partial^2_xu+u-u^2$$ For this purpose, I use the following numerical scheme (Crank-Nicolson??): $$ \...
3
votes
1answer
55 views

Bounding error of float32 matrix multiplication

Some numerical debugging led me to the minimal example below. I'm observing relative error of 0.75 on individual elements. Is there a way to estimate/bound this error without resorting to higher ...
1
vote
0answers
28 views

Finite difference/element method : time step and spatial resolution close to a finite singularity

I'm using the finite element method (FEM), but my question is quite a global question. It's related to this question but it is not the same. Let's assume we have this equation : $$\partial_t c - u\...
5
votes
1answer
250 views

Stability of hyperbolic PDE and DG-FEM

In the book of Hesthaven and Warburton on discontinuous Galerlkin methods in example 2.3 (regarding solutions of the wave equation), the authors regard the following PDE: $$\frac{\partial u }{\...
0
votes
0answers
40 views

Testing the SUPG method and other methods for hyperbolic equations

I am interesting in integrating the simple equation $$ \frac{\partial \phi}{\partial t} + \mathbf{u}\cdot\nabla \phi = 0 $$ with a Dirichlet boundary condition at the influx boundary ($\mathbf{u} \...
1
vote
0answers
70 views

Numerically Approximating the Jacobian and Comparing the Eigenvalues With Analytical Form

I am trying to study the stability of numerical discretization schemes using the Jacobian matrix of the residues with respect to the vector of conserved variables. For a simple diffusion equation ...
1
vote
0answers
45 views

Stability of SVD, Eigendecompositions, and pseudoinverse procedures in modern LAPACK routines

I have proposed an optimisation algorithm which I claim has improved upon the previous algorithm in a number of ways. One of these claims is that my proposed solution requires no explicit SVD and ...
0
votes
1answer
73 views

Numerical Stability of a Generalized Spatial Discretization Scheme

After reading the matrix stability chapter (10) of Hirsch [1], I decided to dive in the reference list of the chapter. One of the papers [2], which is cited as reference shows an very interesting ...
2
votes
2answers
86 views

Stability of Crank-Nicolson for $u_t = iu_{xx}+2iu$

I want to use the Crank-Nicolson scheme to solve the equation $$u_t = iu_{xx}+2iu$$ Here's the analysis: Suppose we make a grid, with $k = dt$ and $h = dx$, the usual notation, and also $u_j^n = u(...
0
votes
0answers
66 views

The final Boundary Condition is Unknown, Is Backward Euler is still valid to be implemented?

I am working on conductive polymer modeling and supposed to do one-dimensional diffusion model in the thickness of the polymer, however, due to the small value of thickness in micro, when I use the ...
3
votes
1answer
102 views

Stability region of explicit midpoint method

Consider the explicit midpoint method, i.e $$y_{n+1}-y_{n-1} = 2hf(y_n).$$ I'm asked to apply this method to the linear test equation, $f(y_n) = \lambda y_n,$ in order to find the method's stability ...
2
votes
1answer
124 views

Why the numerical solution of advection-dominant problem is challenging

In many CFD text books, usually there is a dedicated chapter for advection term discretization. Why discretization of such term in advection-dominated problems and near the discontinuities is ...
0
votes
1answer
78 views

Stability of PDEs

I am currently trying to solve some PDEs with FiPy. At page 56, the manual mentions (https://www.ctcms.nist.gov/fipy/download/fipy-3.0.pdf). The largest stable timestep that can be taken for this ...
2
votes
1answer
89 views

Assessing numerical error in solving a least squares problem

I have a linear system of the type $$Ax = b$$ I want to minimise $|b - Ax|^2$. I know there are different approaches to directly solve the system (Normal equation + Cholesky, QR decomposition, SVD ...
3
votes
2answers
346 views

Generate high n quantum harmonic oscillator states numerically

How can I generate the higher $n$ quantum harmonic oscillator wavefunction (in position space) numerically? Here, higher means around $n=500$, or say $n=2000$, where $n$ is the $n$th oscillator ...
5
votes
0answers
248 views

Any way to avoid catastrophic cancellation when computing the discriminant of a quadratic function?

Homework disclaimer... The task: We are using the following algorithm to solve the quadratic equation $x^2+2px+q=0$: $x_1=|p|+\sqrt{p^2-q}\mathtt{;}$ $\mathtt{if}\,p>0\,\mathtt{then}\,x_1=-x_1\...
3
votes
2answers
98 views

1+x not backwards stable?

If you compute 1+x for x less than the machine precision, the answer will be 1 which is the ...
5
votes
2answers
941 views

Fast and Numerically Stable Pairwise Distance Algorithms

I'm looking for resources on fast, numerically stable pairwise euclidean distance algorithms. In particular, suppose $A \in \mathbb{R}^{M \times D}$ and $B \in \mathbb{R}^{N \times D}$ are two sets of ...
2
votes
1answer
91 views

Stability Analysis

The partial differential equation, \begin{align} \dfrac{\partial f}{\partial x} + a(x)\dfrac{\partial f}{\partial y} = 0 \qquad & f(0,y) = f(L_1,y) = c_0e^{-y} \\ & f(x,0) = c_0 \;,\; f(x,L_2) ...
4
votes
0answers
69 views

Automatic differentiation of barycentric rational functions

By a barycentric rational interpolant we understand a function of the form \begin{align*} r(t) := \frac{\sum_{i=0}^{n-1} \frac{w_i y_i}{t-t_i} }{ \sum_{i=0}^{n-1} \frac{w_i}{t-t_i}} \end{align*} In ...
4
votes
2answers
245 views

Why is my simulation of a first-order wave equation not stable?

According to the equation $$ \frac{\partial y}{\partial t} = -a\frac{\partial y}{\partial x} $$ I simulated this in python. I used center differentiation, and I determined step size based on Von-...
2
votes
1answer
521 views

Von Neumann's stability analysis on non linear and coupled equations

I'd like to know if is possible to make a Von Neumann's stability analysis on an system of coupled equations, featuring quadratics: $$\begin{aligned} \frac{\partial u_1}{\partial t}&=D_1\Delta ...
3
votes
2answers
816 views

Numerical Sensitivity in Density of States of Tight-binding model

I'm working with the tight-binding model, and I'm trying to learn the basics of how to compute the Density of States (DOS) $N(E)$ numerically. The DOS is given by $$N(E) = \frac{1}{N}\sum_k \delta(...
1
vote
1answer
19 views

Implementation of a ratio with a well-defined limit

I'm implementing a function $f(x_1, x_2, \dots x_n)$ given by the ratio of two closed form equations. $$ f(x_1, x_2, \dots, x_n) = \frac{g(x_1, x_2, \dots, x_n)}{h(x_1, x_2, \dots, x_n)} $$ ...
1
vote
0answers
40 views

Stability of different quadrature rules in 1st-kind Volterra integral equation

I am dealing with a integral equation $$ f'(t) = -\int_0^t K(s) f(t-s)\quad t\in [0,t_\max] \tag{1}$$ in which $f(t)$ and $f'(t)$ are known, well-behaved functions of $t$ and $K(t)$ is the unknown. In ...
3
votes
0answers
141 views

Crank-Nicolson integrator: oscillations with complex matrix

I'm working on a Real-Time TDDFT implementation and I am currently comparing different propagation schemes for the propagation of the Kohn-Sham wave function, $$ \phi(t+\Delta t) = \hat{\mathcal{U}}\...
8
votes
2answers
319 views

Lagrange multipliers space is too rich in a mathematical view

Background: Lagrange multiplier method has been employed in numerous fields, such as contact problems, material interfaces, phase transformation, stiff constraints or sliding along interfaces. It is ...
1
vote
1answer
196 views

Method to solve linear, first order ODE of generalized matrix matrix form

The equation and its meaning: Consider two sets $(A)_{l=0,...,m_a},$,$(B)_{l=0,...,m_b}$ of hermitian matrices and a set of positive semidefinite matrices $(C)_{l=0,...,m_c}$. Each matrix has the ...
2
votes
0answers
250 views

Von Neumann analysis for coupled PDE's

I am interested in understanding how to perform stability analysis for coupled (to keep things do-able, lets say linear) PDE's In the case of a single PDE, i understand the logic behind the VN ...
4
votes
1answer
450 views

Clenshaw-type recurrence for derivative of Chebyshev series

The naive summation of a Chebyshev series \begin{align*} f(x) = \frac{c_0}{2} + \sum_{k=1}^{n-1} c_{k}T_{k}(x) \end{align*} which employs the three-term recurrence for evaluation of the Chebyshev ...
0
votes
1answer
733 views

Finite Difference Method Limitations/Stability Criteria

Is it possible to solve an equation with only a single derivative such as: $$\frac{\partial U(x,t)}{\partial t} = A - BU(x,t)$$ with finite difference methods? I ask as I am trying to solve the ...
2
votes
2answers
216 views

von Neumann stability analysis for spatial variable flux

Can we use the von Neumann stability analysis to investigate the stability of the discrete form of the following problem? $$u_t+\frac{\partial(x^2u)}{\partial x}=S(u,x)\ .$$ Please give some hint ...
6
votes
1answer
102 views

Stable computation of ratio of sums of large numbers

I have two sets of large positive numbers $a_1,\ldots,a_n$ and $b_1,\ldots,b_n$. By 'large' I mean of the order of $10^{10}$. I want to calculate the ratio $$R = \frac{a_1 - a_2 + \cdots +(-1)^{n+1}...
3
votes
1answer
153 views

Stability of PDE Discretizations with Multistep Time Discretizations

Let's pretend we have a spatially discretized PDE of the following form: \begin{align} \frac{\partial^2 \boldsymbol{u}^k}{\partial t^2} = D\boldsymbol{u}^k \end{align} where $D$ can be any form for ...
4
votes
1answer
755 views

Von Neumann stability analysis with a constant term

I have a question concerning the von Neumann stability analysis of finite difference approximations of PDEs. There seem to be a wealth of online source explaining the application of this stability ...
10
votes
2answers
596 views

How much regularization to add to make SVD stable?

I've been using Intel MKL's SVD (dgesvd through SciPy) and noticed that results are are significantly different when I change precision between ...