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
1answer
15 views

Are the divided differences $f[a, b, c]$ and $f[a, c, b]$ equal to eqchother?

I was wondering whether the divided differences $f[a, b, c]$ and $f[a, c, b]$ were equal. I tried proving this by writing out the definition and got that those two are equal iff $-cf(b) + cf(a) + af(b)...
1
vote
0answers
8 views

Solving the BVP using finite differences and intuition regarding the form of the numerical solution?

Suppose we have $u'' + u' =0$ where $x \in (0,1)$ with the boundary conditions $u(0) =0, u(1) =1$. We consider the BVP finite difference approximation $\frac{u_{j+1} -2u_{j} + u_{j-1}}{h^2} + \...
0
votes
0answers
14 views

Understanding the rate of convergence of a numerical method (Euler's method)

I have recently implemented a function for Euler's method and I am trying to find some information about the rate of convergence for it, though I am failing to understand it. So far I have a set of ...
1
vote
0answers
23 views

Dodging to do conjugate gradient on the normal equations.

Let us consider the linear equation system $$\bf Ax = b$$ We can formulate it's normal equations: $${\bf A}^T{\bf Ax=A}^T{\bf b}$$ but these are often harder to solve, because ${\bf A}^T{\bf A}$ ...
1
vote
0answers
24 views

Solve integral of $f(\lambda)=\frac{\lambda^{\alpha+\beta}}{\prod_{s=1}^n (1/U_s+\lambda)^{\alpha+1}\prod_{s=1}^n (1/T_s+\lambda)^{\beta+1}}$

I need to compute the numerical value of this integral, hundred thousand of times, for a typical dataset. How can I get a solution or a good approximation for $$\int_0^\infty f(\lambda) d\lambda $$ ...
1
vote
0answers
21 views

Numerical Methods, Neville method of aproximation and Lagrange interpolation

So I have a set of points x = [0 2 7 8] and y = [3 0 15 7] respectively. I tried to approximate it using Neville Method and the ...
0
votes
1answer
30 views

Interpolation of a function at 4 points

Assume that the cubic polynomial a + bx + cx^2 + dx^3 interpolates a function f(x) at the four points (0,2), (1,-1), (2,1), (3,3). I'm trying to do a question that asks me to write down a system of ...
0
votes
0answers
18 views

How can we decide the robustness of an equation in floating point system?

Is there an objective metric for deciding whether or not an equation is robust or is it subjective? Can we rely on relative error to decide the robustness of an algorithm/equation? Say, if the ...
0
votes
1answer
46 views

Why is that the same equation with different x values produces drastically different round-off errors?

(1 + 1/n)^n approximates e^1. Case 1: When n is equally spaced between 10^4 and 10^9 with 10000 different numbers, linspace(10.^4, 10.^9, 10000) (Done in Matlab). Here's the graph: Case 2: When n is ...
3
votes
1answer
26 views

Finding the global error of a numerical method

For the IVP $u' = f(t,u), u(0) = u_0$, I have the following numerical method: $$U_0 = u_0 \\ U_{n+1} = U_n + hf \left(t_n + \frac h2, U_n + \frac h2f(t_n,U_n) \right)$$ I am asked to show the global ...
0
votes
0answers
25 views

Don't know which iterative method to use for specific x = f(x)

I have this equation $$ f(x) = \sum_{k=0}^{n} {a_k x^k} + b*sin(nx) $$ for given $b,a_0,a_1,...,a_n$ ($n$ being dependant on haw many $a_k$ are there) and I have to solve $x=f(x)$ using an iterative ...
3
votes
1answer
30 views

Show that the wedge product $ dX \wedge dX = 0 $ and $dY \wedge dY = 0$

So first I want to give you some background information: begin of the background information I'm currently reading an abstact about the Lotka Volterra differential equations: $$ x^{'} = x -xy $$ $$ ...
0
votes
0answers
22 views

Boundary for eigenvectors of perturbed tridiagonal matrix

Let $A = \left[\begin{array}{cccc} 2 & -1 & 0 & 0 \\ -1 & 2 & -1 & 0 \\ 0 & -1 & 2 & -1 \\ 0 & 0 & -1 & 2 \end{array}\right] \; \; $ and $H $ a ...
0
votes
1answer
43 views

Numerical Methods with MATLAB - A linear hyperbolic system

I am studying Numerical Methods for Conservations Laws with MATLAB by first time and I've tried to follow an example and calculate the solutions for the following Riemman Problem: $$\begin{bmatrix}u\\...
0
votes
0answers
28 views

Order of convergence. Example where the sequence is linearly convergent but not quadratically convergent?

Just curious, I am guessing there exists one so how would I find an example where the sequence is linearly convergent but not quadratically convergent?
5
votes
3answers
75 views

Identity of tan(x)

I came across the following formulas for analytical expressions of fundamental modes of asymmetric dielectric waveguide. $$ \tan(x) = x\frac{\pi^2-x^2}{\pi^2-4x^2} $$ This approximation is not present ...
0
votes
0answers
21 views

Integral Transform with logarithmic Differential

I'm currently tinkering with Z-HIT, a simplified version of the Hilbert transform and the Kramers-Kronig relation for application in impedance spectroscopy of two-poles that gives an approximate ...
0
votes
0answers
37 views

Unstable numerical solution of ODEs and PDEs

Choosing the right step size for a stiff ODE or a non-linear ODE and PDEs is an important factor. While studying a paper on choosing appropriate step size in numerically solving ODE, I questioned: ...
0
votes
0answers
5 views

How do you find the gradient of the edges (error estimation) in finite elements?

I am using the finite element method and need to find the errors associated with each of my elements. I am looking for help to find the error on the edges of the triangle, preferably by hand and not ...
0
votes
0answers
19 views

Numerical smooth interpolation

I want to learn smooth interpolation but when I searched to find a website to read about this I could not find anything. Please suggest a source or put a link.
0
votes
2answers
31 views

Second order Taylor method for solving ODE

Can anyone help me modify this code to second-order Taylor method? ...
1
vote
0answers
31 views

$A$ is continuous in $0_X$ => $\exists c \in \mathbb{R}$, $ c \geq 0$ : $||Ax||_Y \leq c ||x||_X $

the map $A : X \rightarrow Y $ is linear, where $(X,||.||)$ and $(Y,||.||)$ are normalized vector spaces. I already have a solution, which is correct but a friend of mine showed me his solution and ...
0
votes
1answer
28 views

How do you compute relative error when the exact solution is unknown?

I'd have a rather complex system of non linear ODEs and with a lot of help I've written an algorithm that solves them. I'd now like to compute the relative error, but I do not have a known solution to ...
0
votes
0answers
29 views

Rate of convergence what happens if the limit is $0$?

If $\lim_{k\to\infty} \left|\frac{x_{k+1}-L}{x_{k}-L}\right|$ = $0$. Is this still linearly convergent? I am confused as by definition it isn't but surely if the limit is $0$ that means the sequence ...
0
votes
0answers
11 views

Quadratic optimization with constraint on the number of non-zero elements

Given a positive semidefinite matrix $M$, how do I minimize $$ y^\dagger M y, $$ under the constraint that all but $k$ of the elements of $y$ should be 1? Equivalently, if $\bar{1}$ is the vector of ...
-4
votes
0answers
29 views

Newton's method how to find divergence initial [duplicate]

Find the smallest positive starting point for which Newton's method diverges when it is applied to $f(x)=\tan^{-1} x$.
0
votes
1answer
34 views

Solve initial value problem

I have an exercise that I do not understand. We have to solve an initial value problem: $$ \begin{array}{ccl} y'(t) &=& f(t,y(t)) \\ y(a) &=& y_0 \end{array} $$ We have to derive ...
1
vote
1answer
35 views

Truncation error with growing step size

When I read about finite difference methods (or really any approximation method), truncation error is often central to the discussion, and rightfully so. But it is also most often discussed in the ...
0
votes
0answers
26 views

Floating-point rounding error in numerical differentiation formula

In Numerical Analysis by Timothy Sauer (Pearson, 2nd Edition) it says that $\tilde{f'}(x+h) = f(x+h) + \epsilon_{\text{mach}}$, where $\tilde{f'}(x)$ is the floating-point representation of the given ...
1
vote
1answer
34 views

number of zeroes of arbitrary function

Sorry if I misused/mixed up some maths terms. I barely know any maths lingo, especially not in English. I was thinking about programmatically solving equations (or rather, approximating their roots), ...
0
votes
0answers
16 views

Why do the higher order of convergence not requiring the limit to be less than 1

Linear Convergence: if $\lim_{k\to\infty}$ $\mid\frac{x_{k+1}-L}{x_{k}-L}$ $\mid$ = $\alpha$ and $0<\alpha<1$ when we say that this is linear convergence. But how come the higher order ...
0
votes
2answers
22 views

What is meant by tridiagonal linear equation system?

I have to implement the SOR (Successive Over-Relaxation) method, using sparse matrices, to find the solution vector of these linear equations systems (for quite huge matrices): What does that tridiag(...
0
votes
1answer
30 views

Standard Runge-Kutta method, consistency order

Show that the explicit standard Runge-Kutta method with the process function $\varphi(t,y,h)=\frac16 (f_1+2f_2+2f_3+f_4)$ $f_1=f(t,y)$ $f_2=f(t+\frac{h}2,y+\frac{h}2f_1)$ $f_3=f(t+\...
0
votes
2answers
75 views

I really don't understand “The Shooting Method”

I am attempting to learn from a textbook that has the following question: The boundary-value problem $$ y'' = 4(y-x), \qquad 0 \leq x \leq 1, \qquad y(0)=0, \, \, \, y(1)=2 $$ has the ...
0
votes
0answers
18 views

Numerical Double Integration with inverse over inner integral failing using common methods and inbuilt functions

Implementing a paper, I want the value of this double integral which has endpoint singularities in both integrals. $\int_0^{\inf} \frac{1}{w} Im( 0.5^{-iw}({12{\int_0^1 (1 - (0.5+\frac{0.5} {1+by^\...
2
votes
0answers
23 views

prove $ ||u||_{L_2(\Gamma)} \leq (2||v||^2_{L_2(\Omega)} + 2||v||_{L_2(\Omega)} ||\nabla v||_{L^2(\Omega)})^{\frac{1}{2}}$

$$ ||u||_{L_2(\Gamma)} \leq (2||v||^2_{L_2(\Omega)} + 2||v||_{L_2(\Omega)} ||\nabla v||_{L^2(\Omega)})^{\frac{1}{2}}$$ for all $u \in H^1(\Omega)$ for the open unit circle $\Omega$ in $\mathbb{R^2}$. ...
1
vote
0answers
31 views

Euler's method to solve a differential equation

Apply Euler's method on the initial value problem $y'(t)=y(t)$ with $y(0)=1$ (in the interval $[0,1]$) and equidistant grid $I_h$, $h=\frac1n$. Give the approximation $y_h$ explicitly. This question ...
2
votes
1answer
50 views

Is it a valid claim that ODEs are easier to solve numerically than PDEs?

My final project in my Partial Differential Equations class involved studying one non-linear PDE in depth. In reading about my equation, I've realized that PDEs of 3 spatial variables can be re-...
-1
votes
0answers
18 views

zero flux boundary condition

I need to proof horizontal divergence with the zero flux boundary conditions such that \begin{equation} \boldsymbol{\nabla} \cdot \mathbf{u} = 0 \end{equation} where $\mathbf{u}=(u,v,w)^T$ and each ...
0
votes
0answers
52 views

Test if a function is continuous or has at least one discontinuous vertical asymptote between an interval

Imagine evaluating a function with little intervals incrementally across a graph and testing by using the end points of the each interval (and maybe a midpoint), whether the function is continuous for ...
1
vote
1answer
46 views

How to solve a non linear ODE with Newton's method?

Im trying to solve this ODE using the Newton method (for non-linear equations using Jacobian Matrix): $$ \frac{u''(x)}{(1+u'(x)^2)^{3/2}}=\frac TK u(x)+\frac{wx(x-L)}{2K} $$ original ode image $u(0) =...
0
votes
0answers
8 views

Is that a Neumann condition or a Dirichlet?

In a such problem: $\ u''''=f $ with boundary conditions: $\ u'(0)=u''(0)=u'(1)=u'''(1)=0$ Is $\ u'(0)=0$ and $\ u''(0)=0$ Neumann conditions or Dirichlet conditions ?
0
votes
0answers
29 views

How to solve a matrix dominated by zeros?

I am trying to solve a matrix of this form: Is there a known algorithm or a method to solve this kind of matrices more efficiently than a normal Gauß elimination method? I input the diagonals as ...
2
votes
0answers
31 views

Finding the real roots of a univariate polynomial on the interval [0,1]

I have numerous, univariate polynomials with degree in excess of 100 and with very, very large coefficients (Here's an example coefficient ...
-1
votes
0answers
8 views

Matlab Code for Robin and Neumann boundary for ode. [closed]

please can someone help me out. i need the matlab code for Robin and Neumann boundary condition for ode not pde.
0
votes
0answers
13 views

Motivation of Milstein scheme

Milstein scheme is motivated by improving the convergence speed sigma terms of Euler scheme. where sigma and mu is globally Lipschitz continuous$$t_i=\frac{T}{n}i\quad dX_t=\mu(X_t)dt+\sigma(X_t)dW_t$$...
1
vote
1answer
15 views

How to use Finite Difference Method solving ODE with Boundary Value Problems?

Using these formulas, it is clear how to solve the problem: For node 1, we have the boundary value on the left side, for ex. u(0) = 0 and for node 2, we use the formula replacing u'' with u_i-1 = (...
2
votes
2answers
52 views

fixpoint iteration to solve $y'(t)=y(t), y(0)=1$

Solve the initial value problem $y'(t)=y(t)$, $y(0)=1$ on the interval $[0,1]$ with a fixpoint iteration of the operator $T: Y\to Y, (Ty)(t):=y_0+\int_0^t f(s,y(s))\, ds$. Begin with $y_0(t)=0$ and ...
1
vote
0answers
17 views

How to implement Finite Difference Method ODE Boundary Value Problem in Python?

I implemented the Finite Differences Method for an ODE with Boundary Value Problem. Here is the approximations I used for the FDM: And here is the balk problem: with u(0) = u(L) = 0 (attached on ...
0
votes
0answers
12 views

Conceptual question on conditional expectations for numerically solving Backward SDEs

I am starting to study the field of Backward Stochastic Differential Equations (BSDE) and have a conceptual question on numerical techniques to solve them. BSDE are of the form: $$Y_t=F((B_s)_{0\leq s\...