The centroid lies on the y-axis (x=0), because the semicircle is symmetrical about this axis. We need to find the y coord.
The centroid is the "centre of mass" of the semicircle, and it can be considered to be made up of a number of very thin rectangles of width dx and length y or width dy and length x. The area of each rectangle is ydx (vertical) or xdy (horizontal) and the mass of the rectangle is proportional to this area. The area of the semicircle is 1/2 the area of its circle, which is (pi)r^2 where r is the radius, which is given by the equation of the circle x^2+y^2=4=r^2. The area of the semicircle is therefore 2(pi) and its mass is proportional to this area.
The centroid is the average of the "moments" of the rectangles divided by the mass of the semicircle. The moment is mass*distance from the origin=xydx or yxdy for x and y cords respectively. The sum of these moments is the integral(xydx) (x coord) and integral(yxdy) (y coord) between the limits -2 and 2 for x, and 0 and 2 for y. These points on the axes are where the semicircle intersects.
The centroid is the point (integral(xydx)/2(pi),integral(yxdy)/2(pi)). y=sqrt(4-x^2) or x=sqrt(4-y^2), and the integral(ysqrt(4-y^2)dy)/2(pi)=-(2/3)(4-y^2)^(3/2)/4(pi). This will give us the y coord of the centroid, and we already know the x coord is zero because of symmetry. The limits for y are 0 to 2: (2/3)4^(3/2)/4(pi)=(2/3)8/4(pi)=4/(3(pi))=0.4244. So the centroid is (0,0.4244).
[integral(ysqrt(4-y^2)dy)/2(pi): let u=4-y^2, then du=-2ydy, so ydy=-du/2. The integral becomes integral(-u^(1/2)du)/4(pi)=-(2/3)u^(3/2)/4(pi)=-(2/3)(4-y^2)^(3/2)/4(pi).]