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 field. Numerical methods provide a way to solve problems quickly and easily compared to analytic solutions.

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

Why do the Legendre Polynomials have these coefficients?

I learned of the Legendre polynomials for the first time, in the context of finding an orthogonal basis for $\text{span} \{1, x, x^2, ... \}$. According to Wolfram, the Legrndre Polynomials are $$...
0
votes
0answers
14 views

m-banded, centered matrix

If I have that a matrix $A \in \mathbb{R}^{n \times n}$ is centered and m-banded i.e. $\textit{m-banded:}$ there is an index $l$ such that $$a_{i,j}=0 \hspace{4mm} if \hspace{2mm}j \notin[i-l,i-l+m]$...
0
votes
0answers
11 views

Find a vector space and a set without Tschebyschev center.

I have such exercise: Give example of a vector space G and its subset A such that the center of A does not exists. By the Tschebyschev center we mean the center of the smallest ball containing A ( ...
0
votes
0answers
7 views

Optimal bin size for entropy estimation

There seems to be some sort of disagreement between the criteria for the best suitable choosing in the bin size for obtaining the histogram of certain continuous data. I have seen that the optimal ...
0
votes
1answer
44 views

Finite Difference Method for the second order ODE $y''=\frac{y}{y+1}$

I would like to solve a non-linear second order ODE for $y \in (0,1)$ using a numerical method, preferably finite differences. The ODE is $$ \frac{d^2 y}{d x^2} = \frac{y}{y+1}, \quad y(0)=\alpha, \ ...
2
votes
0answers
34 views

How to evaluate $\int_{0}^{\infty}e^{-x}f\left(x\right)dx$ using $f\left(0\right)$ and $f\left(1\right)$?

Let $f\in{\cal C}^{\infty}\left(\mathbb{R}\right)$ be such that $\left|f^{\left(k\right)}\left(x\right)\right|\leq M_{k}$ for every $k$. Find a way to evaluate $\int_{0}^{\infty}e^{-x}f\left(x\right)...
0
votes
0answers
18 views

Numerical Approximation of Lebesgue Integral (Real-Valued)

In the context of probability theory, I have come across $\int_{[a,b]} f(x)\ dQ(x)$ for some function $f:\mathbb{R}\to\mathbb{R}$ and some measure $Q(x) = \exp(-\lambda \cdot x)$. Since $\frac{dQ(x)}{...
0
votes
1answer
35 views

Showing this iterative ODE solver converges quadratically

Given the ODE: $$y'(t) = f(y(t)), y(0) = y_0,$$ And the following method to solve the ODE: $$y_{n+1} = y_n +\frac{h}{2}(f(y_n)+f(y_n+hf(y_n))),$$ I am trying to show the method converges ...
1
vote
0answers
21 views

Riemann invariants and shock waves

I'm studying hyperbolic conservation laws. I went through LeVeque's book [1], chapters 7 and 8. It gives a very good description of shock and rarefaction waves construction for non-linear systems. ...
1
vote
0answers
17 views

Volume in Monte Carlo Integration and Importance Sampling Integration

I'm currently studying numerical integration, and started with Monte Carlo Integration. Monte Carlo Integration states that $$ I = \int_{a}^{b} h(y) dy = \frac{V}{N} \sum_{i=1}^N h(y_i), $$ where $...
0
votes
1answer
27 views

How can I find the number of Jacobi Method iterations needed to reduce the error of a 100 factor?

Given the linear system $$ \begin{pmatrix} 1 & 4 & 1 \\ 5 & 1 & 2 \\ -1 & 1 & 4 \\ \end{pmatrix} \begin{pmatrix} x_1 \\ x_2 \\ x_3 \\ \...
1
vote
1answer
19 views

Minimum number of subintervals n for the Composite Trapezoidal Rule

I am trying to compute the minimum number of subintervals n for the Composite Trapezoidal Rule, in order for the approximation of the following integral to have 5 decimals correct. $$\int_0^2 \frac{1}{...
0
votes
1answer
22 views

Extract trajectory from recurrence plot

Let's say I have a time series in a vector $v$, and I compute its recurrence(-like) plot $R(i,j)=\left \| v(i)-v(j) \right \|$. Is there any standard way of extracting $v$ knowing only $R(i,j)$ ?? ...
0
votes
0answers
14 views

How to find numerically correlation from joint probability distribution? [closed]

What is the algorithm of finding correlation given probability distribution of $x$, $y$ and joint probability distribution of $x$ and $y$? $$ PDJ_{xy} = \int_{-\infty}^{-1.28} \int_{-\infty}^{-0.84} \...
0
votes
0answers
13 views

Why is the residual vector after one Gauss-Seidel sweep on a red-black ordering equal to 0 in the black-corresponding nodes?

Working with finite difference methods here. One possible ordering of the gridpoints is red-black. This results in a system matrix of the form $\begin{pmatrix}A_{RR} & A_{RB} \\ A_{BR} & A_{...
0
votes
0answers
12 views

Interpolation Error For Equal And Non Equal Interval

let $f(x)$ be continuous on $[a,b]$ and diffrentiable $n+1$ times on $(a,b)$, let $0\leq i \leq n$ be $x_i$ points on $[a,b]$ then there is $c\in(a,b)$ such that: $$e(x)=\frac{f^{(n+1)(c)}}{(n+1)!}(x-...
0
votes
0answers
14 views

Stability Function of Discontinuous Galerkin Method

Consider the discontinuous Galerkin method dG(1): $$U_n^- - U_{n-1}^- = \int_{t_{n-1}}^{t_n} f(s,U(s))ds,$$ $$U_n^- - U_{n-1}^+ = \frac{h_n}{2}\int_{t_{n-1}}^{t_n} f(s,U(s)) (s-t_{n-1})ds.$$ How do I ...
0
votes
0answers
13 views

Inaccuracy when solving problems using FEA

I hope this is the correct forum to post this question because I did not find one that really suits this question. Basically I was reading this paper: 2D Triangular Elements I like to implement ...
1
vote
0answers
28 views

Speed of convergence Richardson iteration for discrete Poisson equation

We consider the Poisson equation $u''(x)=f(x)$ for $u,f\in C^\infty([0,1])$ together with the Dirichlet boundary conditions $u(0)=u(1)=0$. We discretize the second derivative as $$ u''(x)\approx\frac{...
0
votes
1answer
20 views

Accurate computation of log error function difference

For information-theoretic purposes I am interested in computing $f(a, b)=-\log_2\left(\text{erf}(b) - \text{erf}(a)\right)$ where $b > a$ and $\text{erf}$ is the error function. Out-of-the box ...
3
votes
1answer
42 views

Newton's method algorithm for linear least squares

Section 4.5 Example: Linear Least Squares of the textbook Deep Learning by Goodfellow, Bengio, and Courville, says the following: Suppose we want to find the value of $\mathbf{x}$ that minimizes ...
0
votes
1answer
24 views

Linear Least Squares In Matrix Form

if we are given a set of points $\{(x_i,y_i)\}$ and we are looking to fit a straight line $ax+b$ "as close" to the points as possible we are building a set of equations. One way is to take the ...
0
votes
1answer
43 views

$x_0$ in Newton-Raphson method for reciprocal square root for floating-point arithmetic

How to choose $x_0$ expressed as $(1+f)2^p$ in Newton-Raphson method for reciprocal square root to be close enough to $\frac{1}{\sqrt{a}}$? Starting with: $\frac{1}{\sqrt{(1+f)2^p}} = \frac{1}{\sqrt{(...
0
votes
2answers
53 views

Numerical method for finding a parameter inside an integral

I have a set of data, basically with the information of f(x) as a function of x, and x itself. I know from the theory of the problem that I'm working on the format of f(x), which is given as the ...
0
votes
1answer
18 views

How to find the weight coefficients in the Gaussian type quadrature formula?

I am trying to determine the node values in the Gaussian type quadrature formula given by: I need to find the weight coefficients for the Gaussian quadrature when the weight function is $ w(x) =\frac ...
0
votes
0answers
32 views

Solve a large composite set of equations numerically

I have the following set of equations: 1: $f(x,y,z) = f_xx+f_yy+f_zz + d_1$ $g(x,y,z) = g_xx+g_yy+g_zz + d_2$ where $ f_x,f_y,f_z, d_1, g_x,g_y,g_z, d_2$ are known scalar constants, and $x,y,z \...
1
vote
0answers
18 views

approximation of differential equation through chebyshev differentiation matrices

All, i'm trying to solve a linear differential equation, through discretizing the domain into the chebyshev grid and using spectral method ( approximating first and second derivative with ...
0
votes
1answer
28 views

error term in the Taylor expansion of 1/x

What is the error in the Taylor polynomial of degree 5 for $f(x)=1/x$ using $x_0=3/4$ for $x\in [1/2, 1]$? Since the $(n+1)th$ derivative of $f(x)=1/x$ is $\frac{(-1)^{n+1}(n+1)!}{x^{n+2}}$, I think ...
0
votes
0answers
32 views

Convergence order slowdown

I'm using a Runge-Kutta second-order solver (more specifically, this with $\alpha = 1$) and I'm trying to approximate the solution of the nonlinear system $$\begin{cases} T'(r)=S(r) \\ S'(r)=-\frac{S(...
0
votes
0answers
20 views

Getting boundary line of the image of a subset

Problem I have fucnion $f:\Bbb{R}^n \to \Bbb{R}^2$ and two vectors $\mathbf{v}_{min} = (v_{1_{min}}...v_{n_{min}})$, $\mathbf{v}_{max} = (v_{1_{max}}...v_{n_{max}})$ that defines a subset $S=\{\...
0
votes
0answers
54 views

Strange behavior of the function $f(x)=\frac{x^2+\ln(\cos(x))}{x^4}$ when $x\to +\infty (-\infty)$

I have explained the partial graph of this function $$f(x)=\frac{x^{2}+\ln(\cos(x))}{x^{4}}$$ for my students of an high school. Considerated that the domain is given by $\cos(x)>0 \ \wedge x \...
0
votes
1answer
27 views

Question about $\xi(x)$ in Taylor remainder term

I am studying numerical analysis in Burden & Faires book. The Taylor remainder term is written as $$R_{n}(x)=\frac{f^{(n+1)}(\xi(x))}{(n+1) !}\left(x-x_{0}\right)^{n+1}$$ The book states that "$\...
0
votes
1answer
28 views

What is the intuition/meaning behind the first characteristic polynomial of a linear multistep method?

Given a linear multistep method $$y_{n+s} + \sum_{k = 0}^{s-1} a_k y_{n + k} = h \sum_{k=0}^{s} b_k f_{n + k}$$ the first characteristic polynomial is defined as $$\rho(z) = z^s + \sum_{k=0}^{s-1} ...
-3
votes
0answers
24 views

The Runge-Kutta algorithms, using the dynamic simulation program Matlab [closed]

I have three differential equations for a solar powered desalination device, temperatures change over time from eight in the morning until six in the evening, and solar radiation varies during time ...
2
votes
1answer
72 views

Solve (numerically) a second-order ODE [closed]

can someone help me in solving the following ODE: $\sqrt y = ax - bx^2 (1-x)^2 + c x^2 (1-x)^2 y''$ $y(0)=0, y(1)=a^2$ The main problem is that boundary conditions directly follow from the equation ...
0
votes
1answer
23 views

SPD Preconditioner

I'm studying stuff about preconditioning and I understood that the idea behind is that, if I want to solve linear system $$ A\textbf{x} = \textbf{b} $$ where $A$ is Symmetric Positive Definite $n \...
0
votes
1answer
30 views

LU decomposition of invertible matrix

Let $M\in M(n\times n,\mathbb{R})$ such that $$M=\begin{pmatrix}a & c & 0 & \ldots & \ldots & 0 & d \\ e & a & c & \ddots & \ddots & \vdots & d \\ 0 &...
0
votes
0answers
9 views

Sensitivity analysis with final times different to nominal solution

I have nominal state solution for set of ODE and various solutions where I have altered the initial state conditions of the nominal case by some interval (single state variation so I only change one ...
1
vote
1answer
50 views

numerically calculating the integral $I(\lambda)=\int_0^\infty dx (e^{-\lambda x }/(1+x))$

This is an example for the asymptotic series. The asymptotic series of the integral is $$I(\lambda ) \sim \sum_{n=0}^\infty (-1)^n \frac{n!}{\lambda^{n+1}} .$$ It is possible to get a high ...
3
votes
1answer
75 views

Inverting a function: proof of $W(x) = \ln\frac{x}{\ln\frac{x}{\ddots}}$

for $|W(x)|>1$, $W$ The Lambert W-function: $$ W(x) =\ln\cfrac{x}{\ln\cfrac{x}{\ln\cfrac{x}{\ddots}}} $$ Just for fun I tried to find an easy proof for this result and it occurred to me to use ...
1
vote
1answer
32 views

Interval Length Needed For Interpolation

Let $f(x)=\sqrt{x}$ defined on $[1,2]$, What is the length needed between the sampling points such that the approximation error by interpolation polynomial of order $2$ will not exceed $5*10^{-8}$ We ...
0
votes
1answer
27 views

Finding Complex Eigenvalues of Hessenberg Matrix

Given a Hessenberg matrix, i wish to compute its eigenvalues using QR Algorithm. The problem is that the matrix has complex eigenvalues and my implementation of the QR Algorithm can't find them. It ...
0
votes
1answer
17 views

Number Of Iterations Formula - Bisection Method

I have saw few questions and few formulas so I just want make sure all is correct: Using the bisection method to fins the root of a function $f(x)$ on the interval $[4,6]$, What is the number of ...
0
votes
1answer
48 views

Ratio of successive errors does not converge to $2^{-p}$.

Assume a multistep method with order $p$. Then for the global error we have: $$ \| y_{n+1} - y(x_{n+1}) \| = O(h^p) \leq K h^p $$ Given the above, if we divide the step $h$ by $2$, then $$ \frac{...
1
vote
0answers
27 views

rand() functions producing pseudo-random numbers in [0,1] range

Reading the Wikipedia I stumbled at the List of random number generators. It seems that all the effort in developing PRNGs went into generating uniform integers in some given range, let call it $[0, ...
2
votes
1answer
32 views

Under what assumptions are planar vortices understood/solved?

Under what conditions are the fluid dynamics equations known and in some sense solved for planar ($2$-dimensional), stationary vortices? Are the equations even solved for a single vortex, with ...
0
votes
0answers
10 views

Conversion of a graph

Attached above is a graph with rotor speed on X axis, altitude on Y axis and various All up weights, shown as a set of curves.Now for convenience assume all weight curves are parallel of constant ...
4
votes
2answers
44 views

Solution for equation with numerical method

I'm solving my finances task with annuities and I am struggling in one moment. I already have done this: $$125a_{15,i}=1687$$ $$a_{15,i}=13.5$$ $$a_{15,i}=\frac{1-\left(\frac{1}{1+i}\right)^{15}}{i}$$ ...
0
votes
0answers
21 views

Gradient Descent Proof in quadratic functions

We have $f(x)=\frac{1}{2}x^tQx-b^tx$ is a quadratic function, where Q is symmetric and positive definite. The gradient $ \nabla f(x)=Qx-b $ and the minimum is $x^*$ and it is the unique solution of $...
2
votes
1answer
25 views

how to perform spline interpolation on GPS coordinations?

this may look like a programming problem but actually it have to do with math more than programming. I have GPS coordinations in a csv file that I predict it using a regression model, just two ...