# Integral with the Heaviside step function

I am facing some integrals of the form: $$I=\int_{0\le x\le a}\left(\int_{0\le y\le a}f(x,y)\theta(a-x-y)dy\right)dx$$ actually, I am not familiar with this kind of integral. How can I calculate it?

## migrated from physics.stackexchange.comJul 21 '17 at 13:59

This question came from our site for active researchers, academics and students of physics.

Since $\theta(a-x-y)$ is equal to $1$ only when $a-x-y \geq 0$ (i.e., $y \leq a-x$) and is equal to $0$ everywhere else, your integral is equivalent to integrating $f(x,y)$ over a triangular domain whose three vertices are $(0,0)$, $(0,a)$ and $(a,0)$. Therefore $$I = \int_{0}^{a}dx\int_{0}^{a-x}dy ~f(x,y)\ .$$ Hope this helps.
Assuming $a\geq 0$, it is by definition $\int_0^a\mathrm{d}x \int_0^{a-x}\mathrm{d}y ~f(x,y).$