Modification to log_normcdf

I was wondering if it might be possible to create a modified version of log_normcdf as follows:

The current version computes the log of the Gaussian tail from -Inf to x, or, as is stated in the comments of log_normcdf:

%   Y = LOG_NORMCDF(X) is the logarithm of the CDF of the normal
%   distribution at the point X.
%
%                                1    / x
%       LOG_NORMCDF(X) = LOG( ------- |   exp(-t^2/2) dt )
%                             sqrt(2) / -Inf
%

(I believe this description is missing a pi in the denominator out front, but that’s irrelevant to my question).

I am interested in a problem where I’d like to compute the log of this same integral, but from x to y, instead of -Inf to x. This is still a concave function, so it should be possible and seems like it would be a trivial modification, but I don’t quite understand how cvx has implemented log_normcdf. How hard would this be to add? (Any pointers as to how to do it myself would be sufficient for now.)

ANSWER CHANGED: Sorry, I made a mistake in my earlier explanation. It is not, as I previously stated, equivalent to log_normcdf(x)-log_normcdf(y). It’s quite possible this is convex, but I simply haven’t seen a proof of it.

Nevertheless, my advice is the same. I would encourage you to look at the source code in functions/@cvx/log_normcdf.m to see what we did: we created a piecewise quadratic approximation of the function. There’s more difficulty here because this is a bivariate function.