# How to use Finite Difference Method solving ODE with Boundary Value Problems?

Using these formulas, it is clear how to solve the problem:

For node 1, we have the boundary value on the left side, for ex. $$u(0) = 0$$ and for node 2, we use the formula replacing $$u''$$ with $$u_{i-1} = (u_{i+1} - 2 u_i + u_{i-1})/h^2$$ and we go to node 3 etc..

But how to solve the problem, if I had this formula: ??

I would solve for node 1 with the same manner as the 1st formula for $$u''$$, but after that, should I go to node 4 directly and replace $$u_1$$, $$u_2$$, $$u_3$$, $$u_4$$, $$u_5$$, $$u_6$$, and $$u_7$$, or should I go to node 2, and take just $$u_{i-1}$$, $$u_i$$ and $$u_{i+1}$$?

2. The first formula approximates the second derivative with a second-order central difference, meaning if $$u''(x_0)$$ is the actual value of the second derivative at point $$x_0$$ and let's say $$\tilde{u}''$$ your approximation, then $$\|u'(x_0) - \tilde{u}'' \| \leq Ch^2$$, with $$C$$ being some constant. Your second formula is 6th-order accurate. Therefore, if you use the first formula for the first (and last) two nodes, you will harm the order of accuracy of your method.