Questions on numerical analysis/numerical methods; methods for approximately solving various problems that often do not admit exact solutions.

learn more… | top users | synonyms (2)

0
votes
0answers
9 views

Discretizing Nonlinear Shallow Water Equations: Question on Flux Term

It's been suggested to me that the term $(hu)_x$ can be discretized as $\frac{(h(i+1,j)u(i+1,j)-h(i-1,j)u(i-1,j))}{2\Delta x}$. I don't see why this is written in this way. It's taking the derivative ...
0
votes
2answers
21 views

Growth rate of a function

I am having some trouble determining the growth rate of the function $m(n)=\inf\{m: \frac{1}{2^m}\le \frac{1}{n} m^{3/2}\}$. This comes up in problem 2.2.8 in Durrett's probability book. Essentially, ...
0
votes
0answers
23 views

How to integrate discrete data by Gaussian quadrature method

I'm trying to numerically integrate discrete data by Gaussian quadrature method. The file attached test.mat is a discrete data set taken from a finite-element mode ...
0
votes
1answer
16 views

A $C^1$-function, s.t. approximation by the Trapezoidal rule is more accurate than by Simpson's rule?

Find values $a, b \in \mathbb{R}$ and a function $f \in C^{1}[a,b]$, such that the approximation of $\int_{a}^{b} f(x)dx$ by the Trapezoidal rule $T(f)$ is better than the approximation by the Simpson ...
0
votes
0answers
18 views

Factoring out a variable from an unknown multivariable function

I have a data set that follows the behavior of a function f that depends on a lot of different variables. Let's call two of those variables $a$ and $b$. The specific behavior I'm interested in is $f(a)...
0
votes
0answers
8 views

Find the critical points (or roots) of many short Fourier series efficiently

I need to find the critical points of around 1000 Fourier/cosine series, each with length 4. More specifically, I need to do $$ m_j = \max_{0 \leq z < \pi} \sum_{m=1}^4 u_{j,m}\cos(mz), \quad \...
-2
votes
1answer
23 views

computational cost power matrix $A^k$

Can you help me? If $A\in\mathbb{R}^{n\times n}$, which it is the computational cost $A^{k}=A\cdot A\cdot\ldots\cdot A$?
-1
votes
1answer
10 views

Least squares method what is an good error [on hold]

Hi I have started using the least squares method and I want to calculate the mean error of my approximation. I use the following formular for calculating the error: $\ \mathcal E = ||A\hat x - y||/\...
0
votes
0answers
19 views

How can we use the Lindley's method to approximate the following expression?

The Lindley's(1980) approximation is one of the most popular methods that is used to obtain Bayes estimates. In this method we need to maximum likelihood estimators(MLEs) of the unknown parameters. ...
0
votes
0answers
13 views

finite difference time domain grid question

The finite difference time domain method is a finite difference method for solving maxwell equations numerically. There are several pieces to it, but this is the root of my question $H_{i +1/2 , j+1/...
0
votes
1answer
27 views

Identify what value of $x$ may have issues with cancellation error

I am leaning numerical analysis and getting a hard time to understand cancellation error. For example, suppose we have $\ln(x+1)-\ln(x)$, this is the same as $\ln\left(\frac{x+1}{x}\right)$. Suppose ...
3
votes
0answers
39 views

Prove $\int_\Omega f(x) \,dx=f(x_B) \int_\Omega1 dx+ \mathcal O(\int_\Omega1 dx \cdot \sup_{x,y\in\Omega}\|x-y\|_2^2)$?

Let $\Omega \subset \Bbb R^n$ be a convex domain and $f: \Omega \to \Bbb R $ and $f \in \mathcal C^2(\Omega)$. Let $x_B $ be the barycentre of $\Omega$ with $$x_B:= \frac{\int_\Omega x \,dx}{\int_\...
1
vote
0answers
12 views

Piecewise-linear (or otherwise monotonic) interpolation as a matrix problem

Background: I'm hoping to find (or write) an algorithm to piecewise linear-interpolate large sets of unevenly sampled functions (10s of thousands of arrays of a thousand or so $x$ and $y$ pairs, where ...
0
votes
0answers
27 views

Solving a system of N-1 Ist order ODEs by Euler's Method

In order to solve a system of N-1 first order ODEs by Euler's Method For N = 4; t=0, h= 0.1, x= 0.1 should the Euler formula be? $U_n(t+h) = U_n(t) + h F_n(x_n, t_n)$ for n = 1, 2,..,N-1 but we ...
0
votes
0answers
21 views

numerical integration asymptotic relation

Let $Q\subset R^n$ be a convex subset and $f\in C^2(Q)\;$ We set $x_s:=\int_Q xdx$,$\;\;\;Vol(Q):=\int_Q 1dx$ and $diam(Q)=sup||x-y||_2$ Prove the following asymptotic relationship: $...
4
votes
2answers
139 views

Proving a contraction mapping is a Cauchy sequence

Let $\phi(x):[a,b]\rightarrow [a,b]$ be a continuous function. Show that if $\phi(x)$ is a contraction mapping on $[a,b]$ then the sequence $\{x^{(k)}\}$ defined by $x^{(k+1)} = \phi(x^{(k)})$ is a ...
2
votes
1answer
22 views

What is the necessary condition for ODE to have unique solution?

For the ODE: \begin{align} \dot{x}(t)&=f(x,t) \\ x(t_{0})&=x_{0} \end{align} If $\;\;f:\mathbb{R}^{n}\rightarrow{}\mathbb{R}^{n}$ is Lipschitz continuous on $\mathbb{R}^{n}$, then there exists ...
0
votes
1answer
18 views

Minimum error in floating point approximation of an elementary function.

I need a confirmation of a thing that probably is silly. Let $x$ a floating point number representable using $e$ bits for exponent and $m$ bits for mantissa, let $f$ a be an elementary function, you ...
-1
votes
1answer
57 views

How to implement twice MATLAB integral build-in function for numeric integration? [closed]

Suppose we have a function $F(\lambda) = \int\limits_{\lambda}^1 f(x) dx$, where $f(x)$ has no formula for antiderivative. We can easily calculate it by means of build-in MATLAB functions. Let's use $...
0
votes
0answers
16 views

Explicit and implicit RK methods with stiff problems

Even if there isn't a precise definition of stiff equation, i think we can sum up (for the sake of the question) the concept in two cases: A linear equation u'=λu with a negative λ; An equation ...
0
votes
0answers
9 views

How to understand the vector form of the Jacobi iteration?

When I read the book "Iterative Methods for Sparse Linear Systems" about Jacobi iteration, I can easily understand the component form for this iteration. However, since my background is computer ...
1
vote
2answers
37 views

Numerical analysis of wave equation in polar coordinates:

Is there a simple solution to deal with the problem of radial symmetry when solving a pde numerically. If so can someone provide some references/resources that explain this. Any help would be greatly ...
1
vote
0answers
11 views

Numerical scheme and boundary condition for 2D Fokker Planck equation

$\newcommand{\P}{\mathbb{P}}$ I have a 2D stationary Fokker-Planck equation $$\frac{\partial^2 \P(A,B)}{\partial A^2}+\frac{\partial^2 \P(A,B)}{\partial B^2}=\frac{\partial f_1(A,B) \P(A,B)}{\partial ...
-1
votes
0answers
30 views

Romberg, trapezoidal rule exact for polynomials

My question is, how can I proof that the rombergs method of the summed trapezoidal rule is exact for polynomials with degree $(2n+1)$ or less. Thanks for helping, one or two tips can help me here. ...
0
votes
2answers
20 views

Does the rounding unit of a floating point system depend only on the mantissa?

The rounding unit (or machine epsilon) of a binary floating point system is usually represented as $\frac{2^{-(p - 1)}}{2}$ or simply $2^{-(p - 1)}$, according to this Wikepedia's article (if I'm not ...
0
votes
1answer
38 views

Does encountering a zero pivot during Gaussian elimination imply that the matrix is singular?

I was reading a problem about Gaussian elimination and pivots of a matrix, say $A$. The question is: During the Gaussian elimination process without pivoting a zero pivot has been encountered. Is ...
0
votes
1answer
33 views

Effects of Scaling on Matrix Norms

I feel as though is a very stupid question, but I'm struggling to muddle through it so here I am. For Gauss-Seidel methods one way to formulate the convergence requirement is that given the system $...
0
votes
0answers
23 views

Obtaining error between exact and finite element solution of a PDE when exact solution is not available

How does one obtain the error between the finite-element (FE) solution and the exact/analytical solution when the latter in not available? After all, isn't the purpose of a numerical method to find ...
2
votes
1answer
29 views

Least Squares Sensitivity to data

Let ($x_1$,$y_1$),...,($x_n$,$y_n$) be my data set. I have a function $f(x,{\bf c})$ where ${\bf c}=(c_1,...,c_m)$ is a vector of $m$ parameters. I want to fit to the data using non-linear least ...
3
votes
1answer
42 views

Solving a system of non linear equations

I have got a system of non-linear equations of the form $$A x_1^B \exp \bigg(\frac{- C}{x_1} \bigg) = k_1$$ $$A x_2^B \exp \bigg(\frac{- C}{x_2} \bigg) = k_2$$ $$A x_3^B \exp \bigg(\frac{- C}{x_3} \...
0
votes
0answers
23 views

Numerical method for fourier transform other than FFT/DFT

FFT relies on uniform samples, which cause aliasing, so FFT can be inaccurate in a certain case. Suppose you can obtain samples of $f(t): \mathbb{C} \to \mathbb{C}$ at any point ($t$ can also be a ...
2
votes
2answers
46 views

Computing a double integral with applications to prime numbers

I was reading the preprint [1] which contains on p. 7 the following formula (for $4<s\le6$): $$ f_1(s)=\frac{2e^\gamma}{s}\left\{\log(s-1)+\int_4^s\int_3^t\frac{\log(u-2)}{u-1}du\,dt \right\} $$ ...
0
votes
0answers
20 views

How to define a variable which is an integral involving cauchy principal value inside?

How to define a variable which is an integral involving cauchy principal value inside in any computer programming language? I want to know how to break down the procedure step by step from a ...
3
votes
1answer
32 views

Gauss quadrature infinite segment

Given a weighted integral $$I(f)=\int_{-\infty}^\infty f(x)e^{-x^2}dx.$$ How can I calculate the Gauss quadrature for two points. I know how to calculate the quadrature wih Legendre polynomials, but ...
0
votes
0answers
52 views

General issue when adding shocks on curves made of splines

Let us assume I have a "nice" curve and that I would like to introduce a small shock up/down of about 1% at a certain point along the curve. I am trying to find out what the best and most efficient ...
1
vote
1answer
55 views

An Approximation involving the Exponential Integral

Define for real $x > 0$ the function: \begin{equation} F(x)= 1 + x e^{x} Ei(-x), \end{equation} where $Ei(x)$ is the exponential integral. I found in a physics papers (Amaldi, Fluctuations in ...
1
vote
2answers
43 views

Logistic regression for football results - Estimating coefficient through maximum likelihood

Consider two football teams $V$ and $L$ with strengths $W_V$ and $W_L$, respectively. Let's assume that the draw probability $\mathbb{P}(Draw)$ is known. Then this model is supposed to give estimates ...
3
votes
1answer
63 views

(Possible) Misunderstanding of perturbation method for finding solution of polynomial equation?

This is the strange moment that I get when I solve this equation: $$ \frac{w^4}{4} - \frac{w^3}{3} = \varepsilon, $$ where $\varepsilon$ is a small parameter. If I plot the graph $ w \mapsto \frac{w^...
-1
votes
1answer
36 views

Uniqueness of interpolation polynomial.

I am new to numerical analysis and this is the first thing I came across. It says on my textbook that interpolation polynomials are unique and to prove that it was assumed that let there be two such ...
1
vote
1answer
24 views

Floating point numbers

In a certain computer represents numbers in base2, if the distance between 7 and the next largest floating-point number is $2^{-12}$. What is the distance between 70 and the next largest floating ...
2
votes
0answers
22 views

More precise trail function in Rayleigh–Ritz method

In order to obtain displacement field of an elasticity problem, say a plate structure, we approximate the solution using trigonometric series with unknown coefficients which satisfy the essential ...
1
vote
0answers
37 views

Approximating Geometric Brownian Motion numerically

I am trying to generate a numerical solution to the SDE for Geometric Brownian Motion. The stochastic process is given by $S_t = \exp(\sigma W_t + \mu t)$, and by Ito's lemma, we have that the SDE is ...
0
votes
0answers
8 views

Find parameters and node so that quadrature approximating integration will have maximum order

Find parameters $\alpha, \beta$ and node $c$ so that quadrature $Q(f) = \alpha f(a) + \beta f(b)$ approximating integration $\int_{a}^{b}f(x)dx$ will have maximum order. I don't know how to solve ...
0
votes
0answers
17 views

Stopping criterion for adaptive Simpson's rule in 2D

On the Wikipedia page for Adaptive Simpson's method, the criterion for stopping the bisection of the integration interval $[a,b]$ when approximating an integral $\int_a^b f(x)\ dx$ is given: $|S(a,e) ...
0
votes
0answers
13 views

How to approximate the probleme non-linear by finies elements $\mathbb{P}_1$

I have to approximate $u^1$ by finies elements $\mathbb{P}_1$ (such that $h=\frac{1}{4}$ and $V_h=\{v\in C(I),\quad v(0)=v(1)=0 \}$) \begin{cases} \dfrac{\partial u}{\partial t}-\dfrac{\partial}{\...
1
vote
0answers
33 views

Finding the maximum of $|\widehat{f''}|$ for $f$ in terms of the Gaussian

Let $$f = \begin{cases} e^{-x^2/2} - e^{-2 x^2} &\text{if $x\geq 0$,}\\ 0 &\text{if $x<0$.}\end{cases}$$ I would like to find out $|\widehat{f''}|_\infty$. A good numerical bound -- of ...
0
votes
0answers
34 views

Extrapolating the sequence of derivatives of an analytic function

Suppose that $f(x)$ is an analytic complex or real function on the real domain and we only know $f(x_0)$ and the first $n$ derivatives of $f(x)$ at $x=x_0$. Is there an algorithm whose accuracy ...
2
votes
3answers
73 views

Finding an approximation of a function's root

I have the polynomial function $f (x) = x^5+2x^2+1$. I am trying to find an approximation to its root in $[-2,-1]$, with the precision of $0.1$, and with a minimal number of steps. The answer I was ...
0
votes
2answers
30 views

Please explain this differentiation step

I don't get how they went from line 1 to line 2. Which one is treated as the variable and which the constant? I rearrange line 2 to get $0=\frac{3\varepsilon}{M}-h^3$, but I still cannot see how we ...
0
votes
2answers
57 views

Understanding power method for finding dominant eigenvalues

The power method aims to find the eigenvalue with the largest magnitude. Does magnitude still have the same meaning in this context? If so, can't we tell from the outset which eigenvalue is the ...