Also, note that including the boundary term from integration-by-parts (assuming there isn’t a DirichletBC, in which case d would be zero) is essentially leaving the boundary condition unspecified. Without choosing a specific boundary condition, there are many possible solutions satisfying the interior equation, so the problem for c will be ill-posed.