# Help with differentiation from first principles

Hey I'm differentiating $x^3$ from first principles and I know the answer is $3x^2$.

But I'm looking at one of the lines from my notes and something doesn't look right.

I have $2x^2h + 2xh^2 = 3x^2h$, which would indeed be equal to $3x^2$ when you take the limit as $h$ approaches $0$.

But should that not read $4x^2h$??????

• Use $(a+b)^3=a^3+3a^2b+3ab^2+b^3$, with $a=x$ and $b=h$. – André Nicolas Jan 11 '14 at 0:03

I believe your error lies in your expansion of $(x+h)^3$. This is equal to $$(x+h)(x+h)(x+h)=(x^2+2xh+h^2)(x+h)\\ =x^3+2x^2h+h^2x+x^2h+2h^2x+h^3\\ =x^3+\underbrace{2x^2h+x^2h}_{3x^2h}+\underbrace{2h^2x+h^2x}_{3h^2x}+h^3\\ =x^3+3x^2h+3h^2x+h^3$$ $\space$ $$\lim_{h\to0}\frac{(x+h)^3-x^3}{h}=\lim_{h\to0}\frac{x^3+3x^2h+3h^2x+h^3-x^3}{h}$$

The $x^3$ term cancels and leave you with:

$$\lim_{h\to0}\frac{3x^2h+3h^2x+h^3}{h}$$

Factoring out an h in numerator:

$$\lim_{h\to0}\frac{h(3x^2+3hx+h^2)}{h}$$

You can cancel the $h$ to get:

$$\lim_{h\to0}3x^2+3hx+h^2=3x^2+3(0)x+(0)^2=3x^2$$

• Great at least i can understand it now i know its a typo :D thanks very much :) – Pendo826 Jan 11 '14 at 0:33
• Glad I could help, No problem. – Zhoe Jan 11 '14 at 0:33

$\ \ \ \ \lim_{y\rightarrow 0}{((x+y)^{3}-x^{3})/(y)} \\= \lim_{y\rightarrow 0}{(x^{3}+y^{3}+3x^{2}y+3xy^{2}-x^{3})/(y)} \\ = \lim_{y\rightarrow 0}{(y^{3}+3x^{2}y+3xy^{2})/(y)} \\= \lim_{y\rightarrow 0}{(y^{2}+3x^{2}+3xy)} \\= 3x^{2}$