# Understanding the finite difference method

The finite difference method is introduced in my book like this:

The equation:

We describe the finite difference method for the problem: $$-y^{''} + q(x)y = f(x), \,0<x<1,\\ y(0) = 0 \text{ and } y(1) = 0.$$

Discretization:

We split up the interval $[0,1]$ into $n+1$ equal parts with length $h =\frac{1}{n+1}$. The grid points are $x_j = jh$ for $j = 0,...,n+1$. We denote the numerical approximation of $y_j = y(x_j)$ as $w_j$. To get the approximation we use the differential equation in the point $x_j$:

$$-y_j^{''} + q_j y_j = f_i, \, 1\leq j \leq n.$$ We approximate the second derivative with the central difference:

$$-\frac{w_{j+1} - 2w_j + w_{j+1}}{h^2} + q_j w_j = f_j, \, 1\leq j \leq n. \,\,\,\,\,(1)$$ The values $w_0$ and $w_{n+1}$ follow from the boundary values $$w_0 = 0 \text{ and } w_{n+1} = 0.\,\,\,\,\,\, (2)$$

The system of equations:

Equations $(1)$ and $(2)$ give $n+2$ equations for the unknown $w_0,...,w_{n+1}$. If we eliminate $w_0$ and $w_{n+1}$ from $(1)$ we get the system of equations $$Aw = f.$$ The vectors $w$ and $f$ are: $w = \begin{pmatrix}w_1\\\vdots\\w_n\end{pmatrix}$ and $f = \begin{pmatrix}f_1\\\vdots\\f_n\end{pmatrix}$.

My Question:

Reading this question it seems to me that solving the initial equation means finding the right function $y$. Have we solved the initial equation? If so, how? If we haven't; is the next step finding the vector $w$?

• They said that they are using the term $w_j$ to refer to the approximate values of $y$ at the nodes $x_j$. So yes, solving the numerical problem is the same as finding the vector $w$. – Ian Nov 21 '17 at 16:52

Assuming your boundary value problem has a unique solution, the one constructed via finite difference will give the approximation to the solution.

One may show, that if your numerical scheme is $stable$ and $convergent$(usually done with Fourier Analysis), then it indeed converges to the unique solution as you make your partition of $[0, 1]$ more fine.