# Questions tagged [numerics]

The tag has no usage guidance.

64 questions
Filter by
Sorted by
Tagged with
4k views

### Which Runge-Kutta method is more accurate: Dormand-Prince or Cash-Karp?

I simply want to know whether the Dormand-Prince Numerical Method or the Cash-Karp Numerical Method is more accurate.
3k views

### What's the state-of-the-art in highly oscillatory integral computation?

What's the state-of-the-art in the approximation of highly oscillatory integrals in both one dimension and higher dimensions to arbitrary precision?
10k views

### How should boundary conditions be applied when using finite-volume method?

Following from my previous question I am trying to apply boundary conditions to this non-uniform finite volume mesh, I would like to apply a Robin type boundary condition to the l.h.s. of the domain (...
322 views

### Finite difference discretization on a circle

I am trying to discretize the differential operator $\frac{d^2}{dx^2}$ acting on $S^1 = [0,1]$ using finitely many points around a circle at $0, \frac{1}{N}, \frac{2}{N}, \dots, \frac{N-1}{N}$. Here ...
3k views

### computing turbulent energy spectrum from isotropic turbulence flow field in a box

I have my 3 dimensional velocity flow-field u, v and w at a given instant of time from DNS using pseudo-spectral method. I need to calculate the energy spectrum ( in Fourier space ) as a function of ...
1k views

### How should non-constant coefficients be treated with finite-volume first order upwind scheme?

Starting with the advection equation in conservation form. $$u_t = (a(x)u)_x$$ where $a(x)$ is a velocity which depend on space, and $u$ is a concentration of a species which is conserved. ...
2k views

### Does the finite element method impose any restrictions on the Peclet number for numerical stability?

Background on finite volume method When discretising the flux with a central difference stencil of the the advection-diffusion equation restriction $\frac{ah}{d} < 2$ must be observed for the ...
423 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 ...
479 views

### How to check the correctness of my implementation of a numerical scheme for differential equation

I know the method of constructing solutions. For example I have a BVP: $$u_{xx} + u = 0$$ subjected to: $$u_{x}(0) = f_1,$$ $$u_{x}(1) = f_2$$ If I want to check the correctness of my ...
525 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 ...
247 views

### How to avoid overflow error in program that computes product of two numbers, such that when one is big enough to cause overflow, other is $0$?

Let us say that I have a function like so: def f(x): return g(x)*h(x) Now, g(x) and ...
237 views

### Interpolating a mathematical function using a Hermite Cubic Finite Element Space

I have a Hermite Cubic Finite Element Space on a computer in the form of Matlab m-files. More specifically, I can evaluate four "shape functions" $N_1, N_2, N_3,$ and $N_4$, for which the following ...
192 views

### logsumexp with one very large term and many very small terms

I want to compute an expression of the form: $$L = \ln\sum_i e^{x_i}$$ Suppose that there are many small terms, say $e^{x_i} \approx \epsilon$. If there are $N_\epsilon$ such terms, their ...
791 views

832 views

### Numerical methods for inverting integral transforms?

I'm trying to numerically invert the following integral transform: $$F(y) = \int_{0}^{\infty} y\exp{\left[-\frac{1}{2}(y^2 + x^2)\right]} I_0\left(xy\right)f(x)\;\mathrm{d}x$$ So for a given $F(y)$ ...
327 views

### Caveats of Hessian free method

Hessian free iterative optimization techniques like Newton-CG, do not explicitly compute the Hessian but instead approximate the product of the Hessian with a vector through finite difference. The ...
187 views

What implementation details need to change if I use a cell average approach rather than a cell total approach for the finite-volume method? For example, consider the conservation law, $$u_t + \... 0answers 70 views ### Backward stable algorithm to get orthogonal projection onto the column space of a matrix I have to find the orthogonal projection of a vector b onto the matrix A of size m \times n. In my application, I don't have the luxury of calculating the QR factorization. All I have are ... 1answer 154 views ### Numerical computation of the velocity in the steady Navier-Stokes equation I've asked this question on Math.SE too. Let d\in\left\{1,\ldots,4\right\} \Lambda\subseteq\mathbb R^d be bounded, nonempty and open and \partial\Lambda be Lipschitz V:=\left\{u\in H_0^1(\... 1answer 175 views ### How can I avoid roundoff error when calculating the difference \textrm{erfc}(a) - \textrm{erfc}(b)? In this excellent answer, it is recommended that one make use of the \textrm{erfcx} function to avoid roundoff error in calculating dealing with x < 25 (approximately). So, one scales their ... 1answer 140 views ### Derivatives of Approximate Matrix inverses I am cross posting this question to the mathermatics stack exchange. please find it either at this link, https://math.stackexchange.com/q/2952989/430980, or below: I have a question concerning the ... 1answer 391 views ### Finite difference method basic implementation on Octave Trying to study the error of FDM for a second order derivative versus step size I calculated the coefficients and validated them, but the output has errors for small step sizes. The function in ... 2answers 217 views ### Determine numerical infinity for Schrodinger equation −\psi''(x) + x^ 2 \psi(x) = E\psi(x) Consider the following Schrodinger equation for the harmonic oscillator with real x:$$ −ψ''(x) + x^ 2 ψ(x) = Eψ(x). $$I solve the last equation using shooting method and implicit Runge-Kutta ... 1answer 1k views ### How can I solve wave equation for circular membrane in polar coordinates? The original equation is$$\frac{1}{c^2} \frac{\partial^2 u}{\partial t^2} = \frac{\partial^2 u}{\partial r^2} + \frac{1}{r}\frac{\partial u}{\partial r} + \frac{1}{r^2}\frac{\partial^2 u}{\partial \...
I am considering finite difference methods and their error analysis for solving HJB equation of the following form: $$v_t=|\sigma(x)v_x|,\quad x\in \mathbb{R},$$ where $\sigma$ is a given function ...