46

Well, it seems that you have just discovered a beautiful theory of (semi)group generators by yourself. To give some basics of it, let us consider a collection of "nice" functions on real values - e.g. bounded and having continuous derivatives. The action of operators $L^h$ on this space has a semigroup structure: $$ L^s(L^tf(x)) = L^sf(x+t) = f(x+s+t) = L^{...


15

This is a difficult question to answer. "The FDM is the oldest and is based upon the application of a local Taylor expansion to approximate the differential equations. The FDM uses a topologically square network of lines to construct the discretization of the PDE. This is a potential bottleneck of the method when handling complex geometries in ...


13

Let $X = \mathbb{R}^{\mathbb{Z}}$ be the space of real valued sequences defined over $\mathbb{Z}$. Let $R : X \to X$ be the operator on $X$ replacing the terms of a sequence by those on their right. More precisely, $$X \ni (\ell_n)_{n\in\mathbb{Z}} \quad\mapsto\quad ( (R\ell)_n = \ell_{n+1} )_{n\in\mathbb{Z}} \in X$$ The identities you have can be ...


10

Here is an old scicomp.SE question that answered some of your question: What are criteria to choose between finite-differences and finite-elements? In my humble opinion, FEM is the most flexible one in terms of dealing with complex geometry and complicated boundary conditions. FEM also allows the adaptive/local procedure to get higher order local ...


9

Provided the values of $g$ lie in the domain of $f$ and $\Delta g(n)$ is an integer, you have the obvious rule $$ \Delta(f\circ g)(n)=\sum_{d=0}^{\Delta g(n)-1}\Delta f\bigl(g(n)+d\bigr), $$ where the summation must be interpreted as a sum of negated terms in case $\Delta g(n)<0$, similarly to integrals whose upper limit is lower than their lower limit. ...


8

Suppose we are modeling a quantity $u$, say the concentration of a chemical, driven by a flow in some fluid in a region $\Omega$ with no source (meaning we are not adding more chemical into the fluid after starting the timer). Then the convection-diffusion pde to describe the phenomenon is: $$ \frac{\partial u}{\partial t} = \nabla \cdot (D \nabla u - \vec{b}...


8

how does one make sense of exponentiating or taking the logarithm of an operator? The operator is linear, and therefore so are its positive integer powers, hence any power series in that operator has a chance of making sense. At least the series is a limit of linear operators, and the series makes perfect sense without any limiting process when applied to ...


8

Given a function $f(x)$ defined on $[a, a+nh]$ continuously differentiable up to $n$ times. Let $P(x)$ be a polynomial of degree $n$ coincides with $f(x)$ on the $n+1$ points $a, a+h, \ldots, a+nh$. It is clear $$\left. \Delta_h^n ( f(x) - P(x) )\right|_{x=a} =\sum_{k=0}^n (-1)^{n-k} \binom{n}{k}( f(a+kh)-P(a+kh) ) = 0 $$ This implies $$\left.\Delta_h^n f(...


8

Note that since $R$ and $1$ commute, $$ R^{2^k}-1=\left[\sum\limits_{j=0}^{2^k-1}R^j\right](R-1)\tag{1} $$ Therefore, $$ \begin{align} \prod_{k=0}^{n-1}\left(R^{2^k}-1\right)x^n &=\left[\prod_{k=0}^{n-1}\sum_{j=0}^{2^k-1}R^j\right](R-1)^nx^n\tag{2a}\\ &=\left[\prod_{k=0}^{n-1}\sum_{j=0}^{2^k-1}R^j\right]n!\tag{2b}\\ &=\left[\prod_{k=0}^{n-1}2^k\...


7

For the first part let $k=n-i$: $$\sum_{i=0}^n(-1)^i\binom{n}iy(i)=\sum_{i=0}^n(-1)^i\binom{n}{n-i}y(i)=\sum_{k=0}^n(-1)^{n-k}\binom{n}ky(-k)\;.$$ Now note that $(-1)^{n-k}=(-1)^{n+k}$, and you have $$\sum_{i=0}^n(-1)^i\binom{n}iy(i)=(-1)^n\sum_{k=0}^n(-1)^k\binom{n}ky(0+n-k)=(-1)^n\Delta^ny(0)\;.$$ Improved version: For the second part, note that $$\...


6

UPDATE : Let's start by showing a solution of the difference equation : $$\Delta w+w-w^2-1=0$$ at least if this means $\ (w_{n+1}-w_n)+w_n=w_n^2+1$ because : $$w_{n+1}=w_n^2+1$$ admits the solution (for the specific case $w_0=1$) : $$w_n=\lfloor c^{2^n}\rfloor,\\\text{with}\quad c=\exp\left|\sum_{j=0}^\infty 2^{-j-1}\ln(1+w_j^{-2})\right|,\\c\approx 1....


6

The fact that it is second-order refers to the fact that the largest difference in indices is $2$. For example, $$ R_{n+4}=3R_{n+1}^2+R_n $$ is a fourth-order difference equation and $$ R_{n+3}=2R_{n+2}\cdot R_{n+1} $$ is a second order difference equation. If you're familiar with ODEs, the terminology is analogous.


6

Actually, for Mathematica 7 and later versions, you have the functions Identity[], DiscreteShift[], and DifferenceDelta[]: Identity[f[x]] f[x] DiscreteShift[f[x], x] f[1 + x] DifferenceDelta[f[x], x] -f[x] + f[1 + x] The backward difference needs a bit more work: DifferenceDelta[DiscreteShift[f[x], {x, 1, -1}], x] -f[-1 + x] + f[x] Otherwise: bdf[f_, ...


6

The gamma function naturally generalizes the factorial to complex values. It satisfies the functional equation $x\Gamma(x)=\Gamma(x+1)$ for any $x$ (when both sides exist anyway). Hence $$\Gamma\big(x-(n-1)\big)\prod_{k=0}^{n-1}(x-k)=\Gamma(x+1)$$ by induction. Divide by the $\Gamma$ on the left and we're done.


6

By linearity, it suffices to prove this for the polynomials $x(x - 1)\cdots(x - (n-1))$. This is just $n! {x \choose n}$. A basic property of the forward difference operator is that $\Delta {x \choose n} = {x \choose n-1}$, from which it follows that $$\Delta^k x(x - 1)\cdots(x - (n-1)) = n! {x \choose n-k} = k! {n \choose k} x(x - 1) \cdots(x - (n-k-1))$$ ...


6

For even orders the finite-difference derivative approximation has a simple form. Consider following finite-difference operator $\Delta$ $$ \Delta f(x) = \frac{f(x+h/2) - f(x-h/2)}{h}. $$ It's a second order first derivative operator. You can apply it several times $$ \Delta^2 f(x) = \Delta \Delta f(x) = \Delta \left(\frac{f(x+h/2) - f(x-h/2)}{h}\right) = \...


5

$$ x^\underline n = \prod_{k=0}^{n-1}(x-k)= \frac{\Gamma(x+1)}{\Gamma(x+1-n)} $$


5

As kindly suggested by Patrick Da Silva, I'm turning my comment into an answer. Let $x_0,x_1,\dots$ be distinct real numbers, let $f$ be a polynomial function on $\mathbb R$, and define $f[x_0,\dots,x_j]$ for $j=0,1,\dots$ recursively by $$ f[x_0]:=f(x_0), $$ $$ f[x_0,\dots,x_j]:=\frac{f[x_1,\dots,x_j]-f[x_0,\dots,x_{j-1}]}{x_j-x_0}\quad,\quad j\ge1. $...


5

FDM FDM is created from basic definition of differentiation that is $$ \frac{df}{dx}=\frac{f(x+h)-f(x)}{h}$$ here "h" tends to zero. In numerical analysis, its not possible to divide a number by "0" so "zero" means a small number. So FDM is similar to differential calculus but it has killed the heart that is limit tenda to "zero". So in most of the cases ...


5

It shall be argued in this post that the whole idea of one Numerical Method being superior to another is merely a prejudice that rests upon insufficient in-depth analysis of the real thing. The argumentation will proceed at hand of a two-dimensional example.The reader is invited not to skip through but take notice of the details. Numerical Analysis of ...


5

Notice that $$x^{\underline k}=\frac{x^{\underline{k+1}}}{x-k}$$ for $k\ge 0$. If we generalize this to negative $k$, we have $$\begin{align*} x^{\underline{-1}}&=\frac{x^{\underline0}}{x-(-1)}=\frac1{x+1}\\\\ x^{\underline{-2}}&=\frac1{(x+1)(x+2)}\\\\ &\;\vdots\\\\ x^{\underline{-k}}&=\frac1{(x+1)^{\overline{k}}}=\frac1{(x+k)^{\underline{k}}...


5

The approximation with unit weights on the outside nodes should be (method A) $$ \nabla^2 u \approx \frac{-8u_{i,j}+u_{i+1,j}+u_{i-1,j}+u_{i,j+1}+u_{i,j-1}+u_{i+1,j+1}+u_{i-1,j-1}+u_{i+1,j-1}+u_{i-1,j+1}}{3h^2} $$ you can get this formula simply by summing up all of your Taylor expansions (they look pretty good) - this will also give the $O(h^4)$ accuracy. ...


5

Recall how the Lax-Wendroff method is obtained in the constant-speed case [1]: a Taylor series in time is written: $$ u(x,t_{n+1}) = u(x,t_{n}) + \Delta t\, u_t(x,t_{n}) + \frac{1}{2}\Delta t^2\, u_{tt}(x,t_{n}) + \dots $$ the time derivatives are eliminated using the PDE: $u_t = -c u_x$ and $u_{tt} = c^2 u_{xx}$. the spatial derivatives are replaced by ...


5

You are right, the writing is quite misleading when one is not used to it. Using A-7 and A-9, let us rewrite the first term of A-4 as \begin{aligned} q_{i+\frac12}^{m+1} - q_{i-\frac12}^{m+1} + q_{i+\frac12}^m - q_{i-\frac12}^m &= \frac{\pi G}{256(1-\nu)\mu\Delta x} \big[ (W_{i+1}^{m+1})^4 - 2(W_{i}^{m+1})^4 + (W_{i-1}^{m+1})^4 \\ &\phantom{ = }\...


4

The problem can be simplified a bit. Putting $s(x,y,t)=\sigma(x,y,t)+t$ turns the system into a homogeneous one: $$ -s_x-ps_t=0, $$ $$ -s_y-qs_t=0. $$ Excluding $s_t$ we have $qs_x=ps_y\;$.


4

Hint: Notice that $\Delta^k (x^n)$ is a polynomial of degree $n-k$, because the highest order term in $x$ cancels out with each application of $\Delta$ (of course you should prove this). So for $\Delta^n (x^n)$ what you have to show is that all that will be left is the constant term.


4

Actually you can use Taylor expansion to derive the formula $$y_{i-1}=y(x-\Delta x_i)=y(x)-\frac{dy}{dx}\Delta x_i+O(\Delta x^2)$$ $$y_{i+1}=y(x+\Delta x_{i+1})=y(x)+\frac{dy}{dx}\Delta x_{i+1}+O(\Delta x^2)$$ By neglecting higher order terms $O(\Delta x^2)$ $$y_{i+1}-y_{i-1}=\frac{dy}{dx}\Delta x_{i+1}+\frac{dy}{dx}\Delta x_i\Rightarrow \frac{dy}{dx}=\frac{...


4

This is really the same answer as that of Qiaochu Yuan, but I find the "binomial coefficients of $x$", much as I approve the notation, a bit distracting when next to ordinary binomial coefficients. One can do without them, using falling factorial powers instead: $x^\underline n=x(x-1)\ldots(x-n+1)$, which is of course the same as $n!\binom xn$. Elementarily $...


4

When you do the von Neumann analysis, I guess you end up with an amplification factor $G=U^{i+1}/U^i$ which depends both on $d=ka/h^2$ and $j$ (and $\theta$). So for stability you have to find $d$ which satisfies $|G(d,j,\theta)|\leq 1$, for $0<\theta<2\pi$ and $0<j<N$. The equation you are solving is not the same as the 1D equation, so it's not ...


Only top voted, non community-wiki answers of a minimum length are eligible