Comparison of two types of Trefftz method for the solution of inhomogeneous elliptic problems