solve pde matrix