Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [numerics]

The tag has no usage guidance.

11
votes
1answer
813 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
308 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
266 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
158 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
83 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
78 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
186 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
150 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
240 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
110 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
221 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
144 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
191 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 ...
3
votes
1answer
88 views

numerical inaccuracy ellipsoid-ellipsoid collision

I am trying to implement ellipsoid-ellipsoid collision in my C++ code. Briefly this task can described as next: Let's assume that we have two arbitrarily oriented ellipses in the in space and this ...
5
votes
2answers
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 ...
2
votes
1answer
1k views

Implicit heat diffusion with kinetic reactions

I am using the implicit finite difference method to discretize the 1-D transient heat diffusion equation for solid spherical and cylindrical shapes: $$ \frac{1}{\alpha}\frac{\partial T}{\partial t} = ...
8
votes
5answers
783 views

Is Discrete Exterior Calculus currently a focusing point in numerial computing world or simulation in industry,

I am just wondering if Discrete Exterior Calculus, as a new numerical method , is good at numericall solving problems in elasticity, fluids or other physical/real area.
5
votes
1answer
373 views

When is discrete Fourier transform a good approximation to the continuous one?

I am looking for help in understanding the use of discrete Fourier transform as an approximation to continuous Fourier transforms. As an exercise, I considered a Gaussian $$f(x) = \exp\left(-2x^2\...
0
votes
1answer
136 views

Simulating the motion of a elastic body under gravity [closed]

I am doing a numerical simulation of a elasticity problem. It is very simple. A cuboid elastic body with the right end fixed on the wall, under the gravity(but here I set it to be 1 along the z-axis ...
0
votes
1answer
465 views

Are these coefficients correctly calculated?

I'm solving a problem (page 16 is in English) in numerical analysis and this is the solution: ...
6
votes
2answers
185 views

Continuation procedure to solve for a 2D curve that satisfies f(x,y) = 0

I have some function of $R^2$, that must be numerically computed. For instance, I might be interested in a real-valued contour integral that begins from (x,y) = 0. $$ f(x,y) = \Re\left[\int_0^{x + iy}...
7
votes
3answers
543 views

A problem in 1D linear finite element method

When applying Galerkin method, we have two conventions, i.e. multiply the test function $v$ at left/right, $(v,u)/(u,v)$. Both ways won't matter for a simple problem like Poisson's equation, since the ...
6
votes
3answers
932 views

Significance of p-convergence studies

Consider a method (e.g., FEM) with variable approximation order $p$. Now, we know that the optimal order of convergence is given by $$e = C h^{p+1},$$ where $h$ denotes the mesh size and a constant $C$...
5
votes
2answers
993 views

Examples of numerical solution of stochastic differential equation(SDE)?

I want to simulate a nonlinear stochastic differential equation $$ {\rm d}X_t = f(X_t) {\rm d}t + g(X_t){\rm d}B_t $$ where $f,g \in C^{\infty}({\mathbb R}^n ,{\mathbb R})$ and $B_t$ is one-...
15
votes
2answers
2k views

Is it possible to solve nonlinear PDEs without using Newton-Raphson iteration?

I am trying to understand some results and would appreciate some general comments on tackling nonlinear problems. Fisher's equation (a nonlinear reaction-diffusion PDE), $$ u_t = du_{xx} + \beta u ...
10
votes
2answers
420 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
1answer
2k views

Analytic solution 2D scalar wave equation in cylindrical coordinates numerical implementation

I am trying to compare my finite difference's solution of the scalar (or simple acoustic) wave equation with an analytic solution. For that purpose I am using the following analytic solution ...
7
votes
2answers
618 views

Evaluation of Vandermonde matrix

I would like to construct a Finite Element basis by using a generalized Vandermonde matrix. The idea is to compute the values of a suitable modal basis ('prime basis') at a set of points in reference ...
2
votes
0answers
116 views

Lapack++ for QR algorithm

I have recently started using Lapack++ which I found convenient for my programming purpose, in general. Now, I need to solve a matrix using QR algorithm. I've searched the user manual and I found a ...
5
votes
2answers
486 views

Solving PDE with spatial and temporal derivatives on left hand side

I wish to solve an equation of the form, $$ \frac{\partial}{\partial t} \left( \frac{\partial \phi}{\partial x} \right) = -\frac{\partial}{\partial x}(\mathcal{F}) $$ for the variable $\phi$ (e.g. ...
6
votes
2answers
715 views

Need an example of convection-dominated problem to test on FreeFEM++

Can you all give me (at least) one example about convection-dominated problem in order that I can test it (them) on FreeFEM++. If possible, please give me specific examples (it/they contain(s) full ...
2
votes
1answer
72 views

Can you give me a detailed description of (spetral) deferred correction method?

I have just read "Accelerating the convergence of spectral deferred correction methods". The link is here: http://www.unc.edu/~junjia/papers/sdcgmres.pdf‎. But I wonder how to understand deferred ...
5
votes
1answer
172 views

Stabilization of solution to one-dimensional system of PDE

I am trying to solve numerically next PDE system: $$\frac{\partial c}{\partial t}=\epsilon\frac{\partial}{\partial x}(\frac{\partial c}{\partial x}+\rho\frac{\partial \varphi}{\partial x}+\frac{vc}{1-...
16
votes
1answer
825 views

How do you debug numerical code, what could be source of this oscillatory error?

Quiet a lot of insight can be gained form experience, I was just wondering if anybody has seen something similar to this before. The plot shows the initial condition (green) for the advection-...
3
votes
1answer
241 views

Finite volume with cell averages vs cell totals for conservation equations

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 + \...
39
votes
3answers
3k views

What's the state of the art in parallel ODE methods?

I'm currently looking into parallel methods for ODE integration. There is a lot of new and old literature out there describing a wide range of approaches, but I haven't found any recent surveys or ...
4
votes
1answer
217 views

Multivariate numerical integration with a non-uniform grid

I want to approximate the integral: $$ I = \int f(\boldsymbol{x})d\boldsymbol{x} $$ where $\boldsymbol{x}$ is $d$-dimensional. I have a set of non-equally spaced points $\boldsymbol{x}_1, \dots, \...
14
votes
1answer
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 (...
1
vote
0answers
217 views

Block Backward Differentiation Formula (BBDF), on order 4 formula

I am trying to implement a program the numerical method to solve ODE called Block BDF as explained in this article: https://waset.org/journals/waset/v38/v38-49.pdf As it is variable step-size, I need ...
3
votes
1answer
184 views

Is using Monte Carlo method a good approach for solving Boltzmann equation?

I'm trying to solve for electron and hole distribution function using Boltzmann equation with various scattering mechanisms. Since I land up with an integro-differential equation, analytical solution ...
6
votes
1answer
397 views

ENO-WENO Schemes: Are ENO-WENO schemes non oscillatory for all kinds (linear/non linear) of problems?

Is there an rigorous proof of ENO-WENO schemes being non oscillatory?
11
votes
3answers
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. ...
14
votes
4answers
945 views

Optimal ODE method for fixed number of RHS evaluations

In practice, the runtime of numerically solving an IVP $$ \dot{x}(t) = f(t, x(t)) \quad \text{ for } t \in [t_0, t_1] $$ $$ x(t_0) = x_0 $$ is often dominated by the duration of evaluating the right-...
12
votes
2answers
332 views

Oscillations in singularly perturbed reaction-diffusion problems with finite elements

When FEM-discretizing and solving a reaction-diffusion problem, e.g., $$ - \varepsilon \Delta u + u = 1 \text{ on } \Omega\\ u = 0 \text{ on } \partial\Omega $$ with $0 < \varepsilon \ll 1$ (...
5
votes
1answer
1k views

Integration of an indefinite integral: matlab precision problem

The integral I need to evaluate is: $$ \int_x^{\infty} \frac{t^n}{e^{t} -1} dt $$ After some research I found a paper saying, The numerical values of the two integrals [...] are easily calculated ...
4
votes
1answer
163 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
482 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} ...