The electric displacement field $\vec D$ satisfies two equations, $$\vec\nabla \cdot \vec D=\rho_f,$$ and $$\vec\nabla \times \vec D=\vec\nabla \times \vec p,$$ where $\rho_f$ and $\vec p$ are the free charge density and the polarization respectively.
My question is quite simple. Suppose there is no free charge so $\rho_f=0$ and the polarization has no curl, so $\vec\nabla \times \vec p=0$. Still, the electric displacement field does not need to vanish, it could be constant. Actually, we have $\vec D=\vec p+\vec\nabla f$ for any harmonic function, $\nabla^2 f=0$.
How do I determineThe reason this constant?is bugging me is because in Problem 4.15 of the book by Griffiths, he asks the following question: in a system without free charges but with a given irrotational polarization $\vec p$, find $\vec D$. In the solution manual, he states that in the absence of free charges (and $\vec\nabla \times \vec p=0$) it follows that $\vec D=0$ (see figure). This seems incorrect to me.