use solve_minimization function in vprime