- #1

- 7

- 0

I have to use a wide 5 point stencil to solve a problem to fourth order accuracy. In particular, the one I'm using is:

u'' = -f(x + 2h) + 16f(x + h) - 30f(x) + 16f(x - h) - f(x - 2h) / 12h

^{2}

or when discretized

u'' = -U

_{j-2}+ 16U

_{j-1}-30U

_{j}+ 16U

_{j+1}-U

_{j+2}/ 12h

^{2}

In addition to dirichlet boundary conditions (which are not troubling me to implement), I have to implement numerical boundary conditions for

U

_{-1}and U

_{N+1}

The problem I'm encountering is I'm not sure what to try for these numerical boundary conditions (as in, I haven't a clue as to what may work). I have the scheme set up without those conditions, but that's not what I want. The only time I know U

_{-1}and U

_{N+1}come up are with Neumann boundary conditions, which I don't have.

Any help or pointers would be immensely appreciated, thank you.