Hello I have a problem where $\hat{p}$ is a basevector in a cylindrical system $$\int_{0}^{\pi/4}\hat{p} d\theta$$
I know that; $\hat{p} = \hat{x}\cos\theta + \hat{y}\sin \theta$
$$ \hat{x}\int_{0}^{\pi/4}\cos\theta d\theta + \hat{y}\int_{0}^{\pi/4}\sin \theta d\theta = (1/\sqrt{2})\hat{x} + (1-(1/\sqrt{2}))\hat{y} $$ But then I get an answer in cartesian? Is this the right way to proceed?
Yes. Your Process is right. If you want your final answer in cylindrical coordinates note that
$$\left\{ \matrix{ \hat p\left( \theta \right) = \cos \theta \hat x + \sin \theta \hat y \hfill \cr \hat \theta \left( \theta \right) = - \sin \theta \hat x + \cos \theta \hat y \hfill \cr} \right.$$
and then solving for ${\hat x}$ and ${\hat y}$ leads to
$$\left\{ \matrix{ \hat x = \cos \theta \hat p - \sin \theta \hat \theta \hfill \cr \hat y = \sin \theta \hat p + \cos \theta \hat \theta \hfill \cr} \right.$$
and hence you can write your final answer in cylindrical coordinates.
Also, some other tricks may work. According to the first pair of equations above, you can simply conclude that
$$\left\{ \matrix{ {{d\hat p} \over {d\theta }} = \hat \theta \hfill \cr {{d\hat \theta } \over {d\theta }} = - \hat p \hfill \cr} \right.$$
and hence your final answer should be
$$\int_0^{{\pi \over 4}} {\hat pd\theta } = - \int_0^{{\pi \over 4}} {{{d\hat \theta } \over {d\theta }}d\theta } = \left. { - \hat \theta } \right|_0^{{\pi \over 4}} = - \hat \theta \left( {{\pi \over 4}} \right) + \hat \theta \left( 0 \right)$$