Previous Up Next

6.21.8  Determining where a function is convex: convex

The convex command determines where a function is convex.

The command operates by computing the Hessian Hf of f (see Section 6.21.3) and its principal minors (in total 2n of them where n is the number of parameters) and checks their signs. If all minors are nonnegative, then Hf is positive semidefinite and f is therefore convex. Simplification is by default applied when generating convexity conditions. With a third argument of simplify=false, only rational normalization is performed (using the ratnormal command). simplify=true is the same as the default.

The function f is said to be concave if the function g=−f is convex.


Examples.


The algorithm respects the assumptions that may be set upon variables. Therefore, the convexity of a given function can be checked on a particular domain.


Examples.


Previous Up Next