Questions tagged [numerical-methods]

Questions on numerical methods; methods for approximately solving various problems that often do not admit exact solutions. Such problems can be in various fields. Numerical methods provide a way to solve problems quickly and easily compared to analytic solutions.

4,845 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
19 votes
0 answers
11k views

Simpson's Rule for Double Integrals

Simpson's Rule for double integrals: $$\int_a^b\int_c^df(x,y) \,dx \,dy$$ is given by $$S_{mn}=\frac{(b-a)(d-c)}{9mn} \sum_{i,j=0,0}^{m,n} W_{i+1,j+1} f(x_i,y_j) $$ where: $$W= \begin{pmatrix} 1&...
entrelac's user avatar
  • 4,681
18 votes
0 answers
5k views

Reducing or avoiding the Gibbs phenomenon.

What is your favourite method which would help reduce the Gibbs phenomenon in Fourier Series and Fourier Transforms? This could mean pre-processing or post-processing or altering the transform. With ...
mathreadler's user avatar
  • 25.9k
11 votes
0 answers
530 views

Discretization formula for system of differential equations. "Solution to one of these is the initial condition of the other". In which sense?

Consider the following stochastic differential equation \begin{equation} dy=\left(A-\left(A+B\right)y\right)dt+C\sqrt{y\left(1-y\right)}dW\tag{1} \end{equation} where $A$, $B$ and $C$ are parameters ...
Strictly_increasing's user avatar
11 votes
0 answers
777 views

Numerically solving a non-linear PDE by an ODE on the Fourier coefficients

I need to solve numerically a PDE of the form $$ u_t(x,t)=u_{xx}(x,t)+u_x(x,t)^2-a(x)u_x(x,t)-a_x(x) $$ with initial condition $u(x,0)=u_0(x)$. I can assume that both $u(\cdot,t)$ and $a(\cdot)$ are ...
epsilone's user avatar
  • 441
10 votes
0 answers
320 views

Convergence of numerical methods for Viscous Burgers' Equation

For linear problems we can deduce convergence of numerical schemes by checking consistency and stability because of the Lax Equivalence Theorem. For conservation laws, we know that conservative, ...
428's user avatar
  • 565
10 votes
1 answer
290 views

Estimating Parameter - What is the qualitative difference between MLE fitting and Least Squares CDF fitting?

Given a parametric pdf $f(x;\lambda)$ and a set of data $\{ x_k \}_{k=1}^n$, here are two ways of formulating a problem of selecting an optimal parameter vector $\lambda^*$ to fit to the data. The ...
Ian's user avatar
  • 102k
10 votes
0 answers
504 views

What makes a geometric construction more or less stable?

As anyone who's actually done geometric construction of n-gons knows, not all construction methods are made equal. Some are very stable (the shape you get is always close to ideal even if you're not ...
realityChemist's user avatar
9 votes
0 answers
2k views

Are there some Python implementations of the Schwarz Christoffel mapping?

I am interested in Python implementations of the Schwarz Christoffel mapping for simply and doubly connected polygonal domains. Well, I know that by now multiply connected domains can be dealt with, ...
Malkoun's user avatar
  • 5,276
9 votes
0 answers
1k views

Integral of rational function over $\mathbb{H}^4$

Suppose I have a rational function of $8$ coordinates $a,b,c,d,e,f,g,h$ that I want to integrate over $\mathbb{H}^4$: ...
Ricardo Buring's user avatar
8 votes
0 answers
432 views

Improvement of Simpson's rule

Let $I_n$ denote the approximation of $$I = \int_a^b f(x)dx$$ obtained by applying Simpson's rule with $2n$ intervals of uniform length. Define a new approximation $$J_n=\frac{16I_{2n}-I_n}{15}.$$ ...
emil agazade's user avatar
8 votes
0 answers
362 views

Approximation of integral of gaussian function over a parallelepiped

Given a multi-dimensional gaussian function, defined by $$f(\boldsymbol{x})=\exp\left\{-\frac{1}{2} \boldsymbol{x}^T\boldsymbol{x} \right\}=\exp\left\{-\frac{1}{2} \sum_{i=1}^nx_i^2 \right\}$$ And an ...
NN2's user avatar
  • 16k
8 votes
0 answers
258 views

Recommendation for intro to geometric integrators?

Explicit Request Looking for book or lecture note recommendations on numerical optimization that (ideally) have the following: Emphasis on geometric and physical intuition Emphasis on symplectic ...
Quetzalcoatl's user avatar
8 votes
0 answers
239 views

Monotonic convergence of Newton's method for boundary value problems

I’m interested in solving nonlinear elliptic boundary value problems of the type $$ -a\Delta u + f\left(u\right) = 0, \\ u\big\vert_\Gamma = u_0 $$ by Newton’s method when its convergence is global ...
jokersobak's user avatar
8 votes
0 answers
864 views

Fixed point iteration to find root of Arctan

I am trying to find the root of $f(x)=\arctan(x)$ by using successive iteration. There are some conditions to apply this in successive iteration . 1) The function has to be continuous. 2) $\sup|f'(...
izaag's user avatar
  • 908
8 votes
0 answers
1k views

Runge's phenomen: interpolation error using Chebyshev nodes oscillates

We're trying to approximate the Runge function $f(x) = \dfrac{1}{1+25x^2}$ using Chebyshev nodes. When calculating the interpolation error, using different degrees ranging from 0 to 50, we get the ...
gieldops's user avatar
  • 183
7 votes
0 answers
292 views

What's the best way to numerically solve geodesic equations?

I have a particular Riemannian metric $g$ defined on a subset of Euclidean space $E \subset \mathbb{R}^n$. Although this is beyond the question, I have $E = \{x:\|x\|_2 > 1\}$. So really, $g$ is a ...
Spencer Kraisler's user avatar
7 votes
0 answers
169 views

modified Hamiltonians for symplectic methods

I'm interested in methods for numerically integrating Hamiltonian systems $$\begin{align} \dot q & = +\frac{\partial H}{\partial p} \\ \dot p & = -\frac{\partial H}{\partial q} \end{align}$$ ...
Daniel Shapero's user avatar
7 votes
0 answers
392 views

A generalization of Elon Musk's favorite interview question (Going 1km South, 1km West, then 1km North returns to the starting position).

This question concerns a generalization of the following problem (allegedly, in the early days of Tesla and SpaceX, Elon Musk would ask the following question to possible future employees): Assume ...
projectilemotion's user avatar
7 votes
1 answer
251 views

How to estimate distance from root to nearest immediate basin boundary for Newton's method in one complex variable?

Context: I want to check that the atom domain size estimate is smaller than the inradius of the Newton immediate basin, for centers of hyperbolic components in the Mandelbrot set, and thus justify ...
Claude's user avatar
  • 5,657
7 votes
0 answers
264 views

Understanding the Runge pheonomena and Chebyshev nodes.

I am studying the Runge's phenomenon and there are a couple things I would like to understand better. Suppose we interpolate the Runge's function with use equally spaced nodes to interpolate the ...
John Keeper's user avatar
  • 1,281
7 votes
0 answers
190 views

A naive conjecture about Taylor series convergence

Conjecture. Let $f$ be a real (or complex) analytic function defined on some open subset $U$ of real (complex) numbers and assume that $p,q,x\in U$ are such that $x\in B(p,r_p)\cap B(q, r_q)$, where $...
Fallen Apart's user avatar
  • 3,785
7 votes
0 answers
266 views

Numerical integration of $\int_0^{2\pi}\frac{dx}{3+\sin x}$

We know that numerical integration using end points is first order, trapezoid and mid-piont rules second order, and Simpson's rule fourth order. However, with $\int_0^{2\pi}\frac{dx}{3+\sin x}$, we ...
W. Zhu's user avatar
  • 1,325
7 votes
0 answers
351 views

Tridiagonal matrix w/trigonometric eigenvalues

Let $n$ be a natural number and $B$ be the $n\times n$ square matrix of $0$'s and $1$'s $$ B=\begin{pmatrix} 0 & 1 & 0 & \ldots & 0 \\ 1 & 0 & 1 & \ldots & 0 \...
DVD's user avatar
  • 1,147
7 votes
0 answers
165 views

Implementation of a simulation of an incompressible Newtonian fluid with uniform density

Let $d\in\left\{2,3\right\}$ and $\Omega\subseteq\mathbb R^d$ be a bounded domain. I want to simulate an incompressible Newtonian fluid with uniform density $\rho$ and viscosity $\nu$. The evolution ...
0xbadf00d's user avatar
  • 13.4k
7 votes
1 answer
2k views

orthogonal functions with orthogonal first derivatives

Is there any set of functions $\phi_1(x) , \phi_2(x) , \ldots , \phi_n(x) , \ldots $ defined on $[a,b]$ such that \begin{eqnarray} &&\langle\phi_i, \phi_j\rangle = \int_a^b \phi_i(x)\phi_j(x)...
moradipour's user avatar
7 votes
0 answers
409 views

What’s the best way to cut an apple?

Take the apple in one hand, and the knife in the other. In the first cut, the apple is divided in two pieces: a small one that drops into the plate and a big one that is still hold with the hand. This ...
jbaylina's user avatar
  • 171
6 votes
0 answers
153 views

Nature of ODE $\dot x=x^2-\frac{t^2}{1+t^2}$

Discuss the equation $\dot{x}=x^2-\frac{t^2}{1+t^2}$. Make a numerical analysis. Show that there is a unique solution which asymptotically approaches the line $x=1$. Show that all solutions below ...
Ri-Li's user avatar
  • 9,058
6 votes
0 answers
83 views

Laplace Equation for Non Homogeneous Material

For the Laplace Equation with fixed values of $\phi$ at the boundary, under a simple electrostatic design with an homogeneous material, $$ \nabla^2\phi=0\\ \phi(S)=\phi_0(S), \tfrac{\partial\phi}{\...
Brethlosze's user avatar
  • 3,010
6 votes
0 answers
126 views

Solving a nonlinear system of equations involving only products of unknowns

I would like to find a numerical solution of a system of $N$ equations of the form: $A^i = w_1 F(x^i_k) + w_2 F(x^i_l) + w_3 F(x^i_m) +...$ $A^j = \,\,\,\,\,\,0 \,\,\,\,\ \,\,\ + w_2 F(x^j_l)...
can't stop me now's user avatar
6 votes
0 answers
787 views

Backward stability of 'standard' algorithm for cross product calculation

Suppose we want to calculate the cross product $u\times v$ for two vectors $u,v\in\mathbb{R}^3$ on a computer satisfying $x\circledast y=(x*y)(1+\epsilon)$, with $|\epsilon|\leq\epsilon_{\mathrm{...
Václav Mordvinov's user avatar
6 votes
0 answers
360 views

Way to express a number in its most compact sum of powers

Given a non-negative number n, what is the best approach to find the most compact representation for n in terms of sums of powers, such that the bases and the exponents can't surpass a given value (...
DaviFN's user avatar
  • 79
6 votes
0 answers
268 views

Obtaining a positive definite covariance matrix of order statistics

Suppose $X_1,\dots,X_n$ are independent samples from some distribution with known absolutely continuous CDF $F:\mathbb{R}\rightarrow[0,1]$. Let $X_{(1)},\dots,X_{(n)}$ denote the order statistics, i.e....
cfp's user avatar
  • 685
6 votes
0 answers
160 views

Efficient of Newton Polynomial Evaluation

The polynomial in Newton form having the coefficients $a_{0},a_{1},\ldots,a_{n}$ and centers $x_{1},x_{2},\ldots,x_{n}$ is the polynomial $$ p(x) = a_{0} + a_{1} (x-x_{1}) +a_{2} (x-x_{1})(x-x_{2}) + ...
weirdo's user avatar
  • 979
6 votes
1 answer
285 views

Evaluate $\int_0^2 \sqrt[3]{x^2 + 2x - 1} \, dx$

Calculate the value of the integral $$ \int_0^2 \sqrt[3]{x^2 + 2x - 1} \,dx $$ with measurement uncertainty not larger than $10^{-3}$. I know we can evaluate integration using the "trapezoidal ...
le duc quang's user avatar
  • 4,825
6 votes
0 answers
2k views

Optimized way to compute L1 distance matrix

I'm computing distances between two groups of multi-dimensional points giving a matrix of distances pairwise between points. For the L2 (euclidean) distance I can use optimized matrix multiplication ...
Oliver's user avatar
  • 161
6 votes
0 answers
232 views

Solving numerically the equation of motion of D7 brane perturbation

I want to solve this equation $$ \partial_{\rho}^{2}\phi+\frac{3}{\rho}\partial_{\rho}\phi+\left(\frac{M^{2}}{(1+\rho^{2})^{2}}-\frac{l(l+2)}{\rho^{2}}\right)\phi=0 $$ numerically. I know that ...
miguelFe's user avatar
6 votes
0 answers
1k views

Approximating a function with a piecewise constant function

I have some distribution X of values (which I don't know exactly but I can sample many times). I also have a function $f : X \to Y$ which may be complicated. I want to approximate $f$ with a piecewise ...
Andrey's user avatar
  • 61
6 votes
0 answers
210 views

Shintani cone zeta function

Is there a procedure/algorithm for calculating sums of the form $$ \sum_{n_1,\ldots,n_r >0} \frac1{L_1(n_1,\ldots,n_r)^{m_1} \ldots L_r(n_1,\ldots,n_r)^{m_r}} $$ where $$ L_i(n_1,\ldots, n_r) :...
user avatar
5 votes
0 answers
105 views

Numerical integration of functions of bounded variation

Let $f: \mathbb{R} \rightarrow \mathbb{R}$ be such that $f\in BV(\mathbb{R}) \cap L^1(\mathbb{R}).$ Now, since $f\in BV(\mathbb{R})$ pointwise values makes and consequently we can define numerical ...
Celestina's user avatar
  • 1,152
5 votes
0 answers
69 views

Convergence of the Implicitly Restarted Arnoldi Method (IRAM)

I know that the Implicitly Restarted Arnoldi Method (IRAM) consists of using the implicitly shifted QR algorithm to restart the Arnoldi process without losing to much information about the eigenspace. ...
jacopoburelli's user avatar
5 votes
1 answer
185 views

Initial conditions for which these two recursive sequences converge

The following problem is a generalization of an exercise that the professor give me and that I have already solved. In the initial statement $\alpha=0$ and given $0<a_0<1$, the limit of the ...
mathlife's user avatar
  • 649
5 votes
0 answers
70 views

Why is the average magnitude of the imaginary parts of the roots of these polynomials greater than that of the real part?

Let $f_n(x)$ be a polynomial obtained by replacing $10$ with $x$ in the base $10$ expansion of $n, n \ge 10$. Eg. $f_{98}(x) = 9x+8$ and $f_{2021}(x) = 2x^3 + 2x + 1$. $f_n(x)$ has exactly $[k = \log_{...
Nilotpal Sinha's user avatar
5 votes
0 answers
131 views

Approximate solution of $\Gamma(x+a)=k\, \Gamma(x+1)$ for $0 \leq x \leq a$

As the title says, I am looking for good approximate solution of the equation $$\Gamma(x+a)=k\, \Gamma(x+1) \qquad \text{for} \qquad 0 \leq x \leq a$$ for a given real and positive value of $a$ and $...
Claude Leibovici's user avatar
5 votes
1 answer
212 views

Discrete entropy inequality for scalar conservation laws

Consider a scalar conservation law $u_t+f(u)_x=0.$ A three point monotone scheme given by, \begin{eqnarray} u_i^{n+1}=u_i^{n}-\lambda (F(u_i^n,u_{i+1}^n)-F(u_{i-1}^n,u_i^n)) \end{eqnarray} where $F(u,...
Rosy's user avatar
  • 1,015
5 votes
0 answers
95 views

Are there any tricks to find an orthonormal basis for polynomials by hand?

I am taking a Numerical Analysis class. On a previous exam, there is a question which involved finding an orthonormal basis for $\mathbb{P}_2$ w.r.t the inner product $(u, v) = \int_0^2 u(t)v(t) dt.$ ...
Blue's user avatar
  • 492
5 votes
0 answers
100 views

"Solving" for $n$ the equation ${2n\brack n}=k$ (Stirling numbers of the first kind)

Interested by this question, I wondered how easily we could "solve" for $n$ the equation $${2n\brack n}=k$$ where the left hand side is the unsigned Stirling number of the first kind. I ...
Claude Leibovici's user avatar
5 votes
0 answers
124 views

Evaluating series $\sum_{n=2}^\infty \left(n^{1/n}-1-\frac{\log n}{n} \right)$

This is similar to my recent question, but probably more interesting. What can we say about this slowly converging series: $$S=\sum_{n=2}^\infty \left(n^{1/n}-1-\frac{\log n}{n} \right)$$ We can ...
Yuriy S's user avatar
  • 31.5k
5 votes
0 answers
594 views

How can I numerically compute a stochastic integral?

I am trying simulate a to solve a 2-dimensional stochastic process and $Y_t^1$ is a mean-reverting square root process which I simulated on a time grid using its known conditional distribution. I ...
user3503589's user avatar
  • 3,697
5 votes
0 answers
92 views

Efficient method to find $H$ given by $H(x)=\int_0^x f(x-u) f(x-au) e^u \, du$

Question Let $f:[0,\infty) \rightarrow [0,\infty)$ be some continuously differentiable function and $a \in (0,1)$ then we define the function $H:[0,\infty) \rightarrow [0,\infty)$ by letting: $$H(x)=\...
Darkwizie's user avatar
  • 757
5 votes
0 answers
251 views

Feynman-Kac formula in action.

Briefly speaking, the Feynman-Kac formula gives a way for constructing $C^2$ functions satisfying certain PDEs in the classical sense (at least, it's how it is explained in Oksendal's book that I am ...
user avatar

1
2 3 4 5
97