Evaluating a double integral with non-trivial limits Problem:
Evaluate the following Integral:
$$ \int_0^{\infty} \int_{max(1-x,0)}^{\infty } 18e^{-2x}ye^{-3y} \,\, dy \,\, dx $$
Let $I$ be the integral we are trying to evaluate.
\begin{align*}
I &= \int_0^{\infty} \int_{max(1-x,0)}^{\infty } 18e^{-2x}ye^{-3y} \,\, dy \,\, dx \\
I &= \int_0^{1} \int_{1-x}^{\infty } 18e^{-2x}ye^{-3y} \,\, dy \,\, dx
   +  \int_1^{\infty} \int_{0}^{\infty } 18e^{-2x}ye^{-3y} \,\, dy \,\, dx \\
\end{align*}
\newline
\newline
Using an online integral calculator, we find:
$$ \int_0^{1} \int_{1-x}^{\infty } 18e^{-2x}ye^{-3y} = 1 - 9e^{-2} + 14e^{-3} $$
Using an online integral calculator, we find:
$$ \int_1^{\infty} \int_{0}^{\infty } 18e^{-2x}ye^{-3y} \,\, dy \,\, dx = 4e^{-3} $$
Using an online integral calculator, we find:
$$ \int_0^{\infty} \int_{max(1-x,0)}^{\infty } 18e^{-2x}ye^{-3y} \,\, dy = 9e^{-2} - 14e^{-3} $$
Hence my first step in solving the integral is wrong. What is the right first step?

Since:
$$
\max(1-x,\,0) =
\begin{cases}
1-x & \text{if} \; x < 1 \\
0 & \text{if} \; x \ge 1 \\
\end{cases}
$$
it follows that:
$$
\small
\begin{aligned}
\int_0^{\infty} \text{d}x \int_{\max(1-x,\,0)}^{\infty} 18\,e^{-2x}\,y\,e^{-3y}\,\text{d}y & = \int_0^1 \text{d}x \int_{1-x}^{\infty} 18\,e^{-2x}\,y\,e^{-3y}\,\text{d}y + \int_1^{\infty} \text{d}x \int_0^{\infty} 18\,e^{-2x}\,y\,e^{-3y}\,\text{d}y \\
& = \left(8\,e^{-2} - 14\,e^{-3}\right) + e^{-2} \\
& = 9\,e^{-2} - 14\,e^{-3}\,.
\end{aligned}
$$
If you want to verify it in Wolfram Mathematica or in Wolfram Alpha it's sufficient to write:
Integrate[18 Exp[-2 x] y Exp[-3 y], {x, 0, Infinity}, {y, Max[1 - x, 0], Infinity}]

or:
Integrate[18 Exp[-2 x] y Exp[-3 y], {x, 0, 1}, {y, 1 - x, Infinity}]

or:
Integrate[18 Exp[-2 x] y Exp[-3 y], {x, 1, Infinity}, {y, 0, Infinity}]

and you will get exactly the above results that can be calculated by hand.
I hope it's clear enough, good luck! ^_^
