I'm trying to find the work done using a scalar potential however the work done from a potential function never matches a line integral. do I not understand something, why cant I get this right?
$$ F = (\sin(x), 0, 2z) \\ r = (\rho, \rho, \rho^2) \hspace{1cm} 0 \leq \rho \leq \pi $$ Find the work by constructing a scalar potential.
These are my attempts:

Your second attempt was (aside from some notational mistakes) fine until the very end, when you computed $f(0,0,2\pi)$ instead of $f(\pi,\pi,\pi^2)$.