Discretize second order derivative using the finite difference scheme

16.3k Views Asked by At

I have some problems in Discretize the second order derivative of this equation enter image description here

after I find u(x) by integrating it, I have problem in discretize it ,, I'm not mathematical person and I try to read a lot .

any help ?!

1

There are 1 best solutions below

0
On

A discrete form of the second derivative is $$u''(x) \approx \frac{u(x+h)-2u(x)+u(x-h)}{h^2}\tag{1}$$ Partition the interval $[0,1]$ with uniformly distributed points $0=x_0<x_1<\dots <x_n=1$ and denote $u_j=u(x_j)$. Since $h=1/n$, the difference scheme for your equation takes the form $$ u_{j+1}-2u_j+u_{j-1} = -\frac{1}{n^2},\quad j=1,\dots,n-1 \tag{2}$$ Since $u_0=1$ and $u_n=2$ are known, the equations (2) form a linear system of $n-1$ equations with $n-1$ unknowns. Its solution is an approximation to $u$.