add option to choose IPOPT as a solver
use ipopt to check derivative