Closed-form optimal investment when present values and costs are jump-diffusions