# Problem formulation

I want to solve the following problem in CVX.

min_{t,d} t+.5*d'*d
s. t. a_i*d+g_i(x+d)-g_i(x)<=t
i=1,2,..,m
lb<=x+d<=ub


t\in R, d\in R^n

where g_i is convex nodifferentiable nonlinear function, a_i are row vector, x is parameter.

You haven’t told us what g_i is. That is relevant to how it must be entered into CVX, or indeed whether CVX can even handle it.

Please read http://cvxr.com/cvx/doc/ , and then if you are having difficulty, make another post indicating specifically where you need help.

g_i is nonlinear convex function not necessarily differentiable. Since g_i is convex, g_i(x+d)-g_i(x) is convex for some fixed x. a_i*d and -t are linear. Hence convex. Also the objective function is quadratic. So the minimization problem is convex.
How can I solve this problem using CVX.

I didn’t dispute that the problem is convex. I said that you need to tell us what g_i  is before we can tell you if and how it can be input n CVX.

g_i(x)=max(u1ix,u2ix), i=1,2,…,m where u1, u2 \in R^ m*n are fixed parameters.

Please read the CVX User’s Guide and attempt to implement this, which should be fairly stragghtrward, because max is supported by CVX (hint: you can define constraints inside for loops). Then if you have any specific difficulties, please show your code and state what those difficulties are.

help cvx/max

Disciplined convex/geometric programming information:
max is convex, log-log-convex, and nondecreasing in its first
two arguments. Thus when used in disciplined convex programs,
both arguments must be convex (or affine). In disciplined
geometric programs, both arguments must be log-convex/affine.