You have to be careful with signs of the rhs when passing from problem to varf. see discussion in this thread
problem
varf