In below figure
I need to find the coordinates of center of gravity which are $x$' and $y$' in order to find distances of $OG$ and $OS$. To explain the figure; $x^q+y^q<=1$, area of $ROP$ is not circular because degree of $q$ is bigger than $2$. I need the solution for any $x^q+y^q<=1$ , for any $q$ which is between $3$ and $\infty$.

Hint:
If you can compute the area and first order moments under the curve, you are (nearly) done.
The explicit equation of the curve can be written
The area is given by the integral of
and the
x/ymoments, respectively byBy a change of variable
t:= x^q, all these integrands are turned to a formknown as the incomplete Beta function. So there is no closed-form solution for general exponents.
You have two choices:
use the Beta function from a mathematical library,
use numerical integration (Simson's rule).