# Question on boundary conditions when using Finite Difference

I have two questions appearing to me (they are not related directly to each other).

1. My first question is about boundary conditions when using Finite difference methods. There are two ways to do it: a) Dirichlet b) von Neumann (using always two values "inside" the grid/mesh to get the one on boundary). For me von Neumann conditions are more elegant. It is always written they hold as long as Payoff is linear for large values. But I am searching a bit for examples on that. In which types of options von Neumann works in which not?

2. Barrier option pricing with FD methods (such as Crank Nicoloson). How would you approach there? Say you have an up and out call. Would use use the same technique as plain vanilla Call just that you say the upper boundary for the stock price is the value of the barrier (so grid in stock price direction goes up to barrier level) and the boundary condition for the value of the option there is zero?

There is another boundary condition not often mentioned but used very often in practice in Quant finance FD solvers, which is linear (zero second spatial derivative on the boundary). This means that on the boundary the PDE $$a\frac{\partial U}{\partial x} + b \frac{\partial^2 U}{\partial x^2} + \frac{\partial U}{\partial t} = 0$$ simplifies into $$a\frac{\partial U}{\partial x} + \frac{\partial U}{\partial t} = 0$$ which you discretize using the uncentered discrete difference for $$\frac{\partial U}{\partial x}$$.