How can I solve log(normalcdf(a-x)-normalcdf(b-x)) with cvx

I am presuming that x is your CVX (optimization) varable, and that a and b are constants.

CVX does have an approximation, log_normcdf , which is concave, and therefore can be maximized. But your objective is the log of the integral from b-x to a-x of the standard Normal density, which {superseded by edit below} is neither convex nor concave. Your only hope of using this in CVX might be to formulate a concave series approximation if maximizing, or a convex series approximation if minimizing. I have no reason to believe there is necessarily any such approximation which is adequate for optimization purposes.

Edit: In reply to subsequent post, the integral in question is neither convex nor concave, but its log appears to be concave in x.