power method for trigfuns