# Evaluating $\int y'(x) \cdot (y(x) +1)^2 \cdot dx$

I evaluate the following integral with pen and paper:

$$\int y'(x) \cdot (y(x) +1)^2 \cdot dx$$

And I get to the following result:

$$\frac{(y(x) + 1)^3}{3}+C$$

However, after that I went to WolframAlpha to check if my answer was right, I got the following result:

Which is pretty much what I got, but where does $\dots +y(x)^2+y(x)$ come from?

I do not understand that. I would appreciate it if somebody explains that to me.

-

It comes from expanding the cube $(y(x)+1)^3$ with the binomial formula: $(y(x)+1)^3=y(x)^3+3y(x)^2+3y(x)+1$; multiplying that by 1/3 gives the other answer, and the +1/3 added on at the end is swallowed up in the constant.
$(y(x)+1)^3=(y(x))^3+3(y(x))^2+3y(x)+1$