How can I integrate $ \int \frac{x^2}{1 + x^3} $? 
$$\int \frac{x^2}{1 + x^3}$$

I found this problem in one of my past papers and didn't understand how the solution to this is $ \frac{1}{3} \ln (1+x^3) $. I would really appreciate it if someone guided me through this. I'm sure this is the answer of the integration because I checked it on WolframAlpha and in the mark scheme, but did not understand how to arrive at the answer. Thanks in advance!

The most efficient solution has already been covered by Yagna, however it can never hurt to have another method. The method I will take here is without question an extremely overly complicated method for this question, but is good practice for integrals of rational functions as a general method.
Here you have a rational function of the form:
\begin{equation}
 f(x) = \frac{P_n(x)}{Q_m(x)}
\end{equation}
Were $P_n(x)$ and $Q_m(x)$ are real valued polynomials of orders $n$ and $m$ respectively. The first step is to factor $Q_m(x)$. By the fundamental theorem of algebra we can factor $Q_m(x)$ is a product of constant, linear, and quadratic terms. For your question:
\begin{equation} 
f(x) = \frac{x^2}{x^3 + 1} \rightarrow P_n(x) = P_2(x) = x^2,\quad Q_m(x) = Q_3(x) = x^3 + 1
\end{equation}
Here $Q_3(x)$ is factored quite easily:
\begin{equation}
Q_m(x) = Q_3(x) = x^3 + 1 = \left(x + 1\right)\left(x^2 - x + 1\right)
\end{equation}
Thus, 
\begin{equation}
 f(x) = \frac{x^2}{\left(x + 1\right)\left(x^2 - x + 1\right)}
\end{equation}
We now apply a Partial Fraction Decomposition to yield:
\begin{equation}
f(x) = \frac{x^2}{\left(x + 1\right)\left(x^2 - x + 1\right)} = \frac{1}{3}\cdot \frac{1}{x + 1} -  \frac{1}{3}\cdot \frac{2x - 1}{x^2 - x + 1}
\end{equation} 
And hence, 
\begin{align}
 \int  \frac{x^2}{x^3 + 1}\:dx &= \frac{1}{3}\int \frac{1}{x + 1}\:dx +  \frac{1}{3}\int \frac{2x - 1}{x^2 - x + 1}\:dx \\
&= \frac{1}{3}\ln\left|x + 1\right| +  \frac{1}{3} \cdot \ln\left|x^2 - x + 1 \right| + C
\end{align}
Where $C$ is the constant of integration. 
As before, this is overly complicated for this exact situation, but it is a process that is useful in tackling these types of integrals. 
Edit I had an incorrect partial fraction decomposition which was picked by a commenter. Thank you to that person.
