Questions tagged [finite-differences]

A method in numerical analysis which consists of approximating the derivatives of a solution of an ordinary or a partial differential equation. This leads to the solution of a linear system.

Filter by
Sorted by
Tagged with
0
votes
1answer
17 views

Error term for backward differentiation formula

I am trying to derive the error term for the backward differentiation formula $f'(x) \approx \frac{3f(x)-4f(x-h)+f(x-2h)}{2h}$. By Taylor expansion $f(x-h)=f(x)-hf'(x)+\frac{h^2}{2}f''(x)-\frac{h^3}...
3
votes
0answers
24 views

Stability analysis for finite difference method (heat equation)

The heat/diffusion equation $u_t= u_{xx}$ with $-1\leq x \leq 1, \, t\geq 0$ given with initial condition at $t\geq 0$ and zero Dirichlet boundary condition is solved by the two step method $$ u_{m+2}^...
2
votes
0answers
19 views

Stability of semidiscretized scheme

Hi I am having problem discussing stability of a finite difference scheme for a pde. I was trying to solve point (ii) of this exercise: what I tried first is eigenvalue analysis. I wrote the method ...
0
votes
1answer
37 views

Computing derivative as accurately as possible by finite difference formula

The central difference formula is $D_h(x)=\frac{f(x+h)-f(x-h)}{2h}$. In the form $(x,f(x))$ am given the data points $(0.40, 2.3987), (0.44, 2.4182), (0.48, 2.4377), (0.52, 2.4571), (0.56, 2.4764)$. ...
1
vote
0answers
17 views

Stability Analysis of Multi-Level PDE Difference Equation

I am working with the following problem: $$v_t = \nu v_{xx}\quad v(x,0) = f(x)$$ I would like to analyze its stability using the discrete Fourier transform but have two questions: How do you deal ...
0
votes
1answer
14 views

Centered difference scheme with half step size

I am trying to solve a Fokker-Planck equation of the form $$\frac{\partial P(x,t)}{\partial t} = \frac{\partial}{\partial x}[A(x)P(x,t)]+D \frac{\partial^{2} P(x,t)}{\partial x^{2}}$$ using the ...
0
votes
2answers
25 views

What is a closed form for this combinatorial sum?

Primarily I wanted to solve the recurrence system $$c_k=\frac 1p{p\choose k}-c_{k-1},\\c_0=0,$$ for any integer $$1\le k\le \frac{p-1}{2},$$ where $p$ is any odd prime. I was only able to see that $...
0
votes
1answer
25 views

Necessary stability condition for a second order discrete time system $x(k+2) = Ax(k+1) + Bx(k)$

Let $x(k) \in \mathbb{R}^n$, $A \in \mathbb{R}^{n\times n}$, $B \in \mathbb{R}^{n\times n}$. Consider the following discrete time system: $$x(k+2) = Ax(k+1) + Bx(k)$$ where $x(1) = Ax(0)$ and $x(0) \...
1
vote
1answer
61 views

Maxwell's Equation in Empty Space

Consider Maxwell's equation $$ \begin{cases} \frac{\partial B}{\partial t} = - \text{c} \cdot \text{curl} (E), \\ \frac{\partial E}{\partial t} = \text{c} \cdot \text{curl} (B), \\ \text{div} (E) = 0, ...
0
votes
0answers
17 views

Error for multivariate finite difference for gradient and hessian

For multivariate functions, the gradient can be approximated component-by-component: $[∇f(x)]_i ≈(f(x + h*e_i) − f(x))/h$ , where $e_i$ is the $i$th unit vector (0, . . . , 0, 1, 0, . . . , 0) having ...
0
votes
0answers
19 views

How do I apply the finite difference method to a torsion equation?

So I've previously used the method to determine temperature across a thin plate. But my textbook doesn't what to do when the second derivates of space (x and y) are equal to a function. I'm trying to ...
0
votes
0answers
12 views

If I want to calculate derivatives at a point using finite difference method, how to set rhs in Matlab so it computes correctly?

This question involves Matlab code, but is more about mathematics, so I post it here. My code that calculates derivatives at a given point using finite difference method doesn't work and I think it's ...
0
votes
1answer
44 views

Unusual quadratic property

We were learning about functions in our class, and there came a question: If $f(x+2)-5f(x+1)+6f(x)=0$ $f(0)=2$ and $f(1)=5$, what is f(x)? My approach: I found $f(2),f(3)$,..... And they don't seem ...
2
votes
1answer
26 views

Eigenvalues of Schrödinger equation using finite differences with Neumann BC

I am having some troubles with discretizing a 1D Schrödinger equation via finite differences. The equation that I am trying to solve numerically is of the following form $$ -u^{\prime \prime} +\left (...
2
votes
0answers
23 views

Geometric mean of finite difference upwind and downwind

For numerical approximation of a first derivative of some function $f$, there are three standard finite difference schemes: the upwind $(f(x+h)-f(x))/h$, downwind $(f(x)-f(x-h))/h$, and central $(f(x+...
0
votes
0answers
8 views

Discretization error of implicit finite difference scheme with robin boundary by maximum principle

I am handling the following heat equation with Robin condition by implicit finite difference scheme: \begin{cases} u_t = \frac{1}{2}u_{xx}, (t,x) \in [0,T]\times[0,1], \\ u(t,0) = 0 = u(0,...
0
votes
1answer
19 views

Why is ODE15s ignoring my boundary conditions for the Fishers equation?

I'm attempting to solve the Fishers PDE on $(x,t) \in (0,1)\times (0,T)$ by spatially discretising (method of lines) and then feeding the time derivative to ODE15s (therefore creating a system of ODEs)...
0
votes
1answer
44 views

What is the best numerical method of approximation of the derivative?

If I want to compute an approximation of the derivative of a simple function like $\cos$ and I can choose between finite differences and the derivative of the polynomial interpolating some given ...
1
vote
2answers
23 views

Centered difference approximation derivation

I am reading in Saad - "Iterative Methods for sparse linear systems" where the centered difference approximation is discussed. Let $U\subset \mathbb{R}$ be a domain and $u\in\mathcal{C}^4(U)$. We ...
1
vote
1answer
26 views

Forward difference operator eigenvalues and eigenfunction in $\mathbb{Z}_+$

I would be greatful to someone famililar with operator theory to verify if my though process and calculations are correct. Consider $x \in \mathbb{Z}_{+}$ and consider the following finite difference ...
1
vote
1answer
34 views

Linear difference equations and kernels

A linear difference equation with constant coefficients can be written as a polynomial in the shift and identity operators (denoted here by $S$ and $I$), and then factored. $$0 = x_{n+2} - 5x_{n+1} + ...
1
vote
1answer
54 views

Derivation of third-order Rusanov method for linear convection equation

I've been wrestling for a number of days with the following scheme of the one dimensional first-order hyperbolic linear convection equation, $$ u_t+cu_x=0 $$ Introduce a set of points $x_j = jh$ ...
1
vote
0answers
10 views

Compatible initial condition for the numerical scheme of PDE

I have to solve numerically the following PDE ($0<t_0<t$): $$\partial_t H(x,t,t_0) = \partial_x^2 H(x,t,t_0)+(1-2U(x,t))H(x,t,t_0)$$ with the initial condition: $$H(x,t=t_0,t_0) = U^2(x,t_0)$$ ...
0
votes
1answer
16 views

Finite difference derivatives for angle variables with jumps

I am looking to numerically approximate derivatives using finite differences, for instance $$ \frac{d\phi}{dx} \approx \frac{\phi(x_i+h) - \phi(x_i)}{h} = (D \vec{\phi})_i, $$ where $D$ is the ...
1
vote
0answers
30 views

Solve a polynomial in connection with the numerical solution of diffusion equation by finite volume

Hope everybody is safe during this COVID-19 pandemic! I am having an issue numerically solving the following coupled diffusion equation with concentration dependent coefficients and need some ...
0
votes
0answers
16 views

General procedure for calculating Local and Global Truncation error for a finite difference method

This question is a bit general, but hopefully that's ok, as I expect there to be clear, non-opinionated answers. I've been looking all over the internet, in textbooks and lecture notes etc., and I ...
0
votes
0answers
7 views

Truncation error of Crank-Nicolson Scheme with derivative boundary condition

I am handling a heat equation defined on $(t,x) \in [0,T]\times[0,1]$ with Robin boundary condition: \begin{equation} \begin{cases} -u_t + \frac{1}{2}u_{xx} = 0 \\ u(t,0) = u_1(t) \\ ...
0
votes
0answers
9 views

Prove that the explicit scheme for the heat equation is stable under the CFL condition.

I have the heat equation: $\frac{\partial u}{\partial t} - \nu \frac{\partial^2 u}{\partial x^2} = f$ for $(t,x)\in (0,+\infty) \times (0,1)$. I want to prove that the explicit scheme is stable under ...
0
votes
0answers
13 views

The monotonicity of a special sequence

Recently, I want to obtain the monotonicity of the given sequence: $$\omega^{(k)}_{\ell} = \frac{\tau^{-\gamma(t_{k - \ell})}}{\Gamma(2 - \gamma(t_{k-\ell}))} \big[({k - \ell})^{1 -\gamma(t_{k - \ell}...
0
votes
1answer
28 views

Numerical Methods for Heat Equation under mixed condition

I am looking for some references of numerical methods to solve the heat equation of the form $$u_t = \alpha u_{xx}, \ t>0, x\in [0,l]$$ with mixed Dirichlet and Robin condition: $$u(0,x) = 0, \ u_x(...
0
votes
0answers
38 views

Approximate $f(x,y,z)-f(0,0,0)$ given $f(x,y,0)$, $f(x,0,z)$ and $f(0,y,z)$

I am trying to approximate $f(x,y,z)-f(0,0,0)$ given $f(x,y,0)$, $f(x,0,z)$ and $f(0,y,z)$. I am ready to make any simple assumption for missing information as long as it fits the given information. I ...
0
votes
0answers
54 views

How to solve the nonlinear partial integro-differential equation by the finite difference method?

How to solve the following nonlinear partial integro-differential equation? Suppose the following equation: $m \ddot{v}+c_{1} \dot{v} + D\left(v^{\prime \prime \prime}+v^{\prime} v^{\prime \prime 2}+...
0
votes
1answer
30 views

The approximation of the first derivative at x in order 3

I need to approximate the derivative $u'$ at the point $x$ by taking the points $x−h$, $x+h$ and $x+2h$ into account, and the order should be 3. we suppose that the function $u$ is regular. My ...
1
vote
1answer
55 views

Discretization of $\nabla\cdot (u\nabla v)$ for chemotaxis

I am considering the following set of PDEs: \begin{align} \frac{\partial u}{\partial t} &= f(u,v) - \chi \nabla\cdot \left(u\nabla v\right)+d\Delta u\\ &= f(u,v) - \chi\nabla u\cdot \nabla v -...
0
votes
1answer
17 views

Numerical analysis for PDE using finite difference method

How we can solved 2nd part to obtain unique solution for the above scheme i start firstly integrating both sides to get $u'(a)-u'(b)=\int_{a}^{b} f(x)dx=0$ Now how i will continue ??
0
votes
1answer
44 views

orthogonal eigenvectors of Toeplitz matrix.

Let $A\in\mathbf{R}^{NxN}$ be a matrix of the form \begin{pmatrix} 2 & -1 & 0 & \cdots & \cdots & \cdots & \cdots & 0\\ -1 & 2 & -1 & 0 & & & &...
2
votes
0answers
35 views

Developing a Finite Difference Scheme for a non-linear PDE

I came across this question while studying for an exam: Consider the equation $$u_t = u u_{xx} + uu_{x} $$ to be solved for $t > 0$, $0 < x < 1$, with $u(0,t) = u(1,t)$, $u_x(0,t) = u_x(1,t)$...
0
votes
0answers
32 views

Eigenvalues of Laplace operator under Neumann boundary conditions

I'm trying to numerically calculate the eigenvalues of the Laplace operator under Neumann boundary conditions utilising a 5 point stencil approximation scheme. Starting with the case of Dirichlet ...
0
votes
0answers
37 views

Solve heat transport equation numerically with forward finite differences and explicit timestep

I am working on numerical solutions to the diffusion equation and came across a counter-intuitive phenomenon. Let's stay in 1D for this. The diffusion / heat transport equation is ($f$ my state ...
2
votes
1answer
49 views

numerical solution of 1-d heat equation with mix boundary condition not converge

Consider the following heat equation: $$ u_t=u_{xx} \quad\text{ on }\quad(0,\pi) $$ with mix boundary condition $u'(0)+u(0)=0$ and $u'(\pi)+u(\pi)=0$. The eigenfunctions of the laplacian are $$ e^{-x}...
0
votes
0answers
9 views

Discretization of differential of a map on discrete manifolds.

Suppose $N$ and $M$ are two regular submanifolds of $\mathbb{R}^3$. Suppose you discretize these as meshes, and for simplicity assume they have same number of vertices and connectivity. Suppose $F:N\...
0
votes
0answers
14 views

Finite difference method applied to non-linear equation

I'm trying to understand my professor's notes regarding applying the finite difference method to non-linear equations. We're told that, we're given the equation $u_{t} = u_{xx} + f(u)$, where $f$ is a ...
0
votes
0answers
26 views

Coefficients for the three-dimensional discrete Laplacian

I am trying to numerically solve $u_{xx} + u_{yy} + u_{zz} = 0$ using a 27-point stencil, meaning each node in my finite difference domain interacts with every node in a $3 \times 3 \times 3$ cube ...
0
votes
0answers
23 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_{...
1
vote
0answers
38 views

Stabilizing Upwinding of Transport Equation with Varying Velocity and Large Gradients

I am attempting to solve the following transport equation using a 2D finite-difference scheme $$c_t+\mathbf{v}(c)\cdot\nabla c=\frac{1}{Pe}\nabla^2 c,$$ where $c$ is modeling a local concentration, $...
3
votes
1answer
179 views

Uncertain how to set up the Neumann boundary conditions for Heat Equation Implicit FDM

To smooth stock price data, I am currently looking to apply the heat equation $$ u_\tau - \kappa u_{xx}=0 $$ with Neumann boundary conditions $$ \frac{d^2u}{dx^2}(x_{min}+\Delta x, \tau)=0 \\ \frac{d^...
1
vote
0answers
23 views

Two-Dimensional Steady-State Heat Flux

Thank you in advance for any help with this assignment. I promise, I have spent hours trying various sources to understand these terms and operators, but I just cannot make the fundamental leap ...
3
votes
0answers
35 views

Numerical Scheme for Heat flow between two materials with different conductive properties.

I am trying to write a simulation in MATLAB for a $1D$ heat flow problem in which there are two materials in contact with each other but with different thermal properties. The results are unstable so ...
3
votes
0answers
21 views

How to use finite difference in this situation?

I want to compute Dupire's local volatility, but I'm struggling since several days. Here is the formula to get the local variance, with $y=\ln \left(\frac{ K}{F} \right)$ and $w=\sigma_{BS}^2\,T$, and ...
0
votes
0answers
17 views

Solving a second order difference equation

In my homework, it is requested to determine the magnitude and phase of the frequency response of the system in terms of a and k, and choose the value of k such that the maximum value of the magnitude ...

1
2 3 4 5
12