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.

815 questions
1
vote
1 answer

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.28795$$ The derivative of this function (per…
Frank
  • 880
1
vote
0 answers

Finite difference basic operation to solve boundary value problem

I got a question regarding finite difference method to solve boundary value problem on second order derivative equation. This is taken from the "Numerical Methods using MATLAB" by Mathews & Fink. This is the problem from the book: Solve the…
JIM BOY
  • 65
1
vote
1 answer

Finite Difference method - An example

I am trying to solve $$\frac{d^2T}{dr^2}+\frac{1}{r}\frac{dT}{dr}+1=0$$ for $0
noname
  • 25
  • 4
1
vote
1 answer

Finite difference: problem on edge of Dirichlet and Neumann boundary

I'm trying to solve the non-homogeneious heat equation using a finite difference scheme. The grid on which to solve this looks like this: N N N N N N N N N N N N N D D D D D D N …
1
vote
1 answer

Solve finite differences linear equation

Given $$(\textrm{Pe}-1)u_{i+1} + 2u_i - (\textrm{Pe}-1)u_{i-1} = \frac{h^2}{\mu}$$ where $\textrm{Pe}$ stands for Péclet number, $h$ is the step size of the mesh and $\mu$ is the diffusion (constant) How to solve such equation? I'm trying to solve…
BRabbit27
  • 767
1
vote
1 answer

On the lax scheme

Does the following lax scheme: $$\frac{u_{j}^{n+1}-\frac{u_{j+1}^{n}+u_{j-1}^{n}}{2}}{\Delta t}+c\frac{u_{j+1}^{n}-u_{j-1}^{n}}{2\Delta x}=0$$ of $$\begin{cases} u_t+cu_x=0 & \text{for} \ (x,t)\in\mathbb{R}\times ]0,T[ \\ u(x,0)=u_0(x) \end{cases}$$…
1
vote
2 answers

Problem in solving a question related to finite difference.

Show that the $k$-th finite differences of the sequence $1^k ,2^k,3^k ,...$ are each $k!$. I have tried but I fail when I try it proving using mathematical induction.Please help me. Thank you in advance.
user251057
1
vote
1 answer

Best numerical scheme for this problem

I have a set of data, $x, y$ and $ z$, each with length n: $x \rightarrow \{x_{1}...x_{n}\}$ $y \rightarrow \{y_{1}...y_{n}\}$ $z \rightarrow \{z_{1}...z_{n}\}$ $y$ and $z$ are parameterised by $x$: $y = y(x)$ $z = z(x)$ Problem 1 I wish to find…
1
vote
1 answer

Why, for simple nth degree polnomials' finite difference tables, does the nth (constant) difference set, equal the nth derivative

For example with the equation $f(x)=x^4+2x^3+4x^2+2x+1$ the fourth derivative is $f''''(x)=24$ and when you construct a difference table the fourth difference is 24
1
vote
1 answer

calculus of finite differences

If D,E,$\delta,\mu$ be the operators with usual meaning and if hD=U, where h is the interval of differencing,How to prove the following relations between operators:- 1]$\frac{U}{\delta}=\frac{2}{\delta} \sinh^{-1}\frac{\delta}{2} =…
1
vote
0 answers

First order and second order derivative backwards approximation on non uniform grids

Assume we have a function f(x) and we have samples coming in, except they are not at uniform intervals. (e.g. you have f(x) at x = 0.1, 0.2, 0.7, 1.9, 2.8... etc). What is the correct way to compute first and second order backwards derivatives? Is…
0
votes
1 answer

Raising the power of forward difference formulas

In a forward difference formula, $D_-$ refers to the backward difference operator. Thus, $(D_- u)(x) = u(x)-u(x-h)$. In the answer key of a problem that I was working on, one of the steps is: $[D_- +…
0
votes
0 answers

FDTD validation with Poynting Vector

I'm attempting to validate my FDTD optics simulator results. Visually, I can see that my output is nearly identical to that produced by Meep, the only difference being a slight phase shift. Using a point source in the middle of a 1k+1 by 1k+1…
3Dave
  • 101
0
votes
0 answers

second-order difference equation (hypergeometric type equation)

We defined the backward and forward difference operators ($\Delta$ and $\nabla$ respectively) by $\Delta f(x)=f(x+1)-f(x)$ and $\nabla f(x)=f(x)-f(x-1)$. We consider the following equation $$ -B(x)f(x+1)+[B(x)+D(x)]f(x)-D(x)f(x−1)+n(n+\mu +\nu…
Made
  • 1,249
0
votes
0 answers

Derivation of fourth-order accurate formula for the second derivative in FDM for contact node

I was looking for a way to derive a fourth-order error formulation of a second-order derivative at the contact surface of two different materials. Say, solving a thermal diffusion equation with varying thermal conductivity and diffusivity. Thanks in…