Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [numerical-methods]

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

0
votes
0answers
12 views

Solving a system of non linear equations (which can be solved in some special cases)

I am trying to solve the following system of $n^2$ equations for $X$ $c_i^\top (A_{i,i} B + X)^{-1}(A_{j,j} B + X)^{-1} c_j = I_{i,j}, \forall i,j\in\{1,\dots,n\}$ where $c_i$ is an $n$-dimensional ...
0
votes
0answers
17 views

How to determine the following function at x=0.1 by four-digit rounding arithmetic?

$f(x) = \frac{xcosx - sinx}{x - sinx}$ The answer from the back of the book is -1.941. But I got 1... cos(0.1) ≈ 1 by four-digit rounding arithmetic. sin(0.1) ≈ 0.001571 So, $\frac{(0.1)(1) - 0....
0
votes
0answers
10 views

Sufficient conditions for bounded output of a linear multi-step method

The system: \begin{align} \dot{x}(t) &= f(x(t))\\ x(t_0) &= x_0 \end{align} is being solved by a linear multi-step method (assume perfect initialization): \begin{equation} \sum_{j=0}^sa_j\...
0
votes
1answer
21 views

Trapezoid method for system

For $\alpha \geq 0$ and $\beta \in \mathbb{R}$, we consider the system $$x'(t)+\alpha x(t)=-\beta y(t), t \geq 0, \\ y'(t)+\alpha y(t)=\beta x(t), t \geq 0, \\ x(0)=1 \\ y(0)=2.\\$$ I want to state ...
0
votes
0answers
7 views

Show that the maximum value is less than $|y_0-z_0|$

$f$ satisfies Lipschitz condition. For given initial values $y_0, z_0\in \mathbb{R}$ we consider the following problems: \begin{align*}&y'=f(t,y), \ \ a\leq t\leq b \\ &y(a)=y_0\end{align*} ...
1
vote
2answers
49 views

Show that sequence converges of $r_2$

We have the function $f(x)=x^2-x-12=0$ with roots $r_1=-3$ and $r_2=4$. We consider the sequence $x_{n+1}=g(x_n), \ n=0,1,2,\ldots $ where $g(x)=\sqrt{x+12}$. We want to show that $x_n\rightarrow ...
1
vote
0answers
20 views

Numerical methods for PDE- solve partial integral differential equation with time dependant input

I am a bit a newbie when to PDEs and especially the numerical solution of such. I am looking for some advice on how to integrate an equation which has derivative terms, integral terms and some ...
1
vote
2answers
36 views

Norm-preserving implicit numerical method

Consider the implicit single-step method $$x_1 = x_0 + h A(x_0 + x_1)$$ where matrix $A$ is skew-symmetric. Show that this method preserves the norm, i.e., $\|x_1\| = \|x_0\|$. I don't really know ...
1
vote
2answers
30 views

How do I construct a second order convergent fixed point iteration?

Say I am dealing with $f(x) = x^3+2x+1$ and I need to come up a fixed point iteration to find its root, that has a second order convergence. How should one approach this question? Should I just ...
0
votes
0answers
22 views

Numerical Integration of the Variational Equation for Lorenz System

I'm having some difficulties implementing a numerical computation. I'm integrating the Lorenz system: \begin{gather} \dot x = \begin{pmatrix} \dot x_1 \\ \dot x_2 \\ \dot x_3 \end{pmatrix} = X(x) = ...
0
votes
1answer
22 views

Computational complexity of $x x^H$

Assume $x\in \mathbb{C}^{n\times n}$. What is the computational complexity (cost) of $x x^H$ where $H$ is the conjugate transpose? I know this gives a symmetric matrix and we can divide by $2$ the ...
1
vote
1answer
47 views

Riemann sum not converging

I am trying to find the volume of a hemisphere by numerical integration. I have a set of points equally spaced over x-y plane. I am trying to calculate its volume by trying to evaluate Riemann sum. $$...
1
vote
0answers
16 views

What are possible ways to update the Hessian if the calculated gradient is negative in BFGS algorithm (Quasi-Newton method)?

When applying the globalized BFGS algorithm (Quasi-Newton Method, optimization, minimization) to approximate the minimum of a function using the Quasi-Newton-Method, sometimes one can get a negative ...
2
votes
1answer
33 views

Show: $||u_n||_X \leq \gamma^{n-1} ||u_0||_X$ $\mbox{ } \mbox{ }$ $\forall n \geq 1$

Let $H$ be a Hilbert space with norm $||.||_X$ and scalar product $(.,.)_X$ , which is the direct sum of the subspaces $V$ and $W$. Regarding $V$ and $W$ it holds the intensified Cauchy Schwarz ...
-1
votes
0answers
36 views

Averaging higher order term

$d\theta/dt =-1-\epsilon z \cos\theta \sin\theta$ $dz/dt=\epsilon(r^2-T)$ $dr/dt=-\epsilon rz\sin^2(\theta)$ After averaging,I got : $d\phi/dt=-1+O(\epsilon^2)$ $d\zeta/dt=\epsilon(\rho^2-T)+O(\...
0
votes
0answers
36 views

Solving this problem with SQP method [on hold]

Hi everyone I want to Minimize this function with (SQP) method with these conditions : Initial Starting Points : $$ x_1=2.4 $$ $$ x_2=1 $$ $$ Tolerance = 0.1 $$ $$ \operatorname{Min} F(x)=40 - ...
1
vote
2answers
33 views

derivation of order 3 method for differential equations

I am stuck with a big problem. Trying to understand the proof that the numerical method of solving differential equation $x_{i+1} = x_i + \tau_iF(t_i+\frac{\tau_i}{2}, x_{i+\frac{1}{2}})$ $...
0
votes
1answer
24 views

Newton method non-linear systems envolving curves

I have to solve the following system: $$ x'(t) \times y'(s) = 0 $$ $$ (y(s) - x(t)) \times y'(s) = 0 $$ Where: $$ x(t) = (cos(t), sin(t)) $$ $$ y(s) = (s, s^2) $$ using Newton's method for non-...
1
vote
0answers
10 views

solving rotation matrix angles using Gauss-Newton

I am attempting estimate the three angles of a rotation matrix that has been applied to a known set of vectors using the Gauss-Newton method through direct observation the rotated vectors that have ...
1
vote
0answers
70 views
+50

In-Situ Combustion Model - MATLAB code

I need to solve in MATLAB the following system: And for it I would like to use these datas and scheme (Crank-Nicolson) With this initial condition: I really do not know how I can do this on MATLAB. ...
0
votes
0answers
11 views

Trying to evaluate high variance in large dataset

So I have an large active dataset, recording speed tests of connections. I am looking for the best approach to identify possible problem connections. To do this I started by looking at averages etc. ...
-2
votes
0answers
23 views

What is a minimum $x^*$ of a function f(x). [on hold]

"An important problem in numerical computing is finding a minimum $x^*$ of a function f(x). ". What does that mean? What is a minimum $x^*$ of f(x)?
0
votes
1answer
29 views

Error Propagation Using an Exponential Function.

Consider the programming problem of estimating the correct value of $2^{x}$, where $x$ is an irrational number entered with a precision of 500 binary bits. (1) How accurate (in terms of bits) is the ...
0
votes
0answers
21 views

How to find norm $||U_n||$ of Chebyshev polynomials of the second kind?

how to find norm $||U_n||$ and the values $U_n(\pm)$ of the Chebyshev polynomials of the second kind?
0
votes
0answers
26 views

Want to compute product of Bessel and Hankel function in Matlab - $J_m(x)\cdot H_m^{(1)}(y)$ - but large order or argument returns 'inf'?

I am trying to compute (in Matlab) the product of a Bessel function and a Hankel function where the order $m$ of the functions may be very large and/or the arguments $\alpha x$ and $\alpha y$ of the ...
0
votes
0answers
32 views

Change numerical integration range when using Gaussian quadrature

I have a little problem related to numerical integration. If someone knows the solution I would be very grateful for sharing. I'm calculating numerical integrals using Gaussian points $x_{1} , x_{2} ,...
1
vote
0answers
34 views

Pseudo-spectral integration of PDE $f_t - \mathcal{H}[f]\, f_x = 0$ containing Hilbert transform

While reading the research paper [1], I came across the following equation and I am unable to solve it. $$\frac{\partial f}{\partial t}−\mathcal{H}(f)\left(\frac{\partial f}{\partial x}\right)=0 $$ ...
1
vote
1answer
13 views

Error Estimate of Hermite Cubic Piece-Wise Interpolation

Assume $s_i$ is the Hermite cubic polynomial interpolation on $[x_i,x_{i+1}]$ such that $s_i(x_i)=f(x_i), s_i(x_{i+1})=f(x_{i+1}), s_i'(x_i)=f'(x_i), s_i'(x_{i+1})=f'(x_{i+1}), i=0,...,n-1$. For ...
0
votes
1answer
34 views

Area of a Triangle (and the beginning of barycentric coordinates)

Let the dimension be $n=2$ and $T$ a Triangle with positive area $|T|$ and the corners $P_1, P_2, P_3 \in \mathbb{R}^2$. How do I show: $2|T|=\det \begin{pmatrix} 1 & 1 & 1 \\ ...
0
votes
1answer
26 views

Find a suitable zero equation to solve the optimization problem $\min_{x \in \mathbb{R}^N} f(x)$

Suppose we have an optimization problem for this general form of $f: \mathbb{R}^N \rightarrow \mathbb{R}$ $$\min_{x \in \mathbb{R}^N} f(x)$$ and this problem is solvable. How could I construct a ...
0
votes
2answers
34 views

Arithmetic Precision

I am reading a paper which states that four-byte arithmetic has accuracy $\delta \sim 10^{-7}$. Now as I understand it there are 8 bits in a byte so that makes 32 and one bit is used for the sign, 8 ...
0
votes
1answer
51 views

multi-step method, consistency order with Taylor expansion

We search the highest order for the multi-step process $y_{k+2}-(1+\alpha)y_{k+1}+\alpha y_k = h(\frac{3-\alpha}{2}f_{k+1}-\frac{1+\alpha}{2}f_k)$. It is $f\in C^3$. We find $\alpha$ with ...
1
vote
1answer
28 views

How to make use of this iterative scheme for solving the neutron diffusion equation?

I am trying to solve the neutron diffusion equation to model neutron flux distribution in a one-dimensional two-group setting using the following iterative scheme. The governing equations of the ...
1
vote
1answer
79 views

Rearrange a matrix into a diagonally dominant form and solve it using iterative method

I have the matrix and I solve the system using iterative method From $Ax=b$, matrix $A$: $$ \begin{bmatrix} 2 & 3 & -4 & 1 \\ 1 & -2 & -5 & 1 \\ 5 & -3 &...
0
votes
1answer
30 views

Computing the order of accuracy of a numerical method

I am solving an advection-diffusion equation \begin{equation} u_{t}=au_{x}+Du_{xx} \end{equation} by some numerical method in matlab, the numerical solution matrix is denoted by Ynum, while the exact ...
2
votes
4answers
93 views

Prove $f(x) = x \sin(\frac{1}{x^{2}})$ is uniformly continuous on $(0,\infty)$

I am having trouble with the following problem: Prove $f(x) = x \sin(\frac{1}{x^{2}})$ is uniformly continuous on $(0,\infty)$. I have tried using the theorem (stated generally): if $f(x)$ is a ...
4
votes
1answer
49 views

Gauss Legendre quadrature problem with Legendre polynomials composed with square root

Let $P_n$ be the orthogonal Legendre polynomial with a degree of $n$, meaning it satisfies the following recursive formula: $$(n+1)P_{n+1}(x)-(2n+1)xP_n(x)+nP_{n-1}(x)=0$$ where $P_0(x) = 1$ and $P_1(...
0
votes
0answers
29 views

Finite element and dual basis

I trouble to understand what I think is a really important part of finite elements. The definition for finite elements in our lecture notes is the one by Ciarlet: Let $(T,P,L)$ be a triple such that:...
2
votes
1answer
71 views

Integral $\int_0^\infty\frac{\exp(i\alpha\cos u)-J_0(\alpha)}{1+\beta u}\mathrm{d}u$

I was studying the motion of a particle in a certain magnetic field and one of the quantities that arose was given by the titular integral $$ F(\alpha,\beta)=\int_0^\infty\frac{\exp(i\alpha\cos u)-J_0(...
-2
votes
0answers
21 views

Matlab code for Neumann Boundary Condition

Use the central difference method with $(1)$ the first approach (one-sided expression) and, $(2)$ the second approach (second order accuracy) to solve: $$u''=\exp(x),\space0<x<1$$ $$u'(0)=0, \...
3
votes
2answers
148 views

Solution of a nonlinear equation

I have the following equation that I need to solve $$ \prod_{i=1}^{2n}(\lambda-\lambda_i) = (\lambda^2+\lambda\alpha_n-\gamma_n)\prod_{i=1}^{2n-2}(\lambda-\mu_i)-(\lambda\beta_{n-1}-\delta_{n-1})\...
0
votes
0answers
25 views

Maximum step size in solving system of partial integro differential equations with forward Euler

Given the following system of two coupled, non-linear partial integro-differential equations \begin{equation} \begin{aligned} \frac{\partial f(x;t)}{\partial t} =\ & b\int\limits_{-L}^L dz \int\...
0
votes
0answers
32 views

Why does the computational error of this matrix exponential algorithm has this shape?

Matrix exponential is defined as: Why is that the computational error decreases until around k = 75, then it stays the same? Is it because the factorial is too big, and because Matlab only uses 16 ...
1
vote
0answers
23 views

Computing Hessian in Python using Finite Differences

I am computing the Hessian of a scalar field, and tried using numdifftools. This seems to work, but was quite slow so I wrote my own approach using finite differences. Here is my code for the Hessian:...
5
votes
0answers
102 views

pi approximation with Newton's method to an arbitrary rate of convergence

If $a_1$ to $a_3$ is the solution of this linear system of equations \begin{array}{rrr|r} -1&2&-3& -1\\ 1&-8&27&0 \\ -1 & 32 & -243 & 0 \end{array} then $f_3(x) = ...
1
vote
1answer
53 views

Alternative proofs Matrix Determinant Lemma

Well as many of you know wiki has a beautiful proof for the Matrix Determinant Lemma Wiki's Proof But: How the hell is one supposed to get there on his own? There is no way that when a professor ...
0
votes
1answer
19 views

Showing a Chebyshev set

I want to show that $\{1,e^{ix},...,e^{(n-1)x} \}$ is a Chebyshev Set on $(0,2\pi]$. Now I know that $\{1,x,...,x^n \}$ is one and that $e^{ix}$ is injective on $(0,2\pi]$. But how do I show that if I ...
0
votes
0answers
25 views

Angle between left and right tangent to the graph

I am supposed to determine the angle between the left and the right tangent to the graph g, in the point $$\left [ 1, \frac{\sqrt{3}\pi }{6} \right ]$$where $$g(x)=\frac{1}{\sqrt{3}}\arcsin \frac{2x}{...
0
votes
0answers
19 views

absence of CFL like condition in numerical schemes of elliptic pde

Numerical schemes for heat equation (parabolic $u_t=cu_{xx}$) and conservation laws(hyperbolic, $u_t+f(u)_x=0$ ) have restriction on the ratio of mesh size (i.e. $dx$ and $dt$ ratio). Why don't we ...
0
votes
1answer
27 views

FEM method infinite dimension vs discretization of test functions on elements.

So I was just curious, with the finite element method you typically multiply both sides of the equation with a infinitely differentiable function on the entire domain that satisfy boundary conditions. ...