# 009A Sample Final 3, Problem 3

Find the derivative of the following function using the limit definition of the derivative:

${\displaystyle f(x)=3x-x^{2}}$
Foundations:
${\displaystyle f'(x)=\lim _{h\rightarrow 0}{\frac {f(x+h)-f(x)}{h}}}$

Solution:

Step 1:
Using the limit definition of derivative, we have
${\displaystyle {\begin{array}{rcl}\displaystyle {f'(x)}&=&\displaystyle {\lim _{h\rightarrow 0}{\frac {f(x+h)-f(x)}{h}}}\\&&\\&=&\displaystyle {\lim _{h\rightarrow 0}{\frac {(3(x+h)-(x+h)^{2})-(3x-x^{2})}{h}}}\\&&\\&=&\displaystyle {\lim _{h\rightarrow 0}{\frac {3x+3h-(x^{2}+2xh+h^{2})-3x+x^{2}}{h}}}\\&&\\&=&\displaystyle {\lim _{h\rightarrow 0}{\frac {3h-2xh-h^{2}}{h}}.}\end{array}}}$
Step 2:
Now, we have
${\displaystyle {\begin{array}{rcl}\displaystyle {f'(x)}&=&\displaystyle {\lim _{h\rightarrow 0}{\frac {3h-2xh-h^{2}}{h}}}\\&&\\&=&\displaystyle {\lim _{h\rightarrow 0}3-2x-h}\\&&\\&=&\displaystyle {3-2x.}\end{array}}}$

${\displaystyle f'(x)=3-2x}$