# Derivative using first principle definition

1. May 6, 2013

### pbonnie

1. The problem statement, all variables and given/known data
Calculate the derivative of f(x) = x^3 - 3x^2

2. Relevant equations
(f(x+h) - f(x))/h

3. The attempt at a solution
Just wondering if someone can check my solution.
(f(x+h)- f(x))/h= ((x+h)^3- 3(x+h)^2- (x^3-3x^2))/h
= (x^3+ 3x^2 h+3xh^2+ h^3-3(x^2+ 2xh+ h^2 )- x^3+3x^2)/h
= (x^3+3x^2 h+3xh^2+h^3-3x^2-6xh-3h^2-x^2+3x^2)/h
= (x^3+3x^2 h+3xh^2+h^3-6xh-3h^2-x^2)/h
= x3 + 3x2 + 3xh + h2 – 6x – 3h –x2
= x3 + 2x2 + 3xh + h2 – 6x – 3h

lim┬(h→0)⁡〖x^3+ 2x^2- 6x〗

f’(x) = x^3+ 2x^2- 6x

2. May 6, 2013

### Dick

You are doing the right general thing but the algebra starts going badly after the third line. How come the x^3 and the 3x^2 didn't just cancel? Then I completely start losing track.

3. May 6, 2013

### pbonnie

I thought they could only cancel out if they were of the same degree?

4. May 6, 2013

### pbonnie

It's 3x^2h so I think I can't cancel it out without a negative 3x^2h?

5. May 6, 2013

### pbonnie

Sorry, I copy and pasted it from word and didn't edit it, I see now what you mean

6. May 6, 2013

### pbonnie

(x^3 + 3x^2h + 3xh^2 + h^3 - 3x^2 - 6xh - 3h^2 - x^2 + 3x^2)/h

7. May 6, 2013

### SammyS

Staff Emeritus
There's still at least one error/typo there .

Should be :

(x^3 + 3x^2h + 3xh^2 + h^3 - 3x^2 - 6xh - 3h^2 - x^3 + 3x^2)/h

Right ?

8. May 7, 2013

### pbonnie

Oh! Typo. So f(x+h) - f(x) should be 3x^2 + 3xh + h^2 - 6x - 3h
And the limit would be
3x^2 - 6x
?

9. May 7, 2013

### Dick

That's really (f(x+h)-f(x))/h. But yes, that's the right limit.

10. May 7, 2013

### pbonnie

Great, thank you both :)