<s>[INST] Centroid of a region $$y = x^3, x + y = 2, y = 0$$
I am suppose to find the centroid bounded by those curves. I have no idea how to do this, it isn't really explained well in my book and the places I have looked online do not help either.
 [/INST] The region you are interested is the blue shaded region shown in the figure below.

The coordinates of the centroid denoted as $(x_c,y_c)$ is given as $$x_c = \dfrac{\displaystyle \int_R x dy dx}{\displaystyle \int_R dy dx}$$ $$y_c = \dfrac{\displaystyle \int_R y dy dx}{\displaystyle \int_R dy dx}$$
where $R$ is the blue colored region in the figure above.
Let us compute the denominator in both cases i.e. $\int_R dy dx$. Note that this is nothing but the area of the blue region. Hence, we get that
\begin{align}
\int_R dy dx & = \int_{x=0}^{x=1} \int_{y=0}^{y=x^3} dy dx + \int_{x=1}^{x=2} \int_{y=0}^{y=2-x} dy dx = \int_{x=0}^{x=1} x^3 dx + \int_{x=1}^{x=2} (2-x) dx\\
& = \left. \dfrac{x^4}{4} \right \vert_{0}^{1} + \left. \left(2x - \dfrac{x^2}2 \right)\right \vert_{1}^{2} = \dfrac14 + \left( 2 \times 2 - \dfrac{2^2}{2} \right) - \left(2 - \dfrac12 \right) = \dfrac14 + 2 - \dfrac32 = \dfrac34
\end{align}
Now lets compute the numerator for both cases.
To find $x_c$, we need to evaluate $\int_R x dy dx$. We get that
\begin{align}
\int_R x dy dx & = \int_{x=0}^{x=1} \int_{y=0}^{y=x^3} x dy dx + \int_{x=1}^{x=2} \int_{y=0}^{y=2-x} x dy dx = \int_{x=0}^{x=1} x^4 dx + \int_{x=1}^{x=2} x(2-x) dx\\
& = \left. \dfrac{x^5}{5} \right \vert_{0}^{1} + \left. \left( x^2 - \dfrac{x^3}{3}\right) \right \vert_1^2 = \dfrac15 + \left( 2^2 - \dfrac{2^3}3\right) - \left( 1^2 - \dfrac{1^3}3\right) = \dfrac15 + \dfrac43 - \dfrac23 = \dfrac{13}{15}
\end{align}
To find $y_c$, we need to evaluate $\int_R x dy dx$. We get that
\begin{align}
\int_R y dy dx & = \int_{x=0}^{x=1} \int_{y=0}^{y=x^3} y dy dx + \int_{x=1}^{x=2} \int_{y=0}^{y=2-x} y dy dx\\
& = \int_{x=0}^{x=1} \left. \dfrac{y^2}{2} \right \vert_0^{x^3} dx + \int_{x=1}^{x=2} \left. \dfrac{y^2}{2} \right \vert_{0}^{2-x} dx\\
& = \int_{x=0}^{x=1} \dfrac{x^6}{2} dx + \int_{x=1}^{x=2} \dfrac{(2-x)^2}{2} dx = \left. \dfrac{x^7}{14} \right \vert_{0}^{1} + \left. \dfrac{(x-2)^3}{6} \right \vert_{1}^{2}\\
& = \dfrac1{14} + \left( \dfrac{(2-2)^3}{6} - \dfrac{(1-2)^3}{6} \right) = \dfrac1{14} + \dfrac16 = \dfrac5{21}
\end{align}
Hence, $$x_c = \dfrac{\displaystyle \int_R x dy dx}{\displaystyle \int_R dy dx} = \dfrac{13/15}{3/4} = \dfrac{52}{45}$$ $$y_c = \dfrac{\displaystyle \int_R y dy dx}{\displaystyle \int_R dy dx} = \dfrac{5/21}{3/4} = \dfrac{20}{63}$$
</s>