Questions tagged [stability]
The study of the propagation of errors in a numerical algorithm.
197
questions
1
vote
0
answers
33
views
Linear stability in gravity driven Flow numerical solution
I am trying to solve a gravity driven flow problem for thin films and I am having some difficulties solving the PDE resulting from the linear stability analysis for the steady state solution. This has ...
1
vote
0
answers
24
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
79
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
59
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 ...
3
votes
0
answers
74
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
71
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
77
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
34
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
57
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 (...
2
votes
1
answer
84
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
179
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
713
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
114
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
167
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
149
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
100
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}...
3
votes
1
answer
98
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
82
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
117
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
91
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
97
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
96
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
60
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
52
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
117
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
142
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
128
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
235
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
55
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
198
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 ...
4
votes
3
answers
297
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
101
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
49
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
99
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
...
2
votes
1
answer
188
views
How do I apply BDF2 in a STRANG splitting
I have a 3D diffusion equation that I want to solve using a time splitting (2D+1D). Assume that $A$ is the 2D discrete diffusion operator and $B$ is the 1D discrete diffusion operator.
I want to use a ...
3
votes
1
answer
384
views
How to use numerical integration to calculate the surface area of a superellipsoid?
I am working in an application in which I need to calculate the surface area of a superellipsoid. I have read that there is no closed form solution (see here), so I am trying to compute it using ...
2
votes
0
answers
60
views
How to increase the stability of a DAE solver?
I am trying to solve a set of linear PDEs of the form
$$F\left(\vec{y},\frac{\partial \vec{y}}{\partial x},\frac{\partial^2 \vec{y}}{\partial x^2},\frac{\partial \vec{y}}{\partial t}\right)=0.$$
To ...
0
votes
1
answer
139
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
0
answers
78
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
0
answers
139
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
0
answers
51
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
1
answer
54
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
0
answers
35
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
0
answers
47
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
1
answer
60
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
1
answer
112
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
1
answer
335
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
1
answer
359
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
1
answer
207
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
1
answer
707
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 ...