2

I have come to an exercise in a multivariate calculus book that I am having trouble with. The problem is :

Show that $\int\int_{[0,\pi]\times[0,\pi]} |\cos(x+y)| d(x,y) = 2 \pi$

I have attempted solving the problem but I'm not getting the right answer. I know there are probably other ways to solve this problem, but here I am seeking help from others to see where I am going wrong in my solution. My solution is below :

Let : \begin{equation} R = [0,\pi] \times [0,\pi] \end{equation} We see : \begin{equation} \{ x + y \; : \; (x,y) \in R \} = [0,2\pi] = T \end{equation} We see : \begin{equation} | \cos(x+y) | = \begin{cases} \cos(x+y) \; & \forall \; x + y \in \left[ 0 , \frac{\pi}{2} \right] \bigcup \left[ \frac{3\pi}{2} , 2 \pi \right] \\ -\cos(x+y) \; & \forall \; x + y \in \left[ \frac{\pi}{2} , \frac{3\pi}{2} \right] \end{cases} \end{equation} Define : \begin{align} D_{1} & = \left\{ (x,y) \in R \; : \; x + y \in \left[ 0 , \frac{\pi}{2} \right] \right\} \\ D_{2} & = \left\{ (x,y) \in R \; : \; x + y \in \left[ \frac{3\pi}{2} , 2\pi \right] \right\} \\ D_{3} & = \left\{ (x,y) \in R \; : \; x + y \in \left[ \frac{\pi}{2} , \frac{3\pi}{2} \right] \right\} \end{align} We see : \begin{equation} T = D_{1} \bigcup D_{2} \bigcup D_{3} \end{equation} and : \begin{align} D_{1} \bigcap D_{2} & = \emptyset \\ D_{1} \bigcap D_{3} & = \left\{ (x,y) \in R \; : \; x + y = \frac{\pi}{2} \right\}\\ D_{2} \bigcap D_{3} & = \left\{ (x,y) \in R \; : \; x + y = \frac{3\pi}{2} \right\} \end{align} We see : \begin{align} (x,y) \in D_{1} \bigcap D_{3} & \Rightarrow \cos(x+y) = 0 \\ (x,y) \in D_{2} \bigcap D_{3} & \Rightarrow \cos(x+y) = 0 \end{align} So : \begin{equation} \int\int_{R} |\cos(x+y)| d(x,y) = \int\int_{D_{1}} \cos(x+y)d(x,y) + \int\int_{D_{2}} \cos(x+y)d(x,y) - \int\int_{D_{3}} \cos(x+y)d(x,y) \end{equation} We see : \begin{align} (x,y) \in D_{1} & \Rightarrow x \in \left[ 0 , \frac{\pi}{2} \right] \text{ and } y \in \left[ 0 , \frac{\pi}{2} - x \right] \\ (x,y) \in D_{2} & \Rightarrow x \in \left[ \frac{\pi}{2} , \pi \right] \text{ and } y \in \left[ \frac{3\pi}{2} - x , \pi \right] \end{align} Let's say : \begin{equation} D_{3} = D_{3}^{(a)} \bigcup D_{3}^{(b)} \end{equation} where : \begin{align} D_{3}^{(a)} & = \left\{ (x,y) \in D_{3} \; : \; x \in \left[ 0 , \frac{\pi}{2} \right] \right\}\\ D_{3}^{(b)} & = \left\{ (x,y) \in D_{3} \; : \; x \in \left[ \frac{\pi}{2} , \pi \right] \right\} \end{align} So : \begin{align} (x,y) \in D_{3}^{(a)} & \Rightarrow x \in \left[ 0 , \frac{\pi}{2} \right] \text{ and } y \in \left[ \frac{\pi}{2} - x , \pi \right] \\ (x,y) \in D_{3}^{(b)} & \Rightarrow x \in \left[ \frac{\pi}{2} , \pi \right] \text{ and } y \in \left[ 0 , \frac{3\pi}{2} - x \right] \end{align} and : \begin{equation} (x,y) \in D_{3}^{(a)} \bigcap D_{3}^{(b)} \Leftrightarrow x = \frac{\pi}{2} \text{ and } y \in \left[ 0, \pi \right] \end{equation} So : \begin{equation} \int\int_{D_{3}} \cos(x+y)d(x,y) = \int\int_{D_{3}^{(a)}} \cos(x+y)d(x,y) + \int\int_{D_{3}^{(b)}} \cos(x+y)d(x,y) - \int\int_{D_{3}^{(a)}\bigcap D_{3}^{(b)}} \cos(x+y)d(x,y) \end{equation} We can see that $D_{1},D_{2},D_{3}^{(a)},D_{3}^{(b)}$, and $D_{3}^{(a)} \bigcap D_{3}^{(b)}$ are all elementary regions. So we can use Fubini's theorm to evaluate each.

Let : \begin{align} \phi_{1}(x) & = 0 \\ \phi_{2}(x) & = \frac{\pi}{2} - x \end{align} So : \begin{align} \require{cancel} \int\int_{D_{1}} \cos(x+y)d(x,y) & = \int_{0}^{\frac{\pi}{2}} \left[ \int_{\phi_{1}(x)}^{\phi_{2}(x)} \cos(x+y) dy \right] dx\\ & = \int_{0}^{\frac{\pi}{2}} \left[ \int_{0}^{\frac{\pi}{2} - x} \cos(x+y) dy \right] dx\\ & = \int_{0}^{\frac{\pi}{2}} \left( \sin(x+y) \Bigr|_{0}^{\frac{\pi}{2} - x} \right) dx \\ & = \int_{0}^{\frac{\pi}{2}} \left( \sin\left( \cancel{x} + \frac{\pi}{2} - \cancel{x} \right) - \sin(x) \right) dx\\ & = \int_{0}^{\frac{\pi}{2}} \sin\left( \frac{\pi}{2} \right) dx - \int_{0}^{\frac{\pi}{2}} \sin(x) dx \\ & = \int_{0}^{\frac{\pi}{2}} 1 dx + \left( \cos(x) \Bigr|_{0}^{\frac{\pi}{2}} \right)\\ & = \frac{\pi}{2} + \cos\left( \frac{\pi}{2} \right) - \cos(0) \\ & = \frac{\pi}{2} + 0 - 1 \\ & = \frac{\pi}{2} - 1 \end{align} Let : \begin{align} \phi_{1} & = \frac{3\pi}{2} - x \\ \phi_{2} & = \pi \end{align} So : \begin{align} \int\int_{D_{2}} \cos(x+y)d(x,y) & = \int_{\frac{\pi}{2}}^{\pi} \left( \int_{\phi_{1}(x)}^{\phi_{2}(x)} \cos(x+y) dy \right) dx\\ & = \int_{\frac{\pi}{2}}^{\pi} \left( \sin(x+y)\Bigr|_{\frac{3\pi}{2} - x}^{\pi} \right) dx\\ & = \int_{\frac{\pi}{2}}^{\pi} \left( \sin(x+\pi) - \sin\left( \cancel{x} + \frac{3\pi}{2} - \cancel{x} \right) \right)dx\\ & = \int_{\frac{\pi}{2}}^{\pi} \sin(x+\pi) dx - \int_{\frac{\pi}{2}}^{\pi} \sin\left( \frac{3\pi}{2} \right) dx\\ & = \int_{\frac{\pi}{2}}^{\pi} \left[ \sin(x)\cos(\pi) + \cancel{\sin(\pi)\cos(x)} \right] dx + \int_{\frac{\pi}{2}}^{\pi} dx\\ & = \left( - \int_{\frac{\pi}{2}}^{\pi} \sin(x) dx \right) + \frac{\pi}{2} \\ & = \cos(x) \Bigr|_{\frac{\pi}{2}}^{\pi} + \frac{\pi}{2} \\ & = \cos(\pi) - \cancel{\cos\left( \frac{\pi}{2} \right)} + \frac{\pi}{2} \\ & = -1 + \frac{\pi}{2} \\ & = \frac{\pi}{2} - 1 \end{align} Now let : \begin{align} \phi_{1}(x) & = \frac{\pi}{2} - x \\ \phi_{2}(x) & = \pi \end{align} So : \begin{align} \int\int_{D_{3}^{(a)}} \cos(x+y) d(x,y) & = \int_{0}^{\frac{\pi}{2}} \left[ \int_{\phi_{1}(x)}^{\phi_{2}(x)} \cos(x+y) dy \right] dx\\ & = \int_{0}^{\frac{\pi}{2}} \left( \sin(x+y) \Bigr|_{\frac{\pi}{2} - x}^{\pi} \right) dx\\ & = \int_{0}^{\frac{\pi}{2}} \sin(x+\pi) dx - \int_{0}^{\frac{\pi}{2}} \sin\left(\cancel{x} + \frac{\pi}{2} - \cancel{x} \right) dx\\ & = \int_{0}^{\frac{\pi}{2}} \left( \sin(x)\cos(\pi) + \cancel{\sin(\pi)\cos(x)} \right) dx - \int_{0}^{\frac{\pi}{2}} \sin\left( \frac{\pi}{2} \right) dx\\ & = -\int_{0}^{\frac{\pi}{2}} \sin(x) dx + 0 - \frac{\pi}{2}\\ & = \cos(x) \Bigr|_{0}^{\frac{\pi}{2}} - \frac{\pi}{2} \\ & = \cancel{\cos\left( \frac{\pi}{2} \right)} - \cos(0) - \frac{\pi}{2}\\ & = -1 - \frac{\pi}{2} \end{align} Now let : \begin{align} \phi_{1}(x) & = 0\\ \phi_{2}(x) & = \frac{3\pi}{2} - x \end{align} So : \begin{align} \int\int_{D_{3}^{(b)}} \cos(x+y)d(x,y) & = \int_{\frac{\pi}{2}}^{\pi} \left( \int_{\phi_{1}(x)}^{\phi_{2}(x)} \cos(x+y) dy \right) dx\\ & = \int_{\frac{\pi}{2}}^{\pi} \left( \sin(x+y) \Bigr|_{0}^{\frac{3\pi}{2} - x} \right) dx\\ & = \int_{\frac{\pi}{2}}^{\pi} \left[ \sin\left( \cancel{x} + \frac{3\pi}{2} - \cancel{x} \right) - \sin(x) \right] dx\\ & = - \int_{\frac{\pi}{2}}^{\pi} 1 dx - \int_{\frac{\pi}{2}}^{\pi} \sin(x) dx \\ & = -\frac{\pi}{2} + \left( \cos(\pi) - \cos\left( \frac{\pi}{2} \right) \right)\\ & = -\frac{\pi}{2} - 1 \end{align} We see : \begin{align} \int\int_{D_{3}^{(a)} \bigcap D_{3}^{(b)}} \cos(x+y) d(x,y) & = \int_{0}^{\pi} \cos\left( \frac{\pi}{2} + y \right) dy \\ & = \int_{0}^{\pi} \left[ \cancel{\cos\left(\frac{\pi}{2}\right)\cos(y)} - \sin\left(\frac{\pi}{2}\right) \sin(y) \right] dy\\ & = -\int_{0}^{\pi} \sin(y) dy\\ & = \cos(y) \Bigr|_{0}^{\pi}\\ & = \cos(\pi) - \cos(0)\\ & = -1 - 1 = -2 \end{align} So : \begin{align} \int\int_{D_{3}} \cos(x+y)d(x,y) & = \left( -1 - \frac{\pi}{2} \right) + \left( -\frac{\pi}{2} - 1 \right) - (-2)\\ & = \cancel{-2} - \pi + \cancel{2} \\ & = -\pi \end{align} So : \begin{align} \int\int_{R} |\cos(x+y)|d(x,y) & = \left( \frac{\pi}{2} - 1 \right) + \left( \frac{\pi}{2} - 1 \right) - (-\pi)\\ & = \pi - 2 + \pi\\ & = 2 \pi - 2 \neq 2\pi \end{align} So I made a mistake somewhere.

Can anyone help me see where I made the mistakes that lead to the incorrect result.

scipio
  • 595
  • It relates to a different solution, so it's not an answer to your question, but we could even show $$\iint_{[0,\pi]\times[0,\pi]} |\cos(x+\psi(y))| d(x,y) = 2 \pi$$ for any function $\psi : [0,\pi] \to \mathbb{R}$ which is mildly well-behaved (e.g. bounded with finitely many discontinuities) just by considering the period of $|\cos(x)|$... – Brian Moehring Apr 30 '21 at 17:29
  • 1
    One of the answers already calls out your mistake. You have an additional integral giving $-2$, that is invalid. I added an answer using change of variable that makes it simpler to evaluate. – Math Lover Apr 30 '21 at 19:24

3 Answers3

1

I think where you went wrong was subtracting the integral over $D_3^{(a)} \cap D_3^{(b)}$. Remember that an integral over a 2D region can be thought of as the volume underneath the surface over that region. Therefore, what you calculated for the integral over $D_3^{(a)} \cap D_3^{(b)}$ is actually the area underneath this curve (which is a plane). However, it makes no sense to be adding an area of a plane to the volume under a region. (Alternatively, that plane has 0 volume, so "double counting" in the integral for $D_3^{(a)}$ and $D_3^{(b)}$ has no affect).

If you omit that integral, you should get the correct answer.

0

Hint: Use the cosine angle addition identity $$ \cos(x+y) = \cos(x) \cos(y) - \sin(x) \sin(y) $$

Then break up the region of integration into subregions. I.e.

$$(x,y) \in [0, \frac{\pi}{4}] \times [0, \frac{\pi}{4}] \cup [0, \frac{\pi}{4}] \times [\frac{\pi}{4}, \frac{\pi}{2}] \cup [0, \frac{\pi}{4}] \times [\frac{\pi}{2}, \frac{3\pi}{4}] \cup [0, \frac{\pi}{4}] \times [\frac{3\pi}{4}, \pi] \cup [\frac{\pi}{4}, \frac{\pi}{2}] \times [0, \frac{\pi}{4}] \cup [\frac{\pi}{4}, \frac{\pi}{2}] \times [\frac{\pi}{4}, \frac{\pi}{2}] \cup [\frac{\pi}{4}, \frac{\pi}{2}] \times [\frac{\pi}{2}, \frac{3\pi}{4}] \cup [\frac{\pi}{4}, \frac{\pi}{2}] \times [\frac{3\pi}{4}, \pi] \cup [\frac{\pi}{2}, \frac{3\pi}{4}] \times [0, \frac{\pi}{4}] \cup [\frac{\pi}{2}, \frac{3\pi}{4}] \times [\frac{\pi}{4}, \frac{\pi}{2}] \cup [\frac{\pi}{2}, \frac{3\pi}{4}] \times [\frac{\pi}{2}, \frac{3\pi}{4}] \cup [\frac{\pi}{2}, \frac{3\pi}{4}] \times [\frac{3\pi}{4}, \pi] \cup [\frac{3\pi}{4}, \pi] \times [0, \frac{\pi}{4}] \cup [\frac{3\pi}{4}, \pi] \times [\frac{\pi}{4}, \frac{\pi}{2}] \cup [\frac{3\pi}{4}, \pi] \times [\frac{\pi}{2}, \frac{3\pi}{4}] \cup [\frac{3\pi}{4}, \pi] \times [\frac{3\pi}{4}, \pi] $$

In each of these regions you can determine the sign of the expression and rewrite the integral in each subregion without the absolute value bars. This allows you to distribute the integration over many easy trig integrals.

John_Krampf
  • 416
  • 2
  • 12
0

I will use the transformation $u = x + y, v = x - y$. The region transforms into a square with one of the diagonals being on one of the coordinate axes with one of the vertices at the origin.

$|J| = \frac{1}{2}$

$0 \leq x \leq \pi, 0 \leq y \leq \pi \implies $

$-v \leq u \leq (2\pi +v), - \pi \leq v \leq 0 $
$v \leq u \leq (2\pi - v), 0 \leq v \leq \pi $

So the integral becomes,

i) $- \pi \leq v \leq 0$

$\displaystyle \int_{-\pi}^0 \int_{-v}^{2\pi+v} |\cos u| \ |J| \ du \ dv$

$ = \displaystyle \frac{1}{2} \int_{-\pi}^{-\pi/2} \int_{-v}^{2\pi+v} - \cos u \ du \ dv$ +

$\displaystyle \frac{1}{2} \int_{-\pi/2}^0 \int_{-v}^{\pi/2} \cos u \ du \ dv + \frac{1}{2} \int_{-\pi/2}^0 \int_{\pi/2}^{3\pi/2} - \cos u \ du \ dv + \frac{1}{2} \int_{-\pi/2}^0 \int_{3\pi/2}^{2\pi + v} \cos u \ du \ dv$

$ = 1 + \frac{\pi-2}{4} + \frac{\pi}{2} + \frac{\pi-2}{4} = \pi$

ii) $0 \leq v \leq \pi$

With a change of variable, $V = -v$, you can easily show that this integral is same as the first.

Hence the final answer is $\pi + \pi = 2\pi$.

Math Lover
  • 51,819