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
0answers
13 views

How to choose the penalty coefficient when solving constrained optimization problem?

I was wondering why don't we select a very large number to a penalty function $c$ of the augmented function $f(x) + cP(x)$ instead of doing algorithms to increase c slowly? I know that as $c$ is large ...
0
votes
3answers
39 views

Is there a formula for this interest over a period

Say I have £100 overdraft and my balance is currently £0. when I go into my overdraft I am charged 1.25 % at the end of each day, but I have to divide the rest of the money equally for the next 10 ...
0
votes
0answers
13 views

Condition number of a matrix with factorization $A=QR$

Let $A=QR$ when $Q$ is orthogonal and R is triangular superior proof $\dfrac{1}{n}k_1(A)\leq k_1(R) \leq n k_1(A) $ and $k_2(A)=k_2(R)$ So we have for the second part $k_2(A)=||A||_2|||A^{-1}||_2$ and ...
0
votes
0answers
19 views

Example of matrices where computing the inverse is the most efficient method

I know there exists matrices where for example LU-factorization is not the most efficient way of solving the linear system of equations: $$Ax=b \tag{1}$$ Examples of such matrices are triangular or ...
1
vote
0answers
16 views

rounding error bound and truncation error bound in forward Euler method

How should I derive the truncation error bound and rounding error bound in the forward Euler method? $f^{\prime}(x) \approx \frac{f(x+h)-f(x)}{h}$ I know that the bound for truncation error is 2M/h ...
0
votes
0answers
49 views

Approximate solution of a non-linear system

Is there a method to find an approximate solution of the following system of nonlinear equations, with this type of exponents? \begin{equation} \left\{\begin{matrix} \dfrac{x^{20}-1}{x-1}+\dfrac{z^{...
0
votes
0answers
15 views

A bound for the error $|(x-1)\ln x-P_3 (x)|$ in using $P_3(x)$ to approximate $(x-1)\ln x$ on the interval $[0.5, 1.5]$

I was wondering if someone could tell me how we can find a bound for the error $|(x-1)\ln x-P_3 (x)|$ in using $P_3(x)$ to approximate $(x-1)\ln x$ on the interval $[0.5, 1.5]$. I computed $P_3 (x)$ ...
1
vote
1answer
48 views

Newton's method in higher dimensions

To calculate the inverse of a quadratic matrix A, we could solve the equation $F(X):=X^{-1}-A=0$. I need to show that if X is invertable, then $DF(X)(\Delta X)=-X^{-1}\Delta XX^{-1}$ where DF(X) is ...
0
votes
1answer
34 views

error bound for midpoint rule - exact error

I noticed that I get the exact error, using midpoint rule error bound formula, but with $f''(\frac{b-a}{2})$ for $K$, i.e. : $E_m \leq $ $\frac{K(b-a)^3} {24n^2}$ $E_{m2} = $ $\frac{f''(\frac{b-a}{2} )...
0
votes
0answers
18 views

Transform an equation to get a non-negative root

I have the following equation $$f(x) = \frac{1}{\|h(x)\|_2} - \frac{1}{x} =0 \tag{1}$$ where $$h(x) = -\left[A+ x I\right]^{-1}g,\tag{2}$$ $A$ a symmetric matrix and $g$ a column vector. The initial ...
0
votes
0answers
5 views

Mixed boundary conditions in a finite difference 2PDE

I have a 2nd order PDE wave equation for a grid of points in space and time: $$\frac{\partial^2u}{\partial t^2}=a^2\frac{\partial^2u}{\partial x^2}$$ I need to make a model according to finite ...
-1
votes
1answer
28 views

Can inverse power iteration diverge?

I'm trying to search an eigenvector based on some eigenvalue approximation. Now I tried to search complex vector for complex eigenvalue. But I've noticed, that under some conditions inverse power ...
1
vote
0answers
27 views

Numerical divergence of some solution of the restricred three body problem

In this question on the restricted three body problem are described very well the mechanics of the following system of ODEs: \begin{cases} y_1'' = y_1 + 2y_2' - \mu_2 \frac{y_1+\mu_1}{D_1} - \mu_1 \...
15
votes
1answer
341 views

Choose signs such that $\pm\sqrt{1}\pm\sqrt{2}\pm\dots\pm\sqrt{2022}$ is as close as possible to $0$.

Choose signs such that $\pm\sqrt{1}\pm\sqrt{2}\pm\dots\pm\sqrt{2022}$ is as close as possible to $0$. I tried looking at examples for small $n$ (up to $8$) for inspiration: $$\begin{align} &1: -\...
4
votes
1answer
50 views

Alternatives For Numerical Differentiation

For a long time, the following point always confused me: In High School Calculus, we are told that almost all functions we encounter are are analytically differentiable (i.e. have derivatives) but ...
0
votes
2answers
49 views

How to estimate maximum possible error if plug in $\sqrt2$ instead of $1.41$ in the expression?

Suppose we want to calculate, $$0.2-0.8\times \frac{4-1.41^2}{20}$$If I use the approximation $1.41\approx\sqrt2$ the above expression will be equal to $0.12$. I'm wondering how to estimate maximum ...
1
vote
0answers
32 views

How are interpolation operators derived for multigrid

I am trying to construct transfer operators $I^H_h, \, I^h_H$ for multigrid where $H \ne 2h$. I have gone through Briggs' tutorial, Hemker's paper, Hackbush's book, Trottenberg's book, but the details ...
0
votes
0answers
25 views

Interest calculation from EMI [closed]

We can calculate EMI as per the below: e = P × r × (1 + r)^n / ((1 + r)^n $$EMI = P*r*\frac {(1 + r)^n}{((1 + r)^n - 1)}$$ where P= Loan amount, r= interest rate, n=tenure in number of months, e = ...
0
votes
0answers
32 views

Rolle's Theorem and error bound formula for trapezoidal rule

In these notes on error bounds for numerical integration, it shows proofs for the error bound formula for the midpoint rule and the trapezoidal rule. I don't understand the last part (page 5-6) for ...
0
votes
1answer
23 views

A contradiction when applying the error estimate in the trapezoidal rule

When approximating $\int_a^b f(x) dx$ by the sum of areas of $N$ trapezoids $$T_N=\frac{b-a}{N}\left(\frac{f(a)+f(b)}{2}+\sum_{k=1}^{N-1} f\left(a+k\frac{b-a}{N}\right)\right)$$ the error term ...
0
votes
0answers
27 views

Period 1 Fixed Points of a difference equation

So i want to determine all the period 1 fixed points and analyse its stability in terms of the parameters v and c $$\begin{cases} x_{n+1}=ax_{n}+by_{n} \hspace{0.1cm}\\ y_{n+1}=-bx_{n}+ay_{n}-8\pi c \...
0
votes
0answers
22 views

Stop condition for inverse power iteration

Now I'm searching an eigenvector using existing eigenvalue approximation. But I'm unsure about when it's time to stop inverse power method iterations. $b_k = (A-\lambda I)^{-1}*b_{k-1}$ Now I'm ...
0
votes
0answers
43 views

Newton-Raphson method convergence criteria for a system of two equation with two unknowns

I am having a system of two non-linear equations and I want to compute the root. For example the system is $$f_1(x,y)=0 \tag{1}$$ $$f_2(x,y)=0.\tag{2}$$ In this post, it is shown that the root of the ...
1
vote
0answers
38 views

Finding $\max_{0\leq x\leq3} |f'(x)|$, $\max_{0\leq x\leq3} |f''(x)|$, and $\max_{0\leq x\leq3} |f^{(4)}(x)|$ numerically

In an numerical analysis project I need as an intermediate step to calculate the following: $$\max_{0\leq x\leq3} |f'(x)|,\ \ \max_{0\leq x\leq3} |f''(x)|\ \ \text{and}\ \ \max_{0\leq x\leq3} |f^{(4)}...
3
votes
1answer
75 views

Constraint in Lagrangian for mass spring system.

Suppose we have $p_1,...,p_n$ and we have springs attached to them. We know that the lagrangian is $$ L = T - U = \sum_{i=1}^n \frac{1}{2} m_i \dot{p}_i^2 - \sum_{(i,j) \in E} \frac{1}{2} k_{ij} \left(...
0
votes
1answer
30 views

Proof that relative error $\leq \frac{5 \times 10^{-n}}{a_m}$

Assume that $a = a_m \times 10^m + \dots > 0$ is an approximation of $A$ with $n$ correct significant digits. Prove that: $$ \delta(a) \leq \frac{5 \times 10^{-n}}{a_m} $$ I know that if $a$ has $n$...
2
votes
1answer
46 views

Location of roots using Darboux property

I was studying the Bisection method for root finding. It states that for a continuous function we can find out a root if it exists by the Intermediate value theorem.My question is why do we need ...
2
votes
1answer
42 views

Verification of numerical convergence rates without reference solution and saturation effects

Currently, I'm developing a numerical method for the nonpolynomial Gross Pitaevski equation (NPSE) [1] in one spatial dimension \begin{eqnarray} i \hbar \partial_t &= -\frac{\hbar^2 }{2 m} \psi_{...
-2
votes
0answers
20 views

How to solve it? [closed]

Let $P(x)$ be a polynomial with a root $\xi$ and $ P_\epsilon (x)$ be the perturbed polynomial with perturbation in coefficient is $\epsilon$. Find the apprximate root of $P_\epsilon(x)=0$ in terms of ...
0
votes
0answers
8 views

Numerical scheme for non-linear PDE

I have a function $V(t,x,y)$, with $t\in [0, T]$ denoting the time, $x,y\in \mathbb{R}$. The function $V(t, x, y)$ satisfies the following PDE: \begin{equation}\label{eq:hjb2} \partial_t V - a \Big(\...
0
votes
0answers
21 views

Linear positiv operators

I need at least any idea how can i start to solve that problem: Given the following linear and pozitiv operators $$ L_{n}: C\left(\mathbb{R}_{+}\right) \rightarrow C\left(\mathbb{R}_{+}\right), \quad\...
1
vote
0answers
51 views

Crank-Nicolson method for the heat equation should preserve mass

I'm tried to solve numerically the following PDE (forget that an exact solution is known): \begin{array}{l l} \partial_t \rho - \varepsilon^2 \Delta \rho &= 0 &\text{ on } (0, 1) \times (0,...
0
votes
0answers
16 views

Is unshifted algorithm suitable for finding conjugate and complex eigenvalues

I'd like to know if unshifted QR algorithm could find all kinds of eigenvalues. I notcied that it does not give correct Schur forms if matrix has complex or conjugate eigenvalues (they are calculated ...
0
votes
0answers
21 views

Reference request: numerical / computational linear algebra [duplicate]

So, I have a following question: I am looking for a good book (or a good university course available online) for numerical / computational linear algebra methods that would cover efficient matrix ...
0
votes
0answers
15 views

Gauss Seidel method iteration matrix infinity norm

Let $A=D+L+U$ be a decomposition of $A$ where $D$ represents the diagonal part of $A$, $L$ represents the (strictly) lower triangular part of $A$, and $U$ be the (strictly) upper triangular part. Let $...
0
votes
1answer
16 views

magnitude of singular vectors

Calculating the SVD $A = UST$ consists of finding the eigenvalues and eigenvectors of $AA^T$ and $A^TA$. The eigenvectors of $A^TA$ make up the columns of V , the eigenvectors of $AA^T$ make up the ...
1
vote
2answers
57 views

Finding the error of $f''(x) \approx \frac{f(x+2h) - 2f(x+h) + f(x)}{h^2}~$

I'm having some trouble with the following exercise: Deduce the following approximation: $$f''(x) \approx \frac{f(x+2h) - 2f(x+h) + f(x)}{h^2}$$ for small values of $h$, and find an expression for ...
0
votes
0answers
15 views

QR algorithm of a rank deficient matrix

Let \begin{equation} A = \begin{bmatrix} 1 & 1 \\ 1 & 1 \end{bmatrix} \end{equation} Apply one iteration of the QR algorithm to $A$. The QR algorithm requires that we obtain ...
1
vote
1answer
89 views

FEM for Elliptic equations with gradient term

I have a question about the following problem. Let $-\Delta u = \|\nabla u\|^p+f$ in $B(0,1)$, $u=0$ on $\partial B(0,1)$, where $B(0,1)\subset\mathbb{R}^2$ is a bounded regular domain, $f$ is ...
2
votes
1answer
63 views

Exact stop condition for QR-algorithm

I'm trying to implement unshifted QR-algorithm for finding all eigenvalues of matrix. Now I'm doing QR-decomposition with Householder reflections. My program almost works but I'm confused with stop ...
2
votes
2answers
134 views

Solving a parabolic PDE numerically with the spectral method

As a homework question, I am asked to numerically solve the PDE on $x \in [-3, 3]$ and $t \in [0, 0.5]$ with the spectral method. $$ \frac{\partial p}{\partial t} = (12x^2-4) p + \left[4x(x^2-1)+0.1\...
0
votes
0answers
36 views

Find integration limit given the value of the (2D) integral

(Previously asked on Stackoverflow - now deleted - it was pointed out that it makes more sense to ask my question here.) I am trying to solve for R_j(I_0) given in Eq. 12 of this paper (see also Eq. ...
0
votes
0answers
29 views

Deconvolution experimental data by solving as Tikhonov regulation of Fredholm integral equation

From an experiment, I have data for time t and a function of time $f(t)$. Data can be described by a Fredholm integral equation such that: $$ F(t) = \int_{0}^{1}ke^{-kt}f(k) \,{\rm d} k $$ Here is the ...
0
votes
0answers
16 views

Compare error bound to theoretical error bound

$P_3(x) = 3x^3 +3$ is an interpolating Lagrange polynomial for $\widetilde{P(x)} = x^4-2x^3-x^2+2x$ generated from the data points $$(-1, 0), (0, 3), (1, 6), (2, 27)$$ $\widetilde{P(x)}$ is itself a ...
0
votes
0answers
16 views

Nonlinear Regression, least squares

I am trying to solve a non-linear least squares problem like this. $$g(\sum _{1\le j\le J}c_jx_j^i) - f_{mod(i, q)} = y_i\text{ }(1\le i\le I)$$ We want to find $c_j$'s and $f_i$'s where $x^i_j $, $...
-1
votes
0answers
52 views

Derivative and Integral of polynomial with degree n

This question is related to Derivation and Integration in polynomial spaces, but since the questions were left unanswered, I decided to break those down to only one question. Question 14.2 We have a ...
1
vote
0answers
36 views

Dirichlet problem for Laplace equation in triangular grid

I need to find the solution in rectangle on an unstructured triangular grid, the example of grid here. I should estimate the values of function for the vertices of triangles. Five point discretization ...
1
vote
1answer
38 views

Power method for complex Hermitian matrices

How should the power iteration be modified to handle complex yet Hermitian matrices? Because the matrix is Hermitian, the eigenvalues are real. I realize that the power method will fail if the ...
-1
votes
2answers
31 views

Fourier transform of a constant [closed]

$I=\int_{-\infty}^{\infty}c\exp(-i\omega t)dt.$ The problem is given above. How to solve it numerically? The analytically solved answer is a real number. Thanks in advance.
1
vote
0answers
42 views

Solving for Floquet multipliers: solving over multiple periods

Everywhere that I've read about performing a Floquet analysis involves numerically solving the system over one period, with the identity matrix as initial condition. My system is fairly complex, has ...

1
2 3 4 5
254