A *nonlinear *function is any function of the variables that is not linear, i.e. which cannot be written in the algebraic form:

*a*_{1}x_{1} + a_{2}x_{2} + ... + a_{n}x_{n}

Examples are =1/C1, =LOG(C1), and =C1^2, where C1 is a decision variable. All of these are called *continuous* functions, because their graphs are curved but contain no “breaks.” =IF(C1>10,D1,2*D1) is also a nonlinear function, but it is “worse” (from Solver’s viewpoint) because it is *discontinuous*: Its graph contains a “break” at C1=10 where the function value jumps from D1 to 2*D1. At this break, the rate of change (i.e. the derivative) of the function is undefined. The GRG Nonlinear Solving method relies on derivatives to seek improved solutions, so it may have trouble with a Solver model containing functions like =IF(C1>10,D1,2*D1).

If the graph of the function’s *derivative* also contains no breaks, then the original function is called a *smooth* function. If it does contain breaks, then the original function is *non-smooth*. Every discontinuous function is also non-smooth. An example of a continuous function that is non-smooth is =ABS(C1) – its graph is an unbroken “V” shape, but the graph of its derivative contains a break, jumping from –1 to +1 at C1=0. The GRG Nonlinear Solving method uses an approximation of second order derivatives to make faster progress, and to test whether the optimal solution has been found; it may have some trouble with functions such as =ABS(C1).

**Convex, Concave and Non-Convex Smooth Functions**

A general nonlinear function of even one variable may be **convex**, concave or **non-convex**. A function can be convex but non-smooth: =ABS(C1) with its V shape is an example. A function can also be smooth but non-convex: = SIN(C1) is an example. But the “best” nonlinear functions, from Solver’s point of view, are both *smooth* and *convex* (concave for the objective if you are maximizing).

If a smooth function’s second derivative is always nonnegative, it is a *convex* function; if its second derivative is always nonpositive, it is a *concave* function. This property extends to any number of ‘dimensions’ or variables, where the second derivative becomes the Hessian and “nonnegative” becomes “positive semidefinite.”