Could you tell us more about the problem? A function, such as " " or " " does nothavea "center of gravity". That requires a physical object. A geometric object may have a "center" or "centroid" which can be calculated in the same way as a center of gravity and so called (but incorrectly in my opinion) "center of gravity". But you don't even have a geometric figure. Do you mean the center of gravity of two dimensional figure with boundary the graph of the given function and the x-axis? Or the center of gravity of the one dimensional curve? Or some other figure?

So please: do you mean the center of

1) The curve

2) The curve

3) The area between the graph of and the x- axis

4) The area between the graph of and the x- axis

or something else?