# Comparing finite differences methods

I am currently writing my dissertation on different methods for pricing barrier options. As part of this, I have implemented a finite differences method for solving one partial differential equation, and another finite differences method for solving another partial differential equation.

I would like to create some plots or tables, to show which of these methods are preferable. My problem is, that I have no idea which plots to create. I do not really have much experience with this, so I don't know what will be valuable. Does anyone have any suggestions?

I suppose it is worth mentioning that I have available an analytical formula for the solution.

• How would I best measure solution accuracy? By using a matrix norm, for instance, on the matrix $E = (e_{i,j})_{i,j}$, where $e_{i,j} = \hat{u}_{i,j} - u(t_i,x_j)$? Here I assume that $\hat{u}_{i,j}$ is the finite differences approximation to $u(t_i,x_j)$. – torbonde Aug 13 '15 at 20:16
• You typically want to fix a time $t_i$ and take the max norm over all points $x_j$, so as to isolate spatial and temporal discretization errors. Other options involve various discrete norms of $e_{i,j}$. – Jesse Chan Aug 13 '15 at 20:40
• @torbonde Yes, but make sure the norm is independent of the choice of mesh. E.g. $\sum_{i,j} |e_{i,j}|$ is a reasonable measure, but it scales with mesh size as $\propto N_xN_t$, so divide it by $N_xN_t$. In essence, you have to write the mesh-independent integral defining the error, e.g., $\int |\hat u - u(T,x)|\,dx$ for the error in final solution, and then discretize that integral appropriately on your grid as $N_x^{-1}\sum_j |e_{M,j}|$. – Kirill Aug 13 '15 at 20:45