1. ## [SOLVED] Interesting Integral

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

Consider the following integral;

$\displaystyle \int_{-\infty}^{\infty}\int_{-\infty}^{\infty}\max(x^{3}y , y^{2}x) dx dy$

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!

$\displaystyle x^3y$ is the maximum when $\displaystyle y < x^2$ so the limit for the integral wrt y should change to $\displaystyle \int_{-\infty}^{x^2}x^3 y dy$
2. The key is to separate it into separate integrals over the distinct regions of the plane where $\displaystyle x^3y>xy^2$ (and the integrand thus equals $\displaystyle x^3y$), and the regions where $\displaystyle x^3y<xy^2$ (and the integrand equals $\displaystyle xy^2$). The curves dividing the plane into these regions are the solutions to $\displaystyle x^3y=xy^2$, which gives $\displaystyle x=0$, $\displaystyle y=0$, and $\displaystyle y=x^2$. These two lines and one parabola divide the plane into six regions; you will have the sum of the integrals of $\displaystyle x^3y$ over three of these regions and the integrals of $\displaystyle xy^2$ over the other three regions.