# Why is my integration coming negative?

I need to find 1st moment of Area of this triangle with respect to X-axis :-

The formula to do this is $$\int_R y\ da$$, where y is the distance of a differential area with respect to X-axis.

This is what I did :-

$$\text{We know that equation of a straight line is } y = mx + c \text{, where m = slope and c = y-intercept} \\ \text{Here, } m = \frac{\triangle y}{\triangle x} = \frac{0 - h}{-b - 0} = \frac{h}{b}\ \ \ \text{and}\ \ \ c = h \\ \therefore y = \frac{hx}{b} + h \implies x = \frac{b(y - h)}{h} \implies f(y) = \frac{b(y - h)}{h} \\ \text{Now, } \int_R y \ da = \int_0^h \int_0^{f(y)} y\ dx\ dy = \int_0^h [yx]_0^{f(y)} \ dy \\ = \int_0^h \frac{yb(y-h)}{h} dy = \int_0^h \left(\frac{y^2b}{h} - yb\right)dy = \left[\frac{y^3b}{3h}\right]_0^h - \left[\frac{y^2b}{2}\right]_0^h \\ =\frac{h^2b}{3} - \frac{h^2b}{2} = \boxed{\frac{-bh^2}{6}}$$

This shouldn't be negative. What am I doing wrong in my calculation ?

• In your inner integral you integrated from $x=0$ to $x=f(y)<0$, so of course the answer is negative because you choose the negative orientation. Commented Jun 14, 2019 at 5:29

in the double integration , the limits in x direction are taken from left to right and in y-direction from down to up, so $$\int_R y \ da=\int_{0}^{h}\int_{f(y)}^{0}ydxdy$$
It should be negative. Notice the $$\text{d} y$$ means that you integrated on $$y$$-axis, so that it is same that you rotated the coordinate system for $$90$$ degrees anticlockwise. Then you will find the integration part under the axis, and that explains why the result is negative.
• Integrating $F(x,y)=y$ over an area $R$ where $y\ge 0$ should not be negative. The integral should be $\int_R y\,\mathrm dA = \int_0^h \int_{f(y)}^0 y\,\mathrm dx\,\mathrm dy$ since $f(y) \le 0$ for all $0\le y\le h$. Commented Jun 14, 2019 at 5:44
• My point is that the first moment of $R$ with respect to the $x$-axis should not be negative. Commented Jun 14, 2019 at 5:47