It's tedious to check though, because answers to these questions can look surprisingly different, depending on how you apply the equation sin^2(x) = 1 - cos^2(x), and what value you choose for the constant of integration. I asked Maple for the difference between these two expressions, and since the answer came back (-9/35)sin(x) - (9/70)cos^2(x)sin(x), which itself has a few different ways in which it can be expressed, none of them being equal to zero, the student's original answer is incorrect.
A correct answer that closely resembles the student's answer is: (1/7)cos^6(x)sin(x) + (6/35)cos^4(x)sin(x) + (8/35)cos^2(x)sin(x) + (16/35)sin(x), and I suspect that a calculation error was made somewhere late in the student's solution.
The answer is that the centroid, or centre of mass, does not generally have half the mass on one side and half on the other. When we calculate the centre of mass of an object or a region, we weight the mass or density at a position according to its signed distance from the origin. Mass that is further away from the centroid counts for more than mass that is nearby.
Consider a seesaw. Two people of unequal weights can balance on one, provided they position themselves at distances from the fulcrum that are inversely proportional to their weights. In doing so, they place their centroid on the fulcrum, and the seesaw swings freely.
Alternately, consider a triangle of uniform density. From high school math, we know that its centroid lies at the intersection of its medians, the cevians (lines) that join each vertex to the midpoint of the opposite side. The cevians divide the triangle into six smaller triangles of equal area (prove this), and clearly the mass on one side of any cevian is equal to the mass on the other. But if we cut the triangle through its centroid and parallel to one of its sides, we'll get 4/9 its mass on one side and 5/9 on the other (prove this too).