Exact relaxations of non-convex variational problems