Integrating over triangle area

58 Views Asked by At

How should I go about integrating some function $f(x, y)$ over area of an arbitrary triangle with one of vertices being $(0, 0)$, that is a triangle $(0, 0), (x_1, y_1), (x_2, y_2)$? Formally, how to define limits of integration of $$\int_{A } f(x, y)\,dA?$$

1

There are 1 best solutions below

0
On BEST ANSWER

There are several cases that you will have to take into account. Suppose, for instance, that $0<x_1<x_2$ and that $(x_2,y_2)$ lies above the line defined by $(0,0)$ and by $(x_1,y_1)$. Then your integral is equal to$$\int_0^{x_1}\int_{\frac{y_1}{x_1}x}^{\frac{y_2}{x_2}x}f(x,y)\,\mathrm dy\,\mathrm dx+\int_{x_1}^{x_2}\int_{\frac{y_2-y_1}{x_2-x_1}(x-x_1)+y_1}^{\frac{y_2}{x_2}x}f(x,y)\,\mathrm dy\,\mathrm dx.$$Can you deal with the other cases?

enter image description here