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.

Filter by
Sorted by
Tagged with
0 votes
0 answers
2 views

Connection between collocation methods and quadrature rules

I know what a collocation method is and how it can be useful for the direct transcription of optional control problems, using specific collocation points. I also know what a quadrature rule is and how ...
Federico Toso's user avatar
1 vote
2 answers
20 views

Numerically stable form for vector rejection between two nearly parallel vectors?

Given two vectors $\vec{M}$ and $\vec{N}$, I want to compute the rejection between them : $oproj(\vec{N}, \vec{M}) = \vec{N}-(\vec{M}\cdot\vec{N})\vec{M}$. For my purposes both input vectors are unit ...
gct's user avatar
  • 573
0 votes
0 answers
6 views

Transform 2d finite element into standard 2d element

A certain three node triangular element has nodes with coordinate as follows: $$1:(0.13,0.01)\quad2:(0.25,0.06)\quad3:(0.13,0.13)$$ Deduce a transformation that will map this element into the standard ...
N00BMaster's user avatar
1 vote
0 answers
16 views

Principal components of Vandermonde matrix

Recall that the Vandermonde matrix of a collection $\{x_0,\ldots,x_m\}$ of points is $$ V = \begin{pmatrix} 1 & x_0 & x_0^2 & \cdots & x_0^n \\ 1 & x_1 & x_1^2 & \cdots &...
guest's user avatar
  • 269
0 votes
0 answers
15 views

Alternating-direction implicit method for Laplace's initial value problem

Problem 1. Consider the Laplace's initial value problem $$ \begin{gathered} \frac{\partial^2 u}{\partial x^2}+\frac{\partial^2 u}{\partial y^2}=0,0<x, y<4 \\ u(x, 0)=u(0, y)=u(4, y)=0, u(x, 4)=\...
N00BMaster's user avatar
3 votes
1 answer
53 views

Weird hexagons distribution of singular vectors of random matrices.

I ran the following numerical experiment: Sample 10⁶ random Gaussian 2×2 matrices ($A_{ij}∼𝓝(0, 1)$) Compute SVD $A = UΣV^⊤$. Let $u_\max, v_\max$ be the singular vectors of the maximum singular ...
Hyperplane's user avatar
  • 11.3k
0 votes
0 answers
52 views

Calculating $\cos(1.1)$ with an absolute error smaller than $10^{-4}$

My goal is to calculate $\mathrm{cos(1.1)}$ with an absolute error smaller than $\mathrm{10^{-4}}$ using the following relations: $\mathrm{cos^{2}(x)+sin^{2}(x)=1}$ $\mathrm{sin(x)=\sum_{k=1}^{\...
J P's user avatar
  • 45
1 vote
1 answer
152 views

How to "speed up" a series $\displaystyle \sum_{k=0}^{\infty}a_k=\ell$

Introduction I was numerically calculating some limits of functions and series and I noticed a disparity: I have a function $f(x)$ such that: $$\displaystyle\lim_{x\to\infty}f(x)=\ell$$ and I want to ...
Math Attack's user avatar
  • 2,391
0 votes
0 answers
34 views

Solve the system of equations $x_1+10x_2-x_3=3,2x_1+3x_2+20x_3=7,10x_1-x_2+2x_3=4$ using the Gauss-Elimination with partial pivoting.

Solve the system of equations $$x_1+10x_2-x_3=3,$$$$2x_1+3x_2+20x_3=7,$$$$10x_1-x_2+2x_3=4$$ using the Gauss-Elimination with partial pivoting. I tried solving the problem as follows: We have the ...
Thomas Finley's user avatar
0 votes
1 answer
34 views

Existence of paths, homotopy and functions

Consider the homotopy $h(t,x)=tf(x)+(1-t)g(x)$ in which $f(x)=x^2-5x+6$, and $g(x)=x^2-1$.Show that there exists no path connecting a root of $g$ to a root of $f$. I assumed there exists a path ...
maths and chess's user avatar
1 vote
0 answers
46 views

Are there any resources for numerical methods in extracting coefficients from generating functions?

Oftentimes in combinatorics, one can derive a closed form for a generating function, say $F(z)$, describing some scenario. From this function, we can extract the coefficient of $z^k$ to arrive at an ...
chirpyboat73's user avatar
2 votes
0 answers
57 views

Series with more terms converges more slowly than with lesser terms

I was working with the Laplace differential equation with certain boundary conditions, problem that yields the following analytic solution: $$ \mathbb{V}(x,y)= \mathbb{V}_o\frac{4}{\pi}\sum^\infty_{n=...
madame p's user avatar
  • 147
0 votes
1 answer
22 views

Finding groups of number that satisfys certian conditions and minimize a certain function of numbers in these groups.

Say that we have $3$ groups of $10$ numbers: $$ g_{1}= \left\{x_1,x_2,...,x_{10} \right\}, g_{2}= \left\{y_1,y_2,...,y_{10} \right\}, g_{3}= \left\{z_1,z_2,...,z_{10} \right\}. $$ The sum of each ...
Michael's user avatar
  • 45
0 votes
0 answers
19 views

Global truncation error of backward Euler method

It's often found in books that the global truncation error of the forward Euler method applied to $\dot{y} (t) = f(t, y(t))$ is given by something like $$ \frac{\exp(LT) -1}{L} \frac{Mh}{2},$$ with $L$...
tommy1996q's user avatar
  • 3,170
0 votes
0 answers
34 views

Numerical method for calculating large discrete harmonic function

I am working on a problem, and for testing purposes, I want to do the following. Let be given a sparse graph $G(V,E)$ with edge weight matrix $W$, and $|V|$ large (anywhere from $10^3$ to $10^6$). We ...
stomfaig's user avatar
0 votes
1 answer
46 views

Generating uniform grids

I have the following first order differential equation: $$0.05u'+2xu=0.05^2e^{5-20x^2}$$ for $x \in [0,1]$, and $u(0)=0$. then I want to approach the differential equation with a Taylor series at ...
RandomlyX's user avatar
2 votes
0 answers
92 views
+50

Flaw in proof about an exact quadrature method

Consider the quadrature method $$ \int_{-1}^1f(x)dx \approx \sum_{k=0}^N w_kf(x_k), $$ where $x_0=-1, x_N=1$, and $x_1,\ldots,x_{N-1}$ are the roots of the derivative of the degree-$N$ Legendre ...
Frank Seidl's user avatar
0 votes
0 answers
23 views

How does one converge to an SDE from a discrete approximation?

It is well known that Euler approximation of an ODE $$dx(t) = f(t,x(t))dt$$ can be defined as follows, for a uniform partition of coarseness $1/N$ over $[0,1]$, $$ x_{t_{n+1}} = x_{t_n} + \frac{1}{N} ...
qervert's user avatar
  • 77
1 vote
2 answers
246 views

Simple iterative method to solve $X-\alpha X^{-1} = A$?

The is a simple iteration to compute $A^{-1}$ by applying Newton's method to $$X^{-1} = A,$$ namely the iteration $$X_{n+1} = X_n(2I - AX_n).$$ Is there is similarly simple iteration to solve the ...
Dirk's user avatar
  • 11.6k
0 votes
0 answers
21 views

how to find out the matrix for parametric cubic spline for natural spline boundary condition. [closed]

Write Python programs to approximate the sine curve between 0 and 2 using curve fitting by (a) a cubic spline; For the case of the cubic spline, you may consider the use of “natural splines” which ...
JT ShiT's user avatar
0 votes
0 answers
41 views

Product between matrix-polynomial and vector [closed]

I was wondering if it is possible to optimize the evalutaion of the product of a matrix polynomial and a vector. $$ \vec{y} = \left( \sum_{i=0}^{n}a_iM^i \right)\vec{x}$$ Matrix size is maybe ...
Aleksk89's user avatar
0 votes
0 answers
36 views

How to approximately diagonalize a special symmetric hermitian matrix?

Given a hermitian matrix $H$ as follows: \begin{equation} H = \begin{bmatrix} H^1 & V^{12} \\ V^{21} & H^2 \end{bmatrix}. \end{equation} Here, $H^1,H^2\in\mathbb{C}^{N\times N}$ ...
bb wang's user avatar
0 votes
0 answers
26 views

Proof of the convergence of the Rayleigh-Ritz Method

In this article The convergence of the Rayleigh-Ritz Method in quantum chemistry by Bruno Klahn & Werner A. Bingel they have at page 11 Let $H_B$ be that Hilbert space which can be obtained as the ...
amilton moreira's user avatar
3 votes
0 answers
41 views

Computing ratio of two sums

I'm interested in computing $$ f(s) := \frac{ \sum_{n=0}^{\infty} a_n s^n } { \sum_{n=0}^{\infty} b_n s^n } $$ for some given $s \in \mathbb{C}$, where the power series in the numerator and ...
Jay Lemmon's user avatar
  • 2,118
0 votes
0 answers
43 views

Centered, forward and backward approximation

For these approximations, do we simply plug in the values? If someone could confirm, it would be highly appreciated
Braxton Parsons's user avatar
1 vote
1 answer
35 views

Combine 1D FEM tent basis piecewise functions to a single function

The tent basis functions $$\phi_i(x) = \begin{cases} \frac{x-x_{i-1}}{x_i - x_{i-1}}; \quad x \in [x_{i-1}, x_i]\\ \frac{x_{i+1}-x}{x_{i+1} - x_{i}}; \quad x \in [x_{i}, x_{i+1}]\\ 0; \quad \text { ...
Xen92's user avatar
  • 25
0 votes
0 answers
32 views

Fast addition of logarithmic values

Given two values $\log(a)$ and $\log(b)$ of complex values $a$ and $b$. Is there a numerically fast way to compute $\log(a + b)$ (on a CPU)? I'm aware that, $\log(a + b) = \log(a) + \log(1 + \exp(\log(...
Jiro's user avatar
  • 577
0 votes
2 answers
50 views

How to prove a Big-O bound

In "Numerical Analysis: Mathematics of Scientific Computing" (3rd ed), chapter 1.2, the author says that $sin x = х - \frac{x^3}{6} + \mathcal{O}(х^5) \quad (х \rightarrow 0)$. This means ...
Rararat's user avatar
  • 143
2 votes
0 answers
65 views

numerical integration of a function satisfying a ode

I need to numerically approximate an integral of the form $$\int_0^\tau f(X_t)\:{\rm d}t,\tag1$$ where $(X_t)_{t\ge0}$ is the solution of a SDE $${\rm d}X_t=b(X_t){\rm d}t+\sigma(X_t){\rm d}W_t\tag2.$$...
0xbadf00d's user avatar
  • 13.4k
0 votes
0 answers
46 views

What does "anchoring one of the coefficients" in an optimization problem with a polynomial basis mean?

I am trying to solve an optimization problem, and I am looking for coefficients of a polynomial basis function. The problem that I am working on is of the following form: $$F(y) = \inf_{a\in\mathbb{R}^...
Mili's user avatar
  • 43
1 vote
0 answers
20 views

Computational limits for nonlinear solver accuracy

Recently I've been curious about the following question. Suppose that $f:\mathbb{R}^n\rightarrow \mathbb{R}$ is a nonlinear convex function and we seek to minimize it by Newton's method. That is we ...
Tucker's user avatar
  • 2,080
2 votes
0 answers
30 views

Relation between Poisson equation and Wilson lattice gauge invariance theory

I've recently started writing a library of numerical solvers for elliptic partial differential equations, with particular focus on the Poisson equation. If one considers typical Poisson equation in ...
Akhaim's user avatar
  • 51
0 votes
0 answers
24 views

Cholesky Decomposition of sum of matrix

Consider a positive definite matrix $A=B+C$, where $B$ and $C$ are both semi-positive definite and $Im(C)=Im(B)^{\perp}$. If $A$ has a Cholesky decomposition $A=LL^{T}$, then whether the matrix $L$ ...
zhenyuboy's user avatar
  • 315
2 votes
1 answer
113 views

Does $\approx$ have a formal definition?

I recently came across a problem in a Numerical Algorithms (Computer Science) class that asked me to prove the Trapezoidal rule of integration. Derive the trapezoidal rule for numerical integration ...
Karan Handa's user avatar
0 votes
0 answers
22 views

Nonlinear second order partial differential equation Integration

I have the following nonlinear second order partial differential equation: $\dfrac{\partial^2}{\partial t^2} \log(1 + u) = \nabla^2 u.$ My question is how can i use a finite differences scheme to ...
Juan Pablo Rojas Álvarez's user avatar
1 vote
1 answer
46 views

Why Spurious Eigenvalues comes from mixed states?

In this book Many-Electron Approaches in Physics, Chemistry and Mathematics they have the following definition at page 36 Definition 1 (Spurious spectrum) A real number $\lambda \in(-1,1)$ is called ...
amilton moreira's user avatar
3 votes
1 answer
69 views

Does the mean area of triangles with equal perimeter $p$ and circumradius $R$ have a local minima at $p=4R$?

Definition: Isoperimetric triangles are triangles which have the same perimeter and the same circumradius. Isoperimetric area curve: The largest perimeter of a triangle that can be inscribed in a ...
Nilotpal Sinha's user avatar
1 vote
2 answers
89 views

Convergence of the Jacobi method

Consider this question The function $u(x)=x(x-1), 0 \leq x \leq 1$, is defined by the equations $u^{\prime \prime}(x)=2,0 \leq x \leq 1$, and $u(0)=u(1)=0$. A difference approximation to the ...
Maths Wizzard's user avatar
0 votes
1 answer
32 views

Rate of convergence of fourier series for non periodic functions

Consider Suppose that an analytic function $f$ on $[-1,1]$ is not periodic, yet $f(-1)=f(+1)$ and $f^{\prime}(-1)=f^{\prime}(1)$. Integrating by parts the Fourier coefficients $\hat{f}_n$ show that $\...
Maths Wizzard's user avatar
1 vote
0 answers
89 views

Clarification on what the question wants me to do

Consider Let the Gauss-Seidel method be applied to the equations $A \boldsymbol{x}=\boldsymbol{b}$ when $A$ is the nonsymmetric $2 \times 2$ matrix $$ A=\left[\begin{array}{cc} 10 & -3 \\ 3 & ...
Maths Wizzard's user avatar
0 votes
0 answers
43 views

Suggestion for the numerical solution of a nonlinear pde system.

I am faced with the following system of coupled nonlinear partial differential equations $$ \begin{array}{lcccl} \varphi_{tt} &-& a_1\varphi_{xx} &+& a_2\varphi_t &=& a_3\sin{\...
Oleg Kravchenko's user avatar
0 votes
1 answer
49 views

BVP problem with conjugate gradient method

Life and death situation. I have the differential equaction $$1.1 \dfrac{d^2T}{dz} - 0.01\dfrac{dT}{dz} = 0, T(-1000) = 0.12, T(0) = -1.55$$ that im trying to solve with conjugate gradient method. So ...
MrPink's user avatar
  • 1
0 votes
0 answers
22 views

Problem of numerical analysis of conditioning and PVI 2

"Let $a\in \mathbb{R}$, consider the PVI: $u'(t)=u_0e^{at}(a \cos(t) − \sin(t))$, $t > 0$ $u (0) = u_0$ with $u (t)=u_0e^{at}\cos(t)$ being the exact solution. Study the conditioning with ...
Andre Luiz's user avatar
0 votes
0 answers
32 views

Interpolation, advantages and disadvantages

So during our numerics course we learned a few interpolation methods Aitken/Neville, divided differences,Lagrange and the Vandermonde matrix. How these work is clear to me for the most part, I'm just ...
Ice's user avatar
  • 11
1 vote
1 answer
51 views

Approximating $\frac{1}{(1+x)^2}$ in $L^2$ norm with polynomial of degree $1$

I'm currently looking at an exercise where I'm supposed to get the best approximation of $ \frac{1}{1+x^2}$ regarding $ ||f||= \sqrt{\int_{-1}^{1}f(x)^2dx}$ with a polynomial $p(x)=ax+b$. So my idea ...
Ice's user avatar
  • 11
0 votes
2 answers
57 views

Runge Kutta Method for in $1+1$ dimension

Given a partial differential equation $\partial_t u(t,x) = F(t,x,u,u')$ Suppose I know the functions $u(t_0,x)$ and $u'(t_0,x)$ at some point $t_0$ for all $x$. In order to obtain the function $u$ at ...
Octavius's user avatar
  • 612
0 votes
0 answers
20 views

Choosing correct parameters in a model with hamiltonian equation

I am working on the hamiltonian of a system related to the extension of the Potts Model which is Cellular Potts Model. The total hamiltonian of the system is: $$ H = H_1 + H_2 $$ $$ H_1 = - J \sum_{\...
wallevic's user avatar
0 votes
1 answer
41 views

interpolation numerical methods

I have translated this question into English so excuse me if it is not proper. I am struggling to figure out how to solve the following question any directions would be greatly appreciated Let $F$ be ...
NeedsToKnow's user avatar
0 votes
0 answers
32 views

Does this method theoretically can help to estimate the optimal step size in a neural network training? [closed]

In my previous post Questions regarding backward propagation. It is understood the error term of a 3 node neural network can be represent by taylor series with adjustable w1 and w2 and $\text{error}=\...
CKT's user avatar
  • 15
0 votes
0 answers
28 views

2-dimensional Gauss-Hermite quadrature?

I have to implement a numerical algorithm that can calculate following integral as fast as possible: $$ I=\iint_{\mathbb{R}^2}dx \,dy\, e^{-\left(x^2+y^2\right)} f\left(x,y\right) $$ where the ...
Hojin Cho's user avatar
  • 166

1
2 3 4 5
278