The tag has no usage guidance.

learn more… | top users | synonyms

-1
votes
2answers
70 views

Stability of matrix equations in MATLAB

Is there a method to check for unconditional stability or positive-definiteness of large matrices in MATLAB? For example, I know that matrices with property M (positive main diagonal elements and ...
5
votes
0answers
84 views

Using entropy functions for increasing numerical stability

Regarding the numerical stabilization of two-dimensional advection equation, \begin{equation} \dfrac{\partial f}{\partial t} + \Big(\dfrac{d\varepsilon_1(k)}{dk}\Big)\dfrac{\partial f}{\partial z} - \...
0
votes
2answers
67 views

Integrating a dynamical system until an algebraic condition is satisfied

I have a model given by a system of differential equations $$ \frac{dy}{dt}=f(y)$$ with $y=(y_1,y_2,y_3)$ and $f:\mathbb{R}^3 \to \mathbb{R}^3$. The system works as follows : integrate the ode's ...
0
votes
2answers
45 views

How to choose a good distribution for visualizing phase changes in the nature of the roots of a quadratic equation

I'm not sure if this SE site is the best one for this question, so let me know where it should be moved to if you think it doesn't belong here. After learning about the quadratic formula, I'm ...
0
votes
1answer
53 views

Armadillo Multi-threaded Linear Solve Yielding Different Answers

I'm working on some problems that ultimately boil down into a simple assembly of an overdetermined system of equations, $Ax=b$, where $A$ is $m \times n$ for $m \gg n$. I'm leveraging Armadillo's C++ ...
0
votes
1answer
23 views

Single Precision a x plus y (SAXPY) terminology

I've been reading books which refers to vector update operations of the form: y := y + ax, where y and x are vector variables and a is a scalar as SAXPY. I understand ax plus y part, but why "single ...
0
votes
1answer
41 views

Why the greatest exponent that can be represented in single-precision floating-pointer numbers is 127 (and not 128)?

I was told by a class mate that the smallest exponent that we can represent by a single-precision floating-point number (which uses 8 bits for the exponent) is $-126$ and the greatest is $127$. I ...
0
votes
0answers
16 views

t digits are used to represent the mantissa in floating-point system, but rounding unit is calculated for doubles with 53 bits

I'm reading the book "A First Course in Numerical Methods" by U. Ascher and C. Greif, and in the 2nd chapter it's written that ... we associate $x$ a floating point representation $fl(x)$ of the ...
1
vote
1answer
39 views

Conjugate Gradient, initial direction set to initial residual

In the (iterative) Conjugate Gradient (CG) algorithm: https://en.wikipedia.org/wiki/Conjugate_gradient_method The initial search direction $p_{0}$ is set to the initial residual $r_{0}$. But I can't ...
1
vote
0answers
27 views

Stability in Discretization of 1D Stationary Boltzmann equation

I want to discretize and numerically solve the following PDE: \begin{equation} v(k)\dfrac{\partial f}{\partial x} + E(x)\dfrac{\partial f}{\partial k} = S\{f\} \end{equation} using finite volume (box ...
3
votes
1answer
87 views

Stability in discretization of a PDE

Suppose I want to numerically solve for $f(x,k)$ the one-dimensional Boltzmann equation for electrons in steady-state condition, given as: \begin{equation} \left( \dfrac{\hbar k}{m} \right) \dfrac{\...
3
votes
0answers
91 views

Symplectic integration of PDE

I consider ordinary wave equation $$ u_{tt} - u_{xx} = 0 $$ with initial conditions $$u(x, 0) = \exp (-2 x^2) \\ u_t(x, 0) = 0 $$ To solve this problem I approximate $u_{xx}$ with 4-th order ...
0
votes
0answers
31 views

Find eigenvalues and eigenvectors using lanczos method [duplicate]

Can anyone help me out for finding eigenvalues and eigen vectors using Lanczos method?
4
votes
2answers
122 views

Known issues with eigenvalue numerics?

Are there any known issues (such as precision issues) with $\mathsf{MATLAB}$ eig and charpoly functions for large enough $\{-1,0,+1\}$ matrices? Even if I change $1$ or $2$ entries between matrices ...
4
votes
0answers
73 views

Can I make this numerical integration continuously differentiable?

Suppose I have the discrete values $f(x_i)$ for every discrete value $x_i$ greater than some $\varepsilon$, and I want to numerically calculate the following integral: \begin{equation} n = \int_\...
3
votes
2answers
184 views

Does artifical dissipation term makes scheme inconsistent?

Central schemes like JST uses artificial dissipation for the stabilization. This modification is an artificial one. Does this additional term makes system inconsistent? Can we expect this term to be ...
4
votes
3answers
149 views

Numerical integration using RKF7(8) - different results

For my thesis, I look in trajectories of vehicles through an atmosphere at very high velocities. I have a set of equations of motion, which I propagate using a Runge-Kutta-Fehlberg (RKF) 7(8) ...
3
votes
2answers
181 views

Integral in log-log space

I'm working with functions which, in general, are much smoother and better behaved in log-log space --- so that's where I perform interpolation/extrapolation, etc, and that works very well. Is there ...
1
vote
3answers
224 views

Unexpected results of MATLAB's ode45

Whilst working with MATLAB recently I encountered something odd that I cannot explain. I was using the ode45 solver to solve a system of two coupled second order ODEs. I wasn't convinced about the ...
4
votes
2answers
210 views

Accuracy of numerical methods in finding eigenvalues

I have a problem with assesing the accuracy of my numerical calculation. I have a 2nd order ODE. It is an eigenvalue problem of the form: $$ y'' + ay' + \lambda^2y = 0, $$ and the boundary condiations ...
1
vote
0answers
42 views

A better way to compute a double integral involving a infinite series?

Let $D_{\nu}(.)$ is the parabolic cylinder function (http://mathworld.wolfram.com/ParabolicCylinderFunction.html) And $\Gamma(.)$ is the Gamma function. Define $s_y(\mu,\nu,t,z)=2^{\nu}\...
2
votes
1answer
151 views

How to calculate $det(X^TX)$ efficiently, update one column of X each time

$X_{1} = (A, b)$, where $X_{1}$ is a $n\times p$ matrix, $A$ is a $n\times (p-1)$ and $b$ is $n\times1$. update $b$ with $c$,Is there any update method to compute more efficiently?
1
vote
1answer
105 views

Improper Numerical integral

I am self teaching myself python and computational physics via Mark Newmans book Computational Physics the exercise is 5.17 of Computational Physics. I have to shift the limits of integration for an ...
3
votes
1answer
321 views

A Question About the Rhie-Chow Interpolation Used for Solving the Incompressible Navier-Stokes Equations on Unstructured Grids

When using the SIMPLE method on a mesh with a collocated variable arrangement, the following interpolation is used for the advecting velocities: \begin{equation} u_f = \overline{u}_f - \overline{D}_f\...
7
votes
1answer
129 views

Compute eigenvectors of a matrix with known eigenvalue spectrum

If I have already accurately known the eigenvalue spectrum (i.e. all eigenvalues) of a matrix, is there any efficient numerical algorithm to compute all the eigenvectors corresponding to these ...
1
vote
1answer
65 views

Accurate way for computing a ratio coming from Monte Carlo simulation

I am seeking recommendations on how to compute the Binder ratio numerically accurate when doing Monte Carlo simulation on spin models. Binder ratio is defined as: $$ B = \frac{\langle M^4\rangle}{\...
0
votes
0answers
91 views

Super time stepping and Crank Nicholson Method

I was wondering whether it is possible to combine the two to produce a very efficient code? Thanks,
2
votes
1answer
119 views

Derivation of Adams-Bashforth coefficients

From the order condition $$\sigma(w)=\frac{\rho(w)}{\ln w}+O(|w-1|^p)$$ I get $$\sigma(w)=1+\frac{3}{2}(w-1)+\frac{5}{12}(w-1)^2=-\frac{1}{12}+\frac{2}{3}w+\frac{5}{12}w^2$$ Those coefficients are ...
0
votes
1answer
97 views

Computing multiple numerical derivatives at once

Lets say I have a function $f(X) = f(x_1,...,x_N)$ to be integrated. But unlike time discrete methods, my integrator uses quantisation to advance time, that is if $|x - q| > dQ$, with $q$ being the ...
4
votes
1answer
217 views

Inverse advection-diffusion problem, solving for a drift coefficient with experimental data?

I am investigating a physical process where I believe the 1-D advection-diffusion equation: \begin{equation} \frac{\partial u}{\partial t} = -\frac{\partial}{\partial x}[\mu(x,t) u(x,t)] + \frac{\...
3
votes
0answers
1k views

Numerical integration and filtering of acceleration experimental data

I have a vector containing acceleration measurements and the corresponding vector of times in which measurements are taken. To obtain velocity and displacement I used the cumtrapz() function already ...
0
votes
1answer
34 views

Implicitly defined univariate function

So my fellow numerical computational peeps it may be that I am suffering from sleep deprivation but I'm struggling to numerically compute a function $u \rightarrow h(u)$ defined implicitly as follows: ...
6
votes
2answers
314 views

Evaluating 6D Gaussian Integral in Matlab

I have to compute the accuracy of a new Gaussian mixture fitting algorithm. One of the tests include computing the probabilities in certain intervals in a 6D hyperspace. Also, the integral of the ...
1
vote
1answer
32 views

replace non-smooth discrete values with analytical function

I do have a Diffusion coefficient in a convection diffusion PDE which is discontinuous and looks like (concentration on the x-Axis): For numerical reasons i use the integrated form: I calculate ...
0
votes
3answers
487 views

Looking for ways to speed up the numeric evaluation of a symbolic expression in Matlab

{Summary: I have a symbolic expression DCritnF expressed in terms of two variables x1 and x2. I need to find it's numeric value and I used combination of double and subs as given below. ...
5
votes
1answer
126 views

Scheme to alleviate (numerical?) instability in system of coupled nonlinear ODEs

I'm solving a system of nonlinear ODEs that take the form $Q_{nm} \ddot{y}_m + S_{nkl}\dot{y}_k\dot{y}_l +V_n = 0$ where Einstein summation is assumed, $y_i$ are the dependent (complex) variables, ...
1
vote
1answer
180 views

RATTLE numerical integrator example

I want to understand how the RATTLE algorithm works. Can somebody give me an example (in pseudocode or using any programming language like python or matlab) of how would I implement a numerical ...
3
votes
1answer
370 views

C# implementation of the gamma function that produces correct answers at positive integer inputs?

I need a C# implementation of the gamma function that produces correct exact answers at positive integer inputs. I took a look at MathNet.Numerics Meta.Numerics. In both cases, if you calculate ...
9
votes
3answers
1k views

Finite Element Method vs Extended Finite Element Method (FEM vs XFEM)

What are main differences between FEM and XFEM? When should we (not) use XFEM intead of FEM and vice versa? In other words, when I meet a new problem, how I can know to use which one of them?
-1
votes
1answer
298 views

Pde problem with robin boundary condition

I have my pde 2D problem with robin condition (form: du/dn +ku=g) to solve with matlab. i have the exact function u and I want to find the function g in robin condition. How can i do it? thanks for ...
5
votes
1answer
195 views

Second derivative of the Associated Legendre functions

I would like to compute, as part of the solution of the Laplace equation using the Fast Multipole Method, the second derivative of the associated legendre functions of the first kind . Specifically, I ...
10
votes
2answers
227 views

Numerical method for equation solving that works on stochastically computed functions

There are many well known numerical methods for solving equations of the type $$ f(x) = 0, \quad x \in \mathbb{R}^n,$$ e.g. bisection method, Newton's method, etc. In my application $f(x)$ is ...
4
votes
0answers
109 views

Why do I get “estimated error” -1.#IND when doing BICGSTAB linear solver using ILUT perconditioner in eigen

I'm using Eigen (a C++ library for numerical linear algebra) to solve a linear equation with the the bi-conjugate gradient BICGSTAB algorithm with Incomplete LU preconditioner. However, the result <...
4
votes
1answer
277 views

Solving Coupled ODE eigenvalue problem

I've been trying to find some resources that would help me figure out how to numerically solve a coupled system of ODEs which is also an eigenvalue problem. The system is something like: $ \tag{1} ...
3
votes
1answer
170 views

Closed form for singular values of 2D Laplacian?

Does anyone know where to find an analytic form for the singular values of the finite-difference approximation to the 2D Laplacian, expressed in matrix form for a square grid? This would be for the ...
8
votes
2answers
239 views

Astoundingly large difference when evaulating trigonometric identity with NumPy

According to Wolfram Alpha and the Sage computer algebra system, the following identity holds: $$ \cos\left(\arctan\left(\frac{l_1-l_2}{d}\right)\right) = \frac{1}{\sqrt{1 + \frac{(l_1-l_2)^2}{d^2}}} $...
9
votes
4answers
455 views

Relevance of fixed-point and arbitrary precision computations

I see very few non-floating point computing libraries/packages around. Given the various inaccuracies of floating point representation, the question arises why there aren't at least some fields where ...
5
votes
2answers
158 views

Imposing invertibility on a Matrix

I have a symmetric positive semidefinite covariance matrix $A$, which is approximately computed as the output of a quadratic regression. I then need to invert $A$, but often it is close to singular. I'...
8
votes
3answers
339 views

Regression testing of chaotic numerical models

When we have a numerical model that represents a real physical system, and that exhibits chaos (e.g. fluid dynamics models, climate models), how can we know that the model is performing as it should? ...
4
votes
1answer
89 views

Bounded Variation Spaces

Could someone explain me (roughly) the interest of Bounded Variation (BV) Spaces for PDEs ? Is there any numerical application of those space to real problems or is it just a theoretic way to ...