Questions tagged [numerics]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
5
votes
1answer
147 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
0answers
41 views

Error analysis and the Model Problem [closed]

In numerical methods for ODE's, the model problem y' = cy where c is complex is regarded as sufficient in performing error analysis for different methods in ...
2
votes
1answer
304 views

LSA, SVD and the Frobenius norm

In Latent Semantic Analysis one uses the SVD to perform a dimensional reduction of the term-document matrix, via the Eckart-Young theorem. Now, the rank $k$ approximation obtained by E-Y is proven to ...
1
vote
1answer
130 views

Lanczos algorithm with thick restart on a dynamic matrix

According to a recommendation, this is a re-post of that. currently, I'm working on a way to compute the 2 biggest eigenvalues of a real, symmetric, huge and sparse matrix that changes a few entries ...
4
votes
1answer
173 views

Numerical spherical integration

In a high-dimensional setting, say $d \gg 5$, what is a recommended way of evaluating a spherical integral of a smooth (non-symmetric) function $f(\mathbf{x})$? $ \int_\mathcal{S_r} f(\mathbf{x}) \...
1
vote
1answer
422 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 ...
8
votes
1answer
145 views

Radial integration of expensive function with Bessel weights

I need to calculate the integral $$I = \int_0^R f(r)J_n\left(\frac{z_{nm}r}{R}\right)rdr$$ where $J_n$ is the $n^{\mathrm{th}}$ order Bessel functions of the first kind, $z_{nm}$ is its $m^{\mathrm{...
3
votes
1answer
661 views

Von Neumann stability analysis in 3d

I need to get a stability criterion for the numerical scheme for equation $$\frac{\partial u}{\partial t}-\frac{\partial^2 u}{\partial x^2}-\frac{\partial^2 u}{\partial y^2}-\frac{\partial^2 u}{\...
3
votes
1answer
412 views

Condition number of an algorithm

I am stuck with a problem about finding the condition number of an algorithm. I tried to find an example, but i couldn't. Can anybody help me, please? Given is $f(x)=\ln(x)$. We have the algorithm $...
3
votes
1answer
955 views

Courant Friedrichs Lewy condition - how to get it?

I am interested, how can we get CFL condition for every type of PDE? It's known that for 1st order linear equation $$\frac{\partial u}{\partial t}+a\frac{\partial u}{\partial x}=0 $$ CFL is get from ...
0
votes
0answers
130 views

Algorithms to compute largest gap between smallest nonzero eigenvalues of sparse symmetric matrix

I am looking mainly for c/c++ implementations but also for theoretical algorithms to compute gaps between smallest positive eigenvalues of symmetric, singular matrix or real numbers. To be precise, I ...
1
vote
0answers
258 views

Numerical integral with a weakly singular kernel with a satisfactory precision

I am working on a numerical method for time fractional PDE. One problem is that I must compute a numerical integral of the following form: $$ \begin{equation} \int_0^{t_m} (t_m-s)^{-\beta}f(s)ds \end{...
3
votes
2answers
730 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 ...
2
votes
1answer
440 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 ...
4
votes
2answers
188 views

Solving system of differential equations with interconnected boundary conditions

I am trying to solve the following system of differential equations numerically over the domain $x=0$ to $x=D$. The main difficulty is that the boundary conditions are interconnected and depend on the ...
5
votes
1answer
976 views

Numerical gradient in spherical coordinates

Assume that we have a function $u$ defined in a ball in a discrete way: we know only the values of $u$ in the nodes $(i,j,k)$ of spherical grid, where $i$ is a radius coordinate, $j$ is a coordinate ...
1
vote
1answer
592 views

“boundary” vs “interface”?

I am working with biofilm and there are many documents talking about boudary conditions while others talks about interface or both of boundary and interface. So, boundary and interface are the same (...
2
votes
1answer
152 views

Extended finite element method vs $P_k$-bubble element

Can you show me the main differences between 2 methods? I find out 2 reasons but I don't know they are right or not. XFEM is constructed base on enrichment functions whereas P1-bubble is constructed ...
9
votes
3answers
2k 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?
3
votes
1answer
313 views

Methods for solving BVP for DAE

I look for a numerical method to solve boundary value problems for systems of differential and algebraic equations of the form F(x,y,y') = 0, G(x,y) = 0, y(a) = ya, y(b) = yb, where y = (y1, y2, ... ...
7
votes
2answers
167 views

For a non-linear PDEs should the source term be discretised at $u_j$ or averaged over $(u_{j+1} + u_{j-1})/2$?

The non-linear Poisson equation in one-dimension, $$ 0 = \frac{\partial^2u}{\partial x^2} - f(u) $$ can be discretised as to give, $$ u_{j-1} -2u_{j} + u_{j+1} = h^2 f(u_j) $$ where $h$ is the ...
2
votes
1answer
93 views

Implicit Finite difference scheme for a PDE with only one boundary

I am looking at a few reaction-diffusion equations of the form $\frac{dP}{dt} = D\left(\frac{d^2P}{dr^2} + \frac{2}{r}\frac{dP}{dr}\right) - a(P)$ I know the initial conditions and the boundary ...
4
votes
2answers
197 views

Is there a method to examine numerical diffusion for non-linear PDE?

I have a nasty non-linear partial differential equation. I wonder if there exists a method that would allow me to examine what numerical errors (like numerical diffusion or dispersion) are introduced ...
3
votes
2answers
1k views

How to plot orbit of binary star and calculate its orbital elements?

I have a set of dates, position angles ($\theta$) and angular separations ($\rho$) for visual binary star. For example: ...
12
votes
2answers
206 views

numerical integration in many variables

Let $\vec{x} = (x_1, x_2, \dots, x_n) \in [0,1]^n$ and $f(\vec{x}): [0,1]^n \to \mathbb{C}$ be a function in these variables. Is there a recursive scheme for this iterated integral? $$\int_{[0,1]^n}...
4
votes
0answers
82 views

Computing linear combinations of sines and cosines (phasors)

I have a finite series that looks like this: $f(t) = \sum^n_{i=0} A_i cos(\Theta_i + \omega_i t) + B_i sin(\Theta_i + \omega_i t)$ That is, a finite series of pairs of phasors. What's the state of ...
15
votes
3answers
6k views

Efficient computation of the matrix square root inverse

A common problem in statistics is computing the square root inverse of a symmetric positive definite matrix. What would be the most efficient way of computing this? I came across some literature (...
0
votes
0answers
678 views

how to visualize velocity from Lagrangian particle tracking method

I have few particle's position and velocity information as a function of time. Particle is following a trajectory path, while doing so, one particle may disappear, other particle may appear. Particle ...
-1
votes
1answer
553 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 ...
8
votes
1answer
607 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 ...
3
votes
1answer
1k views

Finite difference method (diffusion equation) for 3D spherical case

There is one 3D-diffusion IBVP for sphere (Dirichlet problem with zero conditions on the surface of sphere). The equation has the following view: $$\frac{\partial u}{\partial t}=\operatorname{div}\...
5
votes
2answers
371 views

Finite element discretization of Reaction-diffusion problem with Dirac source term

I'm writing a code using continuous piecewise linear finite elements on triangular grids to solve the diffusion-reaction problem. the source function f is a Dirac mass at the center. How can i compute ...
3
votes
1answer
201 views

Can one use incompressible flow approximation for fluid flow in heated pipes?

I was wondering if the use of incompressible flow approximation for fluid flow in heated pipes is reasonable. A previous question (Definition of incompressible flow) seemed to focus on Natural ...
11
votes
1answer
882 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)$ ...
1
vote
1answer
5k views

Numerically determining convergence order of Euler's method

I need to numerically determine the convergence order of Euler's method for various step-sizes. I am unsure how to go about doing this. Here is the question: Problem statement: $\frac{dy}{dt}=\alpha ...
3
votes
1answer
357 views

Linear Algebra / Numerical Solution Of Matrix With Nullspace

I have a question relating to linear algebra. We have a fluid solver that solves the poisson equation for pressures. When there are areas of the domain that are entirely enclosed by Neumann ...
2
votes
2answers
284 views

Research in Inverse Problem and Numerical PDE

I am taking a Thesis-based Master degree now and I am going to choose my supervisor soon. I plan to take a PHD degree after graduation, so if possible, I wish my PHD research area could be an ...
7
votes
2answers
162 views

How do you numerically solve a multivariable ODE system with different time steps per state variable?

If you have a large multivariable ODE system, and certain processes occur at a much smaller time scale, how can you implement a solver that uses smaller time steps for state variables involved in fast ...
1
vote
0answers
85 views

Prove $T_n(x)$ of Chebyshev Polynomial given the recurrence relation [closed]

Using the recursion formula for Chebyshev polynomials, show that $T_n(x)$ can be written as $$T_n(x)=2^{n-1}(x-x_1)(x-x_2)...(x-x_n)$$ where $x_i$ are the $n$ roots of $T_n$ The recurrence relation:...
1
vote
1answer
81 views

Transfrom a Legendre polynomial from $\int_{-1}^{1}\phi_j(x)\phi_k(x)dx $ into $\int_{a}^{b}\phi_j(t)\phi_k(t)dt$ given $t=\dfrac{1}{2}[(b-a)x+(a+b)]$

The Legendre polynomials satisfy $$\int_{-1}^{1}\phi_j(x)\phi_k(x)dx = \begin{cases} 0 &j\neq k\\\\ \dfrac{2}{2j+1} &j=k \end{cases}$$ Suppose that the best fit problem is given on the ...
3
votes
0answers
198 views

Choosing good basis functions to approximate a Lipschitz function

Let $D = \left\{0, t_1, t_2, \ldots, t_n\right\} \times [0,1]$ and $$ f: D\to [0,1], $$ be a function of time and a one-dimensional space. There is no analytical formula for $f$, but $f(t_i, \cdot)$ ...
1
vote
1answer
3k views

Newton's method in interpolation

I've seen that in Newton's method for interpolating polynomials, the coefficients can be found algorithmically using (in Python-ish): ...
1
vote
3answers
1k views

Capacitance in freefem++

I would like to simulate a capacitor in 2d with freefem++. This is the code I used: ...
4
votes
1answer
159 views

What is the origin of the preasymptotic convergence behaviour in FEM?

When you have fine-scale features (e.g. boundary layers) in the solution, its FEM approximation on coarse meshes converge at strange apparent rates. Looking at Cea's lemma, is this behaviour because ...
2
votes
2answers
243 views

How can i solve this first order system of differential equations

Edit: I am trying to solve $$\frac{\partial u}{\partial t}+u\frac{\partial u}{\partial x}=\nu\frac{\partial^{2}u}{\partial x^{2}}\\ u(0,t)=0\nonumber \\ u(1,t)=0\nonumber \\ u(x,0)=\sin(\pi x)\\ 0<...
3
votes
1answer
116 views

Efficient computation of tangent of fraction of angle

I want to compute $a = \tan(f \theta)$ for $f\in [0,1]$, given $g = \tan\theta$. Obviously, I can compute $a = \tan(f\tan^{-1}g)$, but I'm wondering if there's a more efficient way that avoids having ...
4
votes
0answers
229 views

Negative viscosity stabilized by fourth order terms

I am trying to solve a "Navier-Stokes"-type problem where the viscosity is negative. Of course this renders the equation unstable and thus I add a fourth order term, so the entire equation becomes: $$...
1
vote
0answers
161 views

Numerically evaluate 1D inhomogeneous wave equation solution

I am trying to solve the following 1D inhomogeneous wave equation. Forgive me if I a miss any rigorous mathematical concept. $$ \frac{\partial^2 u}{\partial x^2} - \frac{1}{c^2}\frac{\partial^2 u}{\...
4
votes
1answer
206 views

How can exponential fitting be used with the finite element method?

Restricted to one dimensional problem, is it possible to dynamically adapt the finite element method (FEM) discretisation based on the local value of the Péclet number ($P_e$) for advection-diffusion ...