A boundary method of Trefftz type with approximate trial functions