How to solve integral with min in boundary?
Note that$$\int_0^{\min(2x^2,1-x)}3x+1\,\mathrm dy\tag1$$is an integral with respect to $y$. But there is no $y$ in $3x+1$. So, since we always have $\int_a^bc\,\mathrm dx=c(b-a)$, $(1)$ is equal to $\bigl(\min(2x^2,1-x)-0\bigr)(3x+1)$.