# Area moment of inertia about the y-axis for a triangle [closed]

I have a triangle which I have divided into two smaller triangles. Now I'd like to compute the area moment of inertia about the y-axis for the blue triangle. I've set the origin in the bottom between the two triangles (the green dot on in the figure).

To compute it, I'll use the following integral:

$\int_{y=0}^{h}{\int_{x=0}^{?}{x^2}} dxdy$

I need help with the limits. I know that they should be limited by the lines along x and y-axis as well as the sloping line, but I don't know how! Are the limits I've put out correct, and if so, what should the limit marked with '?' be?

You need to find a relation for x and y which holds true along the hypotenuse of the blue triangle.

We have two data points:

at x = (b-a), y = 0 at x = 0, y = h

(taking the green dot as the origin)

the hypotenuse is a line with the equation y = mx + b

Here, b = h when x = 0 and

m = rise / run = (h - 0) / (0 - (b-a))

therefore, m = h / (a - b)

so the equation of the line segment forming the hypotenuse of the blue triangle is:

y = (h * x) / (a - b) + h

Since we are integrating first w.r.t. x, then the upper limit (marked ?) becomes:

x = (y - h) * (a - b) / h

The other limits are correct as indicated.