System solver using LU decomposition