the question homework question from Concepts in thermal physics 2nd edition
my attempt how I approached the problem I am stuck at the marked step, specifically what do I do of Pi multiplied by ln(Z). P.S I am having problems formatting the math, hence put pictures.