I want to integrate
$$\int x^2 \sqrt{x^3 +1}~dx$$
I tried it with integration by parts (because we have a product here), but an online calculator did it with integration by substition.
Would this still be correct?
$$\frac{1}{3}x^3 (x^3+1)^\frac{1}{2} - \int \frac{1}{3} x^3 \frac{1}{2} (x^3+1)^{-\frac{1}{2}} \cdot 3~dx \\ = \frac{1}{3}x^3 (x^3+1)^\frac{1}{2} - \int x^3 \frac{1}{2} (x^3+1)^{-\frac{1}{2}} ~dx\\ = \frac{1}{3}x^3 (x^3+1)^\frac{1}{2} - \frac{1}{4} x^4\cdot 2(x^3 +1)^{-\frac{1}{2}} \\ = \frac{1}{3}x^3 \sqrt{x^3+1} - \frac{1}{2} x^4 \frac{1}{\sqrt{x^3+1}}$$
I think this is wrong because when $x=1$ I get a different result than when I insert $x=1$ into
Can someone tell me where I went wrong and why we rather use integration by substition instead of integration by parts here?

$$\frac{1}{3}x^3 (x^3+1)^\frac{1}{2} - \int \frac{1}{3} x^3 \frac{1}{2} (x^3+1)^{-\frac{1}{2}} \cdot 3 \tag{1}$$
In your first line, you miss $x^2$, which is from the chain rule. It should be
$$\frac{1}{3}x^3 (x^3+1)^\frac{1}{2} - \int \frac{1}{3} x^3 \frac{1}{2} (x^3+1)^{-\frac{1}{2}} \cdot 3x^2$$
Here is a trick, note that $dx^3=d(x^3+1)$, so we have
$$\begin{align} \int x^2 \sqrt{x^3 +1}~dx&=\frac{1}{3}\int \sqrt{x^3 +1}~d(x^3+1)\tag{2}\\ \\ &=\frac{1}{3}\cdot\frac{2}3\cdot (x^3+1)^{3/2}+C \end{align}$$