Let the vertices be A(-7,0), B(-2,9), C(3,6).
And the midpoints:
Midpoint of AB=D((-2-7)/2,9/2); midpoint of AC=E((-7+3)/2,3); midpoint of BC=F((-2+3)/2,(9+6)/2). So we have D(-9/2,9/2), E(-2,3), F(1/2,15/2).
Note that E has the same x-coordinate as B, which means the median BE is vertical x=-2. The length of BE is the difference between the y-coordinates=9-3=6. The centroid is ⅓ the way along the median from the bisected side. So that’s 6/3=2 units above E, that is, y=3+2=5. Therefore the centroid is at (-2,5).
CALCULUS METHOD
Shift red (given) triangle 7 units to the right—add 7 to the x coordinates—to create blue triangle. This operation simplifies the arithmetic. The vertices become A(0,0), B(5,9), C(10,6). The sides of the triangle AB, AC, BC become the functions f(x), g(x), h(x) as defined below. Referring to blue triangle:
f(x)=9x/5; g(x)=3x/5; h(x)=12-3x/5=3(4-x/5).
p(x)=f(x)-g(x)=6x/5; q(x)=h(x)-g(x)=3(4-2x/5).
r(x)=½(f(x)+g(x))=6x/5; s(x)=½(h(x)+g(x))=6.
r(x) and s(x) represent the midway (average) position between the two functions, that is, the locus of the centre of mass, which is needed for the y-moment.
A=∫p(x)dx[0,5]+∫q(x)dx[5,10]=[3x²/5]⁵₀+3[4x-x²/5]¹⁰₅=15+15=30.
The x-moment is:
Ax̄=∫xp(x)dx[0,5]+∫xq(x)dx[5,10]=[2x³/5]⁵₀+3[2x²-2x³/15]¹⁰₅=50+100=150.
x̄=150/30=5.
The y-moment is:
Aȳ=∫p(x)r(x)dx[0,5]+∫q(x)s(x)dx[5,10]=
(36/25)∫x²dx[0,5]+18∫(4-2x/5)dx[5,10]=
(12/25)[x³]⁵₀+18[4x-x²/5]¹⁰₅=60+18(20-15)=150.
ȳ=150/30=5.
(x̄,ȳ)=(5,5).
Equivalent centroid in red triangle is (x̄-7,ȳ)=(-2,5).