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

Algorithmically finding mixed-derivative coefficients using finite differences

Suppose $f : \mathbb{R}^n \rightarrow \mathbb{R}$ is a differentiable (for simplicity, let's assume ${C}^\infty$) function, and I would like to find the following partial derivatives numerically (at ...
user avatar
1 vote
0 answers
31 views

Numerical solution of $2D$ wave equation using Fourier transform and finite differences

This is the $2$-dimensional wave equation $$ u_{tt} = u_{xx} + u_{yy} $$ with initial condition $u(x,y,0)=f(x,y)$ and $u_{t}(x,y,0) = 0$. The inverse Fourier transform used is $$ u(x,y,t) = \iint \hat{...
user avatar
  • 4,202
2 votes
1 answer
46 views

fourth-order finite difference for $(a(x)u'(x))'$

Previously I asked here about constructing a symmetric matrix for doing finite difference for $(a(x)u'(x))'$ where the (diffusion) coefficient $a(x)$ is spatially varying. The answer provided there ...
user avatar
  • 233
0 votes
0 answers
17 views

Finite differences and Finite Element Method

I have the following 1D problem: \begin{equation} \begin{cases} -u''=f \ \ \ x\in(0,1)\\ u(0)=u(1)=0 \end{cases} \end{equation} I have derived the Galerkin formulation and I have implemented a code ...
user avatar
  • 405
0 votes
0 answers
16 views

confusion between finite difference methods and finite volume methods for PDEs

I am new to numerical methods for PDEs, but I am seeing some confusing perspectives in two different common textbooks: Langtangen's book on Finite Differences and Leveque's book on Finite Volume ...
user avatar
  • 1,685
0 votes
1 answer
14 views

What is the order of accuracy in time and space of the following finite difference scheme?

$$u_t + a u_x = f(x,t)$$ in $(0,1)\times (0,T)$. Apply the foward-time backward-space scheme. What is the order of accuracy in time and space? I obtain $$U_{m}^{n+1} = U_{m}^{n} - a\frac{k}{h}\left( ...
user avatar
  • 341
0 votes
0 answers
25 views

First Order Central Divided Difference

Show that the first-order central divided difference is given by: $$ f'(x_i) = \frac{f(X_{i+1}) - f(X_{i-1})}{X_{i+1}-X_{i-1}} + O(h^2)$$ Note: Please explain in the simplest way possible, I'm still ...
user avatar
1 vote
0 answers
28 views

Acoustic wave equation will be numerically unstable anyway?

Since acoustic wave is longitudinal, its equation is exhibited nonlinear. In particular, I derived an acoustic wave equation within uneven, varying pipe. It goes: $$ m_{tt} (m_x)^2 -2 m_{tx}m_tm_x + ...
user avatar
  • 1,317
0 votes
0 answers
11 views

Issues with Convergence of Finite Difference Method on Uniform Grid

I've written some code that carries out the central finite difference equation to solve this poisson system: $\Delta u(x,y) = f, u(x,y) = g$ in domain $[0,1]^2$. where $u(x,y) = \cos(4𝜋𝑥) \cos(4𝜋𝑦)...
user avatar
  • 11
1 vote
1 answer
37 views

How to solve a system of pdes coupled in their boundary condition

Initially i had the following system of pdes to solve: $$\frac{\partial A}{\partial x} =\frac{1}{v_A(y)}.\frac{1}{Pe_A} .\frac{\partial^2A}{\partial y^2} \qquad for \quad 0\leq y\leq \alpha$$ $$\frac{...
user avatar
  • 11
0 votes
1 answer
28 views

Finding the CFL condition of second order $u_j^{n+1} =u_j^n +aH(u_{j-1}^n)+bH(u_j^n)+cH(u_{j+1}^n)$ with $u_t=H(u)_{xx}$ and $0\le H'(u)\le d$.

We have the following partial differential equation $$u_t =H(u)_{xx},~~~ 0\le x<1$$ with an initial condition $u(x,0) = f(x)$ and periodic boundary condition. Here $0 \le H'(u) \le d$. Consider the ...
user avatar
  • 804
1 vote
0 answers
40 views

How will the solution of Viscous Burgers’ equation (with zero diffusion) behave as we keep increasing time?

The viscous Burgers’ equation without diffusion is given by: $$\frac{\partial u}{\partial t}+u\frac{\partial u}{\partial x}=0 $$ Now the solution should satisfy the implicit form: $u=f(x-ut)$. However ...
user avatar
  • 165
0 votes
0 answers
16 views

Solve 2D heat equation with a sinusoidal source with the Euler scheme and the finite difference method (FDM)

I am trying to solve the heat equation of the following form: $$ \frac{\partial u(x,y,t)}{\partial t} - \Delta u(x,y,t) = q \cdot sin(6.28\cdot x) \cdot cos(6.28\cdot y) \; \; \text{in }(0,1)^2\times (...
user avatar
0 votes
0 answers
36 views

Implicit finite difference scheme for a non-linear PDE

I am trying to write a finite difference scheme to solve numerically a 2-nd order non-linear equation : $$\boxed{\frac{\partial h}{\partial t} = A\frac{\partial}{\partial x}\left(h^{3}\frac{\partial h}...
user avatar
  • 1
0 votes
0 answers
10 views

Numerical Stability of Non-Linear, Autonomous, PDEs on a Lie Algebra

Background: The dynamics of my system are modeled by a system of PDE's. I adopt some finite difference approximations to simplify into a system of ODE's and want to study its numerical stability to ...
user avatar
  • 1
0 votes
0 answers
20 views

What is the value of $\frac{\Delta^2}{E}3^xx!$, when x = 3 and h = 1?

I'm studying Numerical Analysis, and I came across a problem like this: $$(\frac{\Delta^2}{E})3^xx!$$ When $x=3; h = 1$. Here is what I have so far $$\Delta = E-1$$ $$\Delta^2 = E^2 - 2E + 1$$ $$\frac{...
user avatar
3 votes
1 answer
76 views

Why does the heat source become so hot?- Heat equation with heat source using finite difference method

I am trying to model the heat equation with heat source and Robin boundary conditions, i.e. the system: \begin{align} T_t\;=&\;\alpha\Delta T+\frac{1}{c_p\rho \text{Vol}(\Gamma)}1_{\Gamma}(\...
user avatar
  • 709
0 votes
0 answers
22 views

discrete approximations of partial derivatives

i'm reading a paper Polynomial Shape from Shading about the SFS problem. And it's written in this paper as the following: the discrete partial derivatives. it makes me confused since we know that: $$\...
user avatar
  • 23
0 votes
0 answers
43 views

Crank Nicolson method error analysis

I am trying to solve the diffusion PDE: $$ \frac{\partial u}{\partial t} = \alpha \frac{\partial^2 u}{\partial x^2}$$ using the CN discretization. I have implemented the method in Matlab, quiet ...
user avatar
0 votes
2 answers
38 views

Solving a 2nd Order ODE using Finite Difference Method when Mixed Boundary Conditions are given

The problem I'm looking at is $$y'' + 3.05 y' -2.85 = 0 $$ with the boundary conditions $y(0) = 1$ and $y'(1) = 0.0305$. After obtaining the algebraic set of equations using FDM, I'm not sure how the ...
user avatar
0 votes
0 answers
42 views

How can one make an intuitive connection from second-order-recurrence relations to second-order differential equations?

To understand what I am trying to ask, let us first consider the example of a first order recurrence relation. That is, for a sequence $x_n$, $n \in \mathbb{N}$ we assume it fulfills the relation $$x_{...
user avatar
  • 1,019
0 votes
0 answers
16 views

Nth difference of (x+Δx)^n

I need help proving the nth difference of the sequence y0,y1,y2,.....,yn where yi = (x0 + Δx)^n is equal to n!(Δx)^n. This is because proving this can help me solve gain an intuitive understanding of ...
user avatar
0 votes
1 answer
20 views

Unstable forward difference scheme with cross products

Let $u(t) = (u_1(t), u_2(t), u_3(t))$ be a solution of the ODE $$\frac{d\mathbf{u}}{dt}=\mathbf{a}\times\mathbf{u}.$$ where $\times$ denotes the cross product and $\mathbf{a} = (a_1, a_2, a_3) \neq 0$....
user avatar
  • 804
2 votes
1 answer
70 views

Why is there a pattern in exponents where x^y and (x+1)^y increases by y! "accelerated" by y in?

I've noticed with exponents a certain pattern that occurs. 1^2=1 | 2^2=4 | 3^2=9 | 4^2=16 | 5^2=25 1+3 =4 | 4+5 =9 | 9+7=16 | 16+9=25 You find 3, 5, 7, and 9; all 2 in between. It takes 2 times of ...
user avatar
  • 21
2 votes
0 answers
25 views

Do meshfree methods suffer from a curse of dimensionality?

I think I am quite confused by the nuance of meshfree methods https://en.wikipedia.org/wiki/Meshfree_methods for solving some PDE over $\Omega$. From what I gather they do not require the ...
user avatar
3 votes
0 answers
41 views

Finite Elements or Finite Difference for the Heat Equation, Dissipates the Entropy?

Given an initial density $\rho_0$ on $\Omega\subset \mathbb{R}^d$, it is well known that the Heat Equation $$ \partial_t \rho(t)=\Delta\rho(t),~~~~~~~\rho(0)=\rho_0, ~~~~~(1)$$ dissipates the entropy $...
user avatar
0 votes
1 answer
70 views

Eigenvalues for discretization matrix in Poisson equation with finite difference

I am trying to find the eigenvalues for the discretization matrix in the Poisson equation using the Chebyshev polynomials, i.e. $$ -u''(x) = f(x), x \in [0,1],\;\; u(0)=u(1)=0 $$ Discretize the ...
user avatar
  • 477
0 votes
0 answers
25 views

Shock Capturing Methods for Shallow Water Equations

I am looking for some help finding a numerical solution to the shallow water equations: $\partial_tu+\partial_x(u^2/2+g\eta)=0$ $\partial_t \eta+\partial_x(u\eta)=0$. where $u$ is the depth averaged ...
user avatar
  • 139
0 votes
0 answers
20 views

More information about finite differences in matrix form

I am self-learning about the finite differences method and found that I can solve it just as a system of equations, $A^{(m,m)}\;y(x)=b$ ($y(x)\;and\;b$ are 1,m dimensional vectors), in matrix form ...
user avatar
2 votes
0 answers
66 views

Updating degenerate Eigenvectors

I have a Hermitian Matrix $H$ that evolves very slightly over ~50 iterations until convergence of a Schrödinger/Poisson system is achieved. The eigenvalues I'm interested in are $\lambda_1$ and the ...
user avatar
1 vote
0 answers
16 views

Calculating Error for using an approximation for the Schrodinger Equation Evolution Operator

I've devising a Crank-Nicolson scheme for the Schrodinger equation using a time-independent potential, $V(x)$. In devising this scheme the following equation is approximated and THEN discretized, ...
user avatar
  • 191
1 vote
0 answers
53 views

Energy estimate of grid function

Consider a grid function $v$ defined on $$ \Omega_h:=\{x_i:0\leq i\leq m\} $$ where $x_i=a+ih$, $h=\frac{b-a}{m}$.There are three types of norms $$ ||v||=\sqrt{h\sum_{i=1}^{m-1}v_i^2} $$ $$ ||v||_{\...
user avatar
  • 11
0 votes
1 answer
60 views

Finite difference method of the heat equation with an additional functional term

I understand how to write the heat equation: $\frac{\partial u}{dt}=c\frac{\partial ^2u}{\partial x^2}$ in numerical finite difference form implicitly (see wiki): $\frac{u_{j}^{n+1} - u_{j}^{n}}{k} =c\...
user avatar
3 votes
1 answer
88 views

Truncation error, finite differences

Consider the following FDM problem: Find $u$ such that $$ -u^{\prime \prime}(x)+b(x) u^{\prime}(x)+c(x) u(x)=f(x) ~~\text { in }(0,1), $$ and conditions $u(0) = u(1) = 0$, where $$ b(x)=x^{2}, \qquad ...
user avatar
0 votes
1 answer
94 views

Can the left side of the equation be truncated to the first term?

So, I am deriving a high-order compact finite difference scheme, and got into the equation below: \begin{multline} \delta t^2 \{1 + \dfrac{h^2}{12} (\delta x^2 + \delta y^2 + \delta z^2) + ...
user avatar
0 votes
0 answers
44 views

Finite Difference approximation of third mixed partial derivative

I am looking for a Finite Difference approximation of third mixed partial derivative, specifically: $\frac{\partial^3 u}{\partial x \partial y \partial z}$ (and I guess that will be an $O(h^3)$ ...
user avatar
3 votes
1 answer
130 views

Finite differences and Neumann/Periodic BC of a fourth order PDE

Before I start, I have already read this similar thread and didn't get anywhere unfortunately. I have a PDE of the form $$ \frac{\partial u}{\partial t} = \nabla^2[2u(u-1)(2u-1) - \gamma \nabla^2 u] $$...
user avatar
  • 125
0 votes
0 answers
31 views

Finite difference method boundary value problem

Here is a boundary problem \begin{align} -\partial_x^2 \tilde{u}(x) + q(x)\tilde{u}(x) & = f(x), \; x \in (0,1)\\ \partial_x \tilde{u}(0) &= \alpha \\ \tilde{u}(1) &= \beta \end{align} ...
user avatar
0 votes
0 answers
14 views

Discretization of second order nonlinear ODE using finite difference with pseudo-spectral method

I have the following equation that was discretized using pseudo-spectral method in 2D with periodic BCs that works. $$ \nabla_{\perp} \cdot \left( n \nabla_{\perp} \psi \right) = \textbf{S} $$ ...
user avatar
  • 11
0 votes
0 answers
41 views

What is the relation between the finite difference method's solution and the weak solution?

I never understood the justification of some authors using the Finite Difference Method to solve a PDE numerically while theoretically they only proved the existence of weak solutions. Is the use of ...
user avatar
  • 206
0 votes
0 answers
18 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 ...
user avatar
  • 101
1 vote
0 answers
53 views

Index reduction of a DAE from a PDE system

I have a system of 2 non-linear, coupled PDEs that I would like to transform to a stiff ODE system to solve them using the method of lines. The 2 equations: $$\begin{align} \frac{\partial \phi}{\...
user avatar
1 vote
1 answer
43 views

Finite difference and recurence relation

I am trying to find a solution to the recurrence relation $$g_{k}(n) = n g_{k-1}(n) - n g_{k-1} (n-1)$$ such that $g_k(n)$ is written as a summation over $g_0(n)$ for various $n$. Attempt I started ...
user avatar
2 votes
0 answers
59 views

Discrete Dirichlet problem has a unique solution

I am studying Artin's Algebra. In Chapter 1 Exercise M11, he asks to show that every discrete Dirichlet problem on a finite discrete set in plane has a unique solution. This is essentially the ...
user avatar
  • 1,965
0 votes
0 answers
14 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(\...
user avatar
  • 23
0 votes
0 answers
27 views

What is a correct way to compute the discrete derivative of a difference equation?

Consider a discrete map $x(t+1) = f(x(t)), \quad\forall t\in \mathbb{Z}$ For example, $f(x(t)) = (x(t))^3$. From searching Wikipedia on forward difference, the discrete equilvalent of the derivative ...
user avatar
  • 585
0 votes
0 answers
18 views

Aproximating a function for a Robin/Fourier and Dirichlet condition

First of all, im sorry if it seems silly but I haven't been able to come up with an answer: Lets say I'm trying to solve for $P(x)$ with $x \in (0,L)$ having $N$ points in the domain using finite ...
user avatar
  • 172
0 votes
0 answers
25 views

How do you convert negative integer powers to falling powers?

Is there a systematic way to convert $x^{-n}$ to falling powers for positive $n$? i.e. something like Stirling numbers, but that works when the exponent is negative.
user avatar
0 votes
1 answer
81 views

Solve the ode using fixed-point iteration

I have the following equation $-[(1+u^{4})u_x]_x = sin(x)+sin(5x)$, where the domain is $[0,2\pi]$ $u(0)=u(2\pi)=0$ for boundaries. How to find a numerical solution for $u$ using numerical method? My ...
user avatar
2 votes
1 answer
88 views

Von Neumann Stability vs ''Regular" Stability criteria

I am going over stability for numerical PDEs and am trying to differentiate between the "regular" stability criteria for IVPs: $$||\textbf{u}^{n+1} ||\leq K ||\textbf{u}^0||$$ and the von ...
user avatar
  • 1,222

1
2 3 4 5
15