How does $(x+h)^3 = x^3 + 3x^2h + 3xh^2 + h^3$? Good afternoon my wonderful friends!
Whenever I do this equation I set it up using the difference of two cubes, which is as follows:
$(a+b)^3 = (a+b)(a^2-ab+b^2) = a^3 + b^3$
Whenever I try to use this formula  I always get:
$(x+h) x^2  - xh + h^2$

Simplify:

$x^3 - x^2h + h^2x + x^2h - xh^2 + h^3$
Simplify:

x^3 + h^3$
I don't understand were the three's come from in the final answer: $(x+h)^3 = x^3 + 3x^2h + 3xh^2 + h^3$

$$(x+h)^3=(x+h)(x+h)^2=(x+h)(x^2+2hx+h^2)=$$
$$x^3+2hx^2+h^2x+hx^2+2h^2x+h^3=$$$$x^3+3hx^2+3h^2x+h^3$$
There are quicker ways to do this - the binomial theorem, for example - but I thought that longhand might help you to see a bit better what is going on. Another view: In
$$(x+h)^3=(x+h)(x+h)(x+h)$$ The eventual term in $h$ can get the $h-$factor from any of the three brackets - hence the factor $3$. There is only one way to take an $x$ from each bracket, hence the coefficient of $x^3$ is $1$.
