# 8 Nonlinear TutorialsΒΆ

This chapter provides information about how to solve general convex nonlinear optimization problems using **MOSEK**. By general nonlinear problems we mean those that cannot be formulated in conic or convex quadratically constrained form.

In general we recommend not to use the general nonlinear optimizer unless absolutely necessary. The reasons are:

- The algorithm employed for nonlinear optimization problems is not as efficient as the one employed for conic problems. Conic problems have special structure that can be exploited to make the optimizer faster and more robust.
**MOSEK**has no way of checking whether the formulated problem is convex and if this assumption is not satisfied the optimizer will not work.- The nonlinear optimizer requires 1st and 2nd order derivative information which is often hard to provide correctly.

Instead, we advise:

- Consider reformulating the problem to a conic quadratic optimization problem if at all possible. In particular many problems involving polynomial terms can easily be reformulated to conic quadratic form.
- Consider reformulating the problem to a separable optimization problem because that simplifies the issue with verifying convexity and computing 1st and 2nd order derivatives significantly. In most cases problems in separable form also solve faster because of the simpler structure of the functions.
- Finally, if the problem cannot be reformulated in separable form use a modelling language like AMPL or GAMS, which will perform all the preprocessing, computing function values and derivatives. This eliminates an important source of errors. Therefore, it is strongly recommended to use a modelling language at the prototype stage.

The Optimizer API for .NET provides the following nonlinear interfaces: