To derive the function, we will use the power rule.
Power rule is expressed with the following formula:
![(d)/(dx) x^n = n \cdot x^(n-1)](https://img.qammunity.org/2019/formulas/mathematics/college/ng8z3jxmllfqi81kn85cyyf2wt1scla7jn.png)
Use this rule to derive both terms in the function:
![(d)/(dx) [6x - x^2] = (d)/(dx) 6x - (d)/(dx) x^2](https://img.qammunity.org/2019/formulas/mathematics/college/3ablj9yf8tist22rd57rzghor7rth1cskf.png)
![(d)/(dx) 6x = 6](https://img.qammunity.org/2019/formulas/mathematics/college/c3um9t8yjfj5c027ma7s38oio7fnaizsut.png)
![(d)/(dx) x^2 = 2x](https://img.qammunity.org/2019/formulas/mathematics/college/eozadmkjofppxax2s596zt4ecv8k7hqbs8.png)
![(d)/(dx) [6x - x^2] = 6 - 2x](https://img.qammunity.org/2019/formulas/mathematics/college/ya0hlwh7e2972hlckba6r2hkx27bfmik7l.png)
We can now plug in the x-value for this derivative to find the slope of the tangent line at said x-value:
![f'(4) = 6 - 2(4) = 6 - 8 = \boxed{-2}](https://img.qammunity.org/2019/formulas/mathematics/college/3ildmfc399docpxxwteqek4w3swaxjt0pu.png)
The slope of the tangent line at x = 4 will be
-2.