# I have the folllwoing integral <msubsup> &#x222B;<!-- ∫ --> 0 <mrow class="MJX-TeXAt

I have the folllwoing integral

and I would like to know why exaclty one can rewrite it as follows
$\left({\int }_{0}^{\pi /4}{\mathrm{sin}}^{2}\left(\rho \right)-\mathrm{cos}\left(\rho \right){\mathrm{sin}}^{2}\left(\rho \right)\phantom{\rule{thinmathspace}{0ex}}d\rho \right){\int }_{0}^{2\pi }\mathrm{sin}\theta \phantom{\rule{thinmathspace}{0ex}}d\theta .$
You can still ask an expert for help

• Questions are typically answered in as fast as 30 minutes

Solve your problem for the price of one coffee

• Math expert for every subject
• Pay only if we can solve it

Julien Carrillo
First, factor out the sinθ:
${\int }_{0}^{\pi /4}{\int }_{0}^{2\pi }\left({\mathrm{sin}}^{2}\left(\rho \right)-\mathrm{cos}\left(\rho \right){\mathrm{sin}}^{2}\left(\rho \right)\right)\mathrm{sin}\theta \phantom{\rule{thinmathspace}{0ex}}d\theta \phantom{\rule{thinmathspace}{0ex}}d\rho .$
Since $\rho$ does not depend on $\theta$, it can be factored out of the inner $\theta$ integral (just as a constant can be factored out of an integral):
${\int }_{0}^{\pi /4}\left({\mathrm{sin}}^{2}\left(\rho \right)-\mathrm{cos}\left(\rho \right){\mathrm{sin}}^{2}\left(\rho \right)\right){\int }_{0}^{2\pi }\mathrm{sin}\theta \phantom{\rule{thinmathspace}{0ex}}d\theta \phantom{\rule{thinmathspace}{0ex}}d\rho .$
The quantity ${\int }_{0}^{2\pi }\mathrm{sin}\theta \phantom{\rule{thinmathspace}{0ex}}d\theta$ is just a number (in this case, it is zero), so it can be factored out of the outer $\rho$ integral just as any number can:
$\left({\int }_{0}^{\pi /4}\left({\mathrm{sin}}^{2}\left(\rho \right)-\mathrm{cos}\left(\rho \right){\mathrm{sin}}^{2}\left(\rho \right)\right)\phantom{\rule{thinmathspace}{0ex}}d\rho \right){\int }_{0}^{2\pi }\mathrm{sin}\theta \phantom{\rule{thinmathspace}{0ex}}d\theta .$
In general, the following holds via the same logic:
${\int }_{a}^{b}{\int }_{c}^{d}f\left(x\right)g\left(y\right)\phantom{\rule{thinmathspace}{0ex}}dy\phantom{\rule{thinmathspace}{0ex}}dx=\left({\int }_{a}^{b}f\left(x\right)\phantom{\rule{thinmathspace}{0ex}}dx\right)\left({\int }_{c}^{d}g\left(y\right)\phantom{\rule{thinmathspace}{0ex}}dy\right).$