Questions tagged [stability]
The study of the propagation of errors in a numerical algorithm.
213
questions
6
votes
1
answer
967
views
Why is matrix inversion unstable when svd is stable?
I've heard that matrix is inversion is unstable whereas the SVD is stable.
Now, if $A$ is an invertible matrix, then its SVD is
$$
A = USV^T
$$
Then wouldn't it's inverse just be
$$
A^{-1} = (USV^T)^{...
1
vote
0
answers
84
views
Stability for the 2d diffusion equation
I'm reading this set of notes on numerical stability of the diffusion equation. I can't seem to derive equation (7.17) from the previous equation. I've tried using $\sin^2(\theta)=\frac{1-\cos(2\theta)...
1
vote
1
answer
76
views
Conditioning and Stability of generalized eigenvalue problem
The (generalized) eigenvalue problems with a multiple eigenvalue are the ill-posed ones.
I have two questions that should be simple for experts:
(1) Is the eigenvalue problem much more sensitive to ...
2
votes
0
answers
63
views
Literature request for pinning the corner singularities in finite differences
Corner singularities cause instability of finite difference solutions. They occur at the intersection of boundary conditions. I was recently going through an online video course that was explaining ...
0
votes
1
answer
89
views
computing Lyapunov exponents numerically
I am trying to compute numerically the Lyapunov exponents of an ODE. I follow the method described in Parker, Chua "Practical Numerical Algorithms for Chaotic systems"
There is also relevant ...
1
vote
1
answer
88
views
Improved euler on hybrid methods where both time and space are discretized?
I am trying to understand how to use the improved euler method on MPM simulations.
In the kind of MPM simulation I am doing with forward euler the order of operations is as follows:
Write particle ...
1
vote
0
answers
77
views
Why do we use modified pressure in incompressible multiphase solvers with gravity?
The context of my question is two-phase incompressible solvers such as interFoam in OpenFOAM, but I have seen this trick used ...
0
votes
1
answer
45
views
RFEM: Tensile force in member in buckling analysis
Here is a simple T-shaped structure in RFEM. The structure is loaded from above, into the intersection of all members.
I performed a buckling analysis, and obtained the buckling modes that I'm ...
2
votes
1
answer
94
views
Ways to fix block Lanczos tridiagonalisation numerical instability for matrix with degenerate, closely spaced eigenvalues?
I want to run a block Lanczos block-tridiagonalization on a hermitian, sparse matrix (of relatively small size $\sim 10^2 \times 10^2$). However the matrix typically has many eigenvalues that are ...
1
vote
2
answers
92
views
Numerical code to solve LLG is not preserving norm
I am new to this thread. I am trying to do a simple exercise on solving the LLG equation. The equation reads:
$\frac{d\vec{m}}{dt} = -\gamma(\vec{m} \times\vec{H})$.
Given a normalized input state ($...
0
votes
0
answers
105
views
2D wave equation is numerically unstable using Finite Difference Method
I'm working with simulating both the heat and wave equation in 2D in a Python code. When simulating the heat equation, I learned about the CFL which I used to get a numerical stable solution.
I found ...
0
votes
0
answers
108
views
Solving compressible euler equations in non-conservative form
I am trying to solve the following compressible 1D system of equations in two non-conservative form PDEs for $\rho, Y$ and one ODE for $v$
\begin{align}
\rho_t+(v+Q)\rho_x &= -\rho q(Y,T,\rho)-...
0
votes
0
answers
42
views
Instability due to different lumping dimensions in second-order linear system
I have a problem that consists of a linear hyperbolic differential equation with some boundary and initial conditions which leads after discretization in space using finite elements to the following ...
0
votes
2
answers
134
views
Practical implementation of the discrete compatibility condtion
I've recently started looking into writing a finite-differences-based solver for the Poisson equation of the form
$$\nabla\left(\varepsilon\nabla\varphi\right)=\rho$$ in 2D for arbitrary geometries (...
2
votes
1
answer
418
views
Python bifurcation diagram of seasonally forced epidemiological models
TL:DR
How can one implement a bifurcation diagram of a seasonally forced epidemiological model such as SEIR (susceptible, exposed, infected, recovered) in Python? I already know how to implement the ...
2
votes
0
answers
107
views
Numerical precision on tricky coupled nonlinear boundary value problem on infinite interval
I am trying to solve with high precision the following coupled system $(f,h)$ on $[0,\infty]$:
$$-h''-\frac{1}{r}h'+\lambda_c h(f^2-1)+4\lambda_h h^3=0$$
$$-f''-\frac{1}{r}f'+\frac{1}{r^2}f+ f(-\...
1
vote
1
answer
126
views
Boundary value problem solver fails on trivial case
I am trying to solve a boundary value problem on $[0, \infty]$, using scipy's scipy.integrate.solve_bvp and I am seeing that the solutions are not converging even ...
1
vote
0
answers
30
views
How to classify ODE equilibria that are stable but slowly changing in value with time?
I'm numerically solving a system of coupled ODEs where time is the independent variable. At each time, I can solve for the equilibrium values of my state variables where their respective derivatives ...
2
votes
3
answers
139
views
Should reaction be taken into account in the CFL condition when solving advection-diffusion-reaction equations numerically?
I'm dealing with the numerical resolution of advection-diffusion-reaction equations.
I've encountered references on CFL conditions for conservation laws as well as advection-diffusion equations.
I'm ...
1
vote
1
answer
68
views
stability of a numercial scheme for a hyperbolic system?
This is related to my question here https://math.stackexchange.com/questions/4447383/lax-wendroff-scheme-stability-analysis-for-a-linear-system-of-conservation-laws .
Consider the numerical scheme ...
4
votes
0
answers
81
views
Numerical algorithms made stable by unums which are unstable on IEEE floats
For unums, there is good evidence (see figure 5) that accuracy is better than IEEE floats. (Note: I use the term "unum" broadly to refer to any of the various iterations and revisions to the ...
0
votes
0
answers
88
views
How to estimate stability and stiffness of a system of coupled ODEs?
I'm running into issues with Python/Julia ODE solvers requiring prohibitively small timesteps to evolve a system of 4 coupled ODEs (the order of magnitude of the state variables and time unit span ~40-...
2
votes
0
answers
195
views
Numerical instability in the inverse Laplace transform
I have a problem with Laplace inversion and my function is not numerically stable for the Laplace inverse, but I do not understand the cause of this problem.
Here is my code and graph of this problem. ...
1
vote
0
answers
42
views
Generate numerically stable equation automatically
I remember there is a software (and its website interface) that can generate numerically stable equation from an expression automatically.
To see the problem it tries to solve, let’s take a look at a ...
2
votes
0
answers
59
views
robust numerical calculation with large (almost) offsetting terms
I am attempting to evaluate an expression that defines a probability of a particular event. With 3 different events, I can (under some statistical assumptions) characterize the probability of event 1 (...
3
votes
1
answer
169
views
Stepping over a rapid oscillation in advection
As a model of a more complex problem, I am studying a linear advection equation with a rapidly oscillating velocity
$$
\partial_t u + a \cos(\omega t) \partial_x u = 0
$$
with initial condition $u(x,0)...
3
votes
1
answer
321
views
How to interpret if $\displaystyle \sum_{j = 0}^{n} \frac {1}{j!}$ is a stable algorithm for computing $e$?
I am trying to solve problem $15.1$ from Numerical Linear Algebra by Trefethen and Bau, which reads
Determine whether the algorithm is backward stable, stable but not backward stable, or unstable.
...
2
votes
1
answer
807
views
Why is subtraction a stable operation?
In Numerical Linear Algebra by Trefethen & Bau, it is claimed that subtraction is backward stable. Here is the proof:
Let $f(x, y) = x-y$ and let $\tilde f(x,y)$ be the answer you get when doing $...
2
votes
0
answers
129
views
Floquet theory for periodic delay differential equations: current numerical routines
I would like to determine the stability of a system of periodic delay differential equations (a seasonal host-parasite model). I've tried to implement the method described in Lemma 2.5 in this paper:
...
4
votes
1
answer
366
views
Computing second derivatives with Neumann boundary condition
I am implementing a finite difference method for a PDE with a Neumann boundary condition. I will simplify my question to a single dimension.
Suppose I have a PDE
$$\frac{\partial u}{\partial t} = \...
2
votes
0
answers
383
views
2d advection-diffusion: cell Péclet number and numerical stability
I am studying the numerical resolution of 2d advection-diffusion problems with finite element methods.
$$\frac{\partial u}{\partial t} + \beta\cdot\nabla u = \nabla\cdot(\nabla u) \, .$$
It is said in ...
2
votes
0
answers
114
views
About the the stability of using an explicit scheme on the heat equation
Before I get to the heat equation I'd like to talk about the advection equation.
Descritize that with FD in time and BD in space:
\begin{equation}
\dfrac{u^{n+1}_i - u^{n}_i}{\Delta t} + v \dfrac{u^{n}...
4
votes
1
answer
130
views
Stability analysis simplification for PDE
I have the nonlinear PDE
$$\frac{\partial U(z,t)}{\partial t} + A(U)\frac{\partial U(z,t)}{\partial z} + B(U)U(z,t) + C(z,t) = 0,$$
where $A(U)$ and $B(U)$ are guaranteed to be real and positive.
I ...
0
votes
0
answers
91
views
Transient advection equation with stabilized FEM
I am interested in solving the transient advection equation
$\left\{\begin{array}{ll}\partial_{t} u+\beta \cdot \nabla u=f & \text { in } \Omega, t>0 \\ u=0 & \text { on } \partial \Omega^{-...
1
vote
2
answers
192
views
Stability condition FCTS method
The FTCS method comes from the discretization of a diffusion PDE like this:
$$
a^{2} \frac{u_{i+1}^{k}-2 u_{i}^{k}+u_{i-1}^{k}}{\Delta x^{2}}=\frac{u_{i}^{k+1}-u_{i}^{k}}{\Delta t}
$$
If I have the ...
0
votes
1
answer
112
views
Free Electron Schrödinger Equation (Energy Method)
For the simplest atom, its wave function is described by the PDE of Schrodinger equation:
$$
-i h \frac{\partial u}{\partial t }=\frac{h^{2}}{2m} \Delta u + \frac{e^{2}}{r}u$$
The potential $\frac{e^{...
0
votes
2
answers
125
views
Stability of the Forward-Time Central Space method, section 9.3 in LeVeque
I am reading section 9.3 in Leveque about stability. The explanations are very short and brief so I am asking for some help to understand and elaborations. The result of the section is that for FTCS ...
2
votes
1
answer
100
views
Positive feedback instability
I have two black boxes (representing some multi-physics but that does not matter), where box #1 takes some quantity T as input and produces some quantity P as output; and box #2 takes P as input and ...
1
vote
0
answers
94
views
Comparison between stability and accuracy of various Finite Difference schemes
I`m Analyzing the 1D convection equation (PDE) for stability, consistency, and accuracy.
I know Both upwind schemes (explicit and implicit) show better stability with a higher number of waves for ...
1
vote
0
answers
57
views
Stability plot of upward difference implicit time
I am analyzing the stability of 1D convection (advection) equation as shown in the picture. When I derive the equations as shown I want to get rid of the complex number.
I`m asking if those stability ...
2
votes
1
answer
132
views
Accuracy gap for apparently stable solution
I was reasoning about the behaviour of the methods I'm using for my simulation and I noticed that, considering $h_s$ as the timestep over which I have unstable solutions and $h_a$ as the timestep ...
5
votes
2
answers
164
views
Exponent log to compute reciprocal power?
A MATLAB library seems to overcomplicate a computation:
exp( (log(a) - log(b))/b )
which is mathematically equivalent (assuming real & positive ...
0
votes
1
answer
188
views
Technique to find the CFL condition using the Galerkin method in space and finite-difference in time?
I am using the Galerkin method (Discontinuous to be precise) to discretize in space the scalar linear wave equation and the explicit second order centered finite difference scheme to discretize in ...
3
votes
2
answers
341
views
Using the BDF and RK4 methods to solve this coupled system of ODEs in C++
I'm trying to solve a system of ODEs using the BDF order 4 method. I find the first 3 points using RK4, then for the implicit part of the BDF, I use Newton-Raphson iteration. Unfortunately my solution ...
1
vote
1
answer
74
views
Numerical stability of taking the `mean` of outputs from the simulation of a discrete stochastic dynamical system
I am writing a simulation for a discrete stochastic dynamical system. Since the simulation is stochastic, I need to run the simulation multiple times and then average the values of each timestep. I ...
3
votes
1
answer
337
views
How to include negative number in the log-sum-exp?
I want to know summation of some small numbers, such as {e^-1000, -e^1001, e^1002...}
If all numbers are positive, I can use log-sum-exp algorithm. But unfortunately, negative numbers are also ...
5
votes
3
answers
424
views
Advantage of diagonal "jitter" for numerical stability?
In a machine learning code, that computes optimum parameters $\theta _{MLE}$ of a linear regression model, by maximum likelihood estimation:
$$ \boldsymbol \theta^\text{ML} = (\boldsymbol\Phi^T\...
1
vote
1
answer
156
views
Finite Difference for Advection Equation With Source
I'm trying to find a convergent finite difference scheme for the PDE
\begin{equation}
\begin{split}
u_t + (x-1) u_x &= (x-1)u, \hspace{.5cm} x \in [0,1] \\
u(x,0) &= 1 \\
u(1,t) &= 1. \\
\...
2
votes
0
answers
53
views
In sights into why higher order finite differencing method leads faster to instability
I was playing around with numerically solving the 1D wave equation with density and stiffness varying with position using central differencing methods and noticed that for certain discretization steps ...
0
votes
0
answers
171
views
discretizing advection equation with variable wave speed + stability
I currently have a code that solves $u_t+ cu_x=0$ with periodic boundary conditions, and constant $c$ (using an upwind method). I'm wondering how I would alter this code to solve something of the form
...