<s>[INST] What is the difference to compute double integral? I see a double integral on web with a strange way to calculate. Please help me to make it clear.
Here is the integral:
$$\int_1^2\int_1^2(x+y)\ dx\ dy$$
As my way, I calculate it:
$$\int_1^2\int_1^2(x+y)\ dx\ dy= \int_1^2\left. {\left( {\frac{{{x^2}}}{2} + xy} \right)} \right|_{x = 1}^{x = 2}dy =\int_1^2 (\frac{3}{2}+y)\ dy $$.
But in the solution, they work is very strange:
\begin{array}{l}
\int\limits_1^2 {\int\limits_1^2 {\left( {x + y} \right)dxdy = \frac{1}{2}\int\limits_1^2 {\left. {{{\left( {x + y} \right)}^2}} \right|_{x = 1}^{x = 2}dy} } } \\
   = \frac{1}{2}\int\limits_1^2 {\left[ {{{\left( {y + 2} \right)}^2} - {{\left( {y + 1} \right)}^2}} \right]dy} \\
 = \frac{1}{6}\left[ {{{\left( {y + 2} \right)}^3} - {{\left( {y + 1} \right)}^3}} \right]_{y = 1}^{y = 2}
\end{array}.
Two way out two results, but their result is right. 
Pls help me explain?
 [/INST] The second one approach is using substitution $u=x+y\;\Rightarrow\;du=dx$, then the inner integral turns out to be
$$
\int_{1}^2 (x+y)\ dx = \int_{x=1}^2 u\ du = \left.\frac12u^2\right|_{x=1}^2 = \left.\frac12(x+y)^2\right|_{x=1}^2=\frac12\left[(y+2)^2-(y+1)^2\right].
$$
Similarly, the next integral is solved by using substitution $u=y+2\;\Rightarrow\;du=dy$ and $v=y+1\;\Rightarrow\;dv=dy$. 
</s>