I've got a completely hypothetical problem, but it has an application in quantitative finance.

Consider the following integral;

Is there a simple way to write this so we can get rid of the maximum value notation in the integral, by say, changing the limits?

I've been experimenting but I'd like to hear what other people think!

What I first tried was this;

is the maximum when so the limit for the integral wrt y should change to

But what on earth becomes of the second integral? I can't think of an intuitive thing to do with it!