Existence and uniqueness of solutions for a periodic boundary value problem