how to calculate this double integral

I have this double integral: $$\int_0^\frac{\pi}{4}\int_0^\frac{\pi}{2}(\cos x + \sin y) \, dy \, dx$$

Is this correct? \begin{align*} \int_0^\frac{\pi}{2}(\cos x + \sin y) \, dy &= \int_0^\frac{\pi}{2}\cos x \, dy + \int_0^\frac{\pi}{2}\sin y \, dy \\ &= \cos x\int_0^\frac{\pi}{2} 1 \,dy + \int_0^\frac{\pi}{2} \sin y \, dy \\ &= (\cos x)\frac{\pi}{2} + \left(-\cos \frac{\pi}{2} + 1 \right) \\ &= (\cos x) \frac{\pi}{2} - 0 + 1 = \frac{\pi}{2} \cos x +1 \end{align*}

and now the second integral: \begin{align*} \int_0^\frac{\pi}{4}\frac{\pi}{2} \cos x + 1 \, dx &= \int_0^\frac{\pi}{4}\frac{\pi}{2}\cos x + \int_0^\frac{\pi}{4} 1 \, dx \\ &= \frac{\pi}{2}\int_0^\frac{\pi}{4}(\cos x)dx + \left(\frac{\pi}{4}-0\right) \\ &= \frac{\pi}{2} \left(\sin \frac{\pi}{4} - \sin 0\right) + \frac{\pi}{4} \\ &= \frac{\pi}{2}\left(\frac{\sqrt{2}}{2} - 0\right) + \frac{\pi}{4} + = \frac{\pi \sqrt{2}}{4} + \frac{\pi}{4} = \frac{\pi (\sqrt{2}+1)}{4} \end{align*} and now how it looks ?

• $-cos(\pi/2)+1 =1$ – Airbag May 26 '14 at 19:55

You are doing fine just be careful of the antiderivative of $\sin x$ which is $-\cos x$. So the only mistake that I am seeing is in the first line: $$\int_{0}^{\pi/2}\sin ydy=[-\cos y]_{0}^{\pi/2}=1-0$$ not $-1$.
You have written $[-\cos \dfrac{\pi}{2}-1]$ instead of $[-\cos \dfrac{\pi}{2}+1]$.