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 [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.

0
votes
0answers
7 views
2
votes
0answers
42 views

Obtaining linear tridiagonal system from PDE in hydraulic fracturing

I'm trying to re-solve the governing equations in hydraulic fracturing modeling $$ \frac{\partial q}{\partial x} + \frac{2hC}{\sqrt{t-\tau(x)}} + \frac{\partial A}{\partial t} = 0 , \qquad 0<x&...
0
votes
0answers
8 views

Discrete equivalent of Sobolev norms and numerical experiment

I am solving a boundary value problem (BVP) that involves a system of equations (similar to the Euler or Navier-Stokes equations) for which, at this moment, there exists no sufficient theory to define ...
0
votes
0answers
14 views

Stability for 1D heat equation

I'm trying to show stability of the 1D heat equation : $u_t=\alpha u_{xx}$ for forward time and central space. It is supposed to be stable for $\lambda =\alpha\frac{\Delta t}{\Delta x^2}\leq\frac{1}{...
0
votes
1answer
31 views

finite difference formula and its stencil

I would like to prove the following finite-difference formula for functions $u$ and the flux $f$: $$\frac{u_{i}^{n+1}-u_{i}^{n}}{\Delta t}+\frac{-f\left(u_{i+2}^{n+1}\right)+8 f\left(u_{i+1}^{n+1}\...
0
votes
0answers
5 views

Determine finite difference stencil widths

Given a finite difference scheme in which has both spatial and time variation(x,t), the spatial index is the subscript, time index is superscript, how do I determine the stencil widths K_1,K2,L_2 as ...
0
votes
1answer
22 views

Difference approximation of poission equation, find coefficients

Question: Assume we want to solve the poisson equation $$ \Delta u = f(x,y), \quad (x,y) \in \Omega $$ $$ u = g(x,y), \quad (x,y) \in \delta \Omega $$ using the five-point method. Modify the method ...
-6
votes
1answer
234 views

The Crank - Nicolson scheme [closed]

How can I show that the Crank-Nicolson scheme for the PDE $u_t = b u_{xx}$ satisfies the estimate $\Vert v^{ n+1}\Vert_{ \infty}\le \Vert v^{ n}\Vert_{ \infty}$ if $2 b \mu \le 1$? Here, $b$ is a ...
0
votes
0answers
15 views

Tricky system of differences

We have a sequence $q(1,k)=q(1,k+44)$ for $k\geqslant0$ with special conditions, which gives us $q(1,k)=q(1,k±22)$ $q(1,11)=q(1,11(2m+1))=12$ and the first terms are $$0,2,4,6,8,6,8,8,10,10,12,12$$ ...
2
votes
1answer
63 views

Approximation Error in a Finite Difference Approximation of $\Big(f'(x)\Big)^2$

First Part: (First-order derivative) Assuming $f$ is an infinitely differential function everywhere, the Taylor series of $f(x + h)$ at $x$ is \begin{align}\tag{1} f(x + h) = f(x) + hf'(x) + \frac{1}...
0
votes
0answers
14 views

Finite Difference Methods Optimal Weights

I am looking at a paper by Ronald Smith 1999, (attached). The optimal weights he claims, obtains exact results for the Area, Centroid, Variance, Skewness and Kurtosis of solutions to the unforced ...
0
votes
0answers
8 views

Inconsistent finite difference scheme

I have the following: The Equation $$b\frac{\partial u}{\partial t} + \frac{\partial u}{\partial t} - c(x,t) = 0$$ b is a constant. The Equation is approximated at point $(x_i, t^n)$ in the $x-...
0
votes
0answers
38 views

Finite difference for non-uniform unstructured mesh/stencil

Below I have shown my non-uniform unstructured mesh (as in there is no pattern between the relative size of $h_i$ and $h_{i+1}$ etc. I've made the following equations using nodes $i-1$, $i$, and $i+1$...
0
votes
0answers
12 views

Prove finite difference operator on 1D heat is bounded

Could someone please check my answer and tell me if it is correct or what may be wrong? Question: Prove the operators $R_k$ for the 1D heat equation with forward Euler time stepping is a uniformly ...
0
votes
0answers
28 views

prove d/dx is bounded on L^2

Can someone take a look at my answer and tell me what I am missing, also, what do you think this problem is trying to teach me? Problem The functions $f_n=x^n$ are square integrable and continuous ...
0
votes
0answers
14 views

Proving consistency of 1D heat equation

I have a text that defines consistency as : $\lim_{k \to 0} \frac{1}{k} ||R_ku(t)-u(t+\Delta t)||$ Where $k = \Delta t$, and $R_k$ is a finite difference operator. The book then says it verifies ...
1
vote
0answers
12 views

Consistency versus convergence

In regards to approximating partial differential equations with finite difference, is there a difference between consistency and convergence? Because I am not seeing it. Consistent scheme : Discrete ...
3
votes
1answer
36 views

Adding artificial dissipation to continuity equation

I'm trying to solve the system of equations that relates to blood flows in arteries i.e. flow in elastic tubes. The system looks as follows $$\frac{\partial A}{\partial t}+\frac{\partial\left(Au\...
0
votes
0answers
29 views

Matrix representation of a finite difference with Neumann boundary conditions

Given 1D data $[c_1,c_2,c_3,\cdots,c_N]$ I can represent the derivative operation as a matrix product. For example, using the central difference $$ \left.\frac{\partial c}{\partial x}\right|_k \...
1
vote
1answer
29 views

Finite difference stability problem

My apologies for the title I'm not quite sure how to title a problem like this. I need to show the following result: $$u_j^{n+1} = e^{\Delta t\partial/\partial t}u_j^n$$ Where $u_j^n$ is the ...
0
votes
0answers
14 views

Is it possible(or even useful) to assume independence between variables in finite differences

$f(x, y)$ is an unknown function and I would like to estimate $\frac{\partial f}{\partial x y}$ with finite differences. Normally I would say: \begin{align} \frac{\partial f}{\partial x \partial ...
0
votes
0answers
21 views

FDM variable coefficients

Usually authors of the books demonstrate the usage of FDM on the following equation $\frac{\partial f}{\partial t} - a\frac{\partial^2 f}{\partial x^2} = f(x,t)$ where $a$ is some constant. Is it ...
4
votes
2answers
107 views

Proving $∆^nf(x_0;h_1,\cdots,h_n)=f^{(n)}(ξ)h_1\cdots h_n$

Let's define finite differences of order $n$ in $x_0$ for a function $f$ as: $$\Delta ^1 f(x_0;h_1)= f(x_0+h_1)-f(x_0)$$ \begin{align*}\Delta ^2 f(x_0;h_1,h_2)&= \Delta f^1 (x_0+h_2;h_1)-\Delta f(...
0
votes
1answer
22 views

$k$th order backward difference reduces $k$th degree polynomial

$X_t$ is a degree $k$ polynomial at $t$. How to deduce that $\triangledown ^kX_t$ is a constant?
0
votes
0answers
5 views

Second-order linear finite difference equation with two boundaries

I want to solve: $$ u(x-c) - 2u(x) + u(x+c) = f(x), 0\leq x\leq1$$ with boundaries $u(x) = u(1-x) = 0, x<0$ When $c=1/n,n\in\mathbb N\setminus{0,1,2}$, this can be done by recurrence. However I ...
0
votes
1answer
25 views

Finite difference method without fiction points

I need to use finite difference method without introducing fiction points to solve the following problem: $−\mu u′′(x)+\eta u′(x)+\sigma u(x)=f(x)$, $a<x<b,$ subject to the boundary conditions $...
1
vote
1answer
32 views

Homogeneous linear difference equation with multiple roots

Given a homogeneous linear difference equation $$\sum_{j=0}^k \alpha_j y_{n+j} = 0$$ I want to show that if $r$ is a root of the characteristic polynomial $$\rho(\xi) = \sum_{j=0}^k \alpha_j \xi^j$$ ...
0
votes
0answers
32 views

How to numerically solve the 1-D wave equation with linear restoring force?

I have been trying to numerically solve the equation of a string vibrating on an elastic foundation in order to see its dispersive behaviour with no success. The equation is of motion is $$ \rho \...
2
votes
1answer
15 views

Simplifictaion: Taylor series expansion $U(x,t)$ about point $\bigg(x+\frac{1}{2}h , t\bigg)$

I am required to expand the $\partial_x^2U(x,y)$ in terms of a finite difference expression about the point (x+\frac{h}{2},t) instead of the usual $(x,t)$ point. This means one will get: $$ \partial_x^...
1
vote
1answer
33 views

Need to solve a ODE using any approximation technique. But, this eqution tends to infinty.

I have an ODE equation to solve the velocity of the droplet, the equation reads: $$ \rho_w u_d \frac{du_d}{dz} =( \rho_w- \rho_a)g-0.75c_d\rho_a\frac{(u_d-u_a)^2}{d_d} $$ I tried solving the ...
0
votes
0answers
15 views

What is the appropriate way to discretize time in finite difference

I am wondering how to appropriately discretize time. For example, if I have data sampled at a period of 1 year, $\vec{V}=[v_1,...,v_n]$ a finite difference could be $$\frac{dv_{n+1}}{dt}=\frac{v_n-...
1
vote
1answer
42 views

Geometrically Defining Discrete Integral

We define the forward difference as an operator on real (or complex) functions as $D[f] = f(x+1) - f(x)$ It follows then that there is a forward anti-difference that can be defined, which we'll ...
0
votes
0answers
21 views

Explicit and implicit scheme for third order PDE

I have the following non-linear PDE: $\frac{∂^3U}{∂t^2∂x}+ \frac{∂U}{∂t}+ \frac{∂^3U}{∂x^3}=f(x,t)$. How is it possible to derive an explicit and implicit scheme for this equation? The problem is that ...
1
vote
0answers
27 views

Modified equation for KdV using 2.Order Discretization scheme

The modified equation of linear PDEs can be found in a systematic manner (https://www.sciencedirect.com/science/article/pii/0021999174900114). However, it does not seem to be that easy for nonlinear ...
0
votes
0answers
15 views

A few questions on the finite difference approximation for the heat equation

I'm trying to learn for fun how to apply the heat equation to different scenarios. Suppose I have a 2-D hotplate (perhaps steel) and on top of it sits a cube of some other material, and I'm only ...
4
votes
0answers
47 views

Explicit Euler method for Fokker-Planck equation

I'm trying to obtain an approximation of the solution of the following equation: $$ \left\lbrace \begin{array}{l,l} u_t = \alpha u_{xx} + (\beta u)_x, & u,\alpha ,\beta \in [T_0,T_f]\times [X_0,...
0
votes
2answers
42 views

Why is the error of $O(h^2)$ when using Taylor expansion and centered approximation for the first derivative

We know that the approximation of the first derivative by centered approximation is given by $$ f'(x) = \frac{f(t+h) - f(x-h)}{2h} + O(h^2)$$ The quality of the above approximation is determined by ...
0
votes
1answer
70 views

Numerical scheme for coupled PDEs

I am trying to solve the three coupled PDEs; $\frac{\partial{Q}}{\partial{t}} = -RaPra^2\theta - Pra^2Q + Pr\frac{\partial^2{Q}}{\partial{z}^2}, \ \ \ \ \ \ \ \ \ (1)$ $\frac{\partial{\theta}}{\...
0
votes
0answers
36 views

Numerical solution of Hamilton-Jacobi-Bellman equation with no boundary conditions

I have a HJB equation that arises from a stochastic optimization problem. $$u+a\partial_{x}V+b\partial_{y}V+\frac{\sigma^{2}}{2}\partial_{xx}V-\rho V=0$$ Where $V(x,y)$ is the unkown function and $...
2
votes
1answer
71 views

Discretization of second order nonlinear ODE using finite difference approximation not correct

I have the differential equation $$y'' + x(y^2)' - 2y^2 = g(x) \Longleftrightarrow y'' + x2yy'-2y^2 = g(x).$$ Using finite-difference approximations $$y''(x_m) \approx \frac{Y_{m-1} - 2Y_m + Y_{m+1}}{...
0
votes
1answer
40 views

Show that Local Truncation Error is not $O(h^3)$ for any choice of constants

This is one of the exercise questions in the book Numerical Analysis by Richard L.Burden Show that the difference method $$y_0 = \alpha \\ y_{i+1} = y_i + a_1 f(t_i,y_i)+a_2 f(t_i+\alpha_2, y_i+\...
0
votes
0answers
7 views

finite diference time domain on maxwells equations vs finite difference on magnetic and electric field with wave equations

So I'm just curious you can either write down Maxwell's equations for E and B, or just write wave equations with sources (assuming non zero charge density and current density). With the FDTD you have ...
1
vote
0answers
27 views

Testing convergence rates of numerical solution with no known solution

I am trying to test the accuracy of my code to a PDE with no numerical solution. I am using a Backwards time centred space finite difference method. I am calculating the error using; $\frac{u_{4h} - ...
1
vote
1answer
62 views

Numerical solution of non-linear first order partial differential equation (HJB)

I am trying to solve a simple optimal control problem using the Hamilton-Jacobi-Bellman equation, numerically in Python. This is proving to be rather difficult as I end up having to solve the ...
0
votes
0answers
22 views

Finite difference method for the third order partial differential equation

I would like to use the finite difference method for the initial problem of the following form: $$u_t(t,x) + u_{xxx} (t,x) = f(t,x), u(0,x) = u_0(x).$$ I have a compatible difference scheme for it, ...
0
votes
0answers
209 views

Finite Difference Method for second order ODE in MATLAB

I have an ordinary differential equation, $$\frac{d^2Y}{dX^2} - \frac{1}{R} \frac{dY}{dX} = 0,$$ where $R$ is a constant. I have to numerically integrate this ODE for a range from $0$ to $1$ using the ...
1
vote
0answers
22 views

what is the significance of $\kappa$ in the proof of inconditional stability of the Crank-Nicolson scheme

When using a centered difference approximation $$ \frac{\partial}{\partial t}u(t,x) = \frac{u(t + \Delta t/2,x) - u(t - \Delta t/2, x)}{\Delta t} + O((\Delta t)^2) $$ It is an approximation of the ...
1
vote
1answer
24 views

Error from central difference seems large

for a function $f(x)=e^{2x}-\cos(2x)$, at grid points $x \in {-0.3,-0.2,-0.1,0}$ I perform a central difference for the derivative at $x=-0.2$ $$\frac{df}{dx}=\frac{f(-0.1)-f(-0.3)}{2*(-0.1--0.3)}=...
0
votes
0answers
41 views

Finite difference replacement of a PDE

I'm having trouble with this question. I think that of of the partial derivatives should be looking for finite difference approximation of these two derivatives using the Taylor series expansion but ...
2
votes
2answers
68 views

Well-posedness of heat-equation PDE with only one initial condition

Consider the PDE given by $u_t = \alpha u_{xx}$ with initial condition $u(x, 0) = f(x)$. Now suppose we discretize the problem in the time variable, so we approximate $u_t(x, t)$ by a finite ...