The tag has no usage guidance.

learn more… | top users | synonyms

0
votes
0answers
14 views

Relation between coefficients of Chebyshev expansion and its derivatives

I am studying spectral methods and met a problem regarding the deduction of the equation for Chebyshev differentiation matrix entries in the book. Where it states that from this recurrence relation ...
0
votes
2answers
49 views

Software for hybrid dynamical systems

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
43 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
37 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
35 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
37 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
24 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
81 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) ...
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
29 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
118 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
71 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 = ...
3
votes
2answers
179 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 ...
3
votes
3answers
134 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
141 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
181 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
208 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
40 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 ...
2
votes
1answer
149 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
97 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
266 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 - ...
7
votes
1answer
128 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
63 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 ...
0
votes
1answer
95 views

Avoid arithmetic overflow in matrix multiplication

I am solving the following matrix equation for $\mathbf{x}$: $$(J^{\mathbf{T}}J)\mathbf{x}=J^{\mathbf{T}}\mathbf{r}$$ $J$ is $m\times n$ matrix $\mathbf{x}$ is vector of size $n$ $\mathbf{r}$ is ...
0
votes
0answers
86 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
110 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
198 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)] + ...
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
33 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
296 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
31 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
418 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
124 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
167 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
346 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
280 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
2answers
171 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
218 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
103 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
267 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
163 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
236 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
428 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
156 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. ...
8
votes
3answers
321 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
87 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 ...