Answer
a) The derivative of $f\left( x \right)=\frac{4}{x}$ at x is $f'\left( x \right)=-\frac{4}{{{x}^{2}}}$.
b) The slope of the tangent line to the graph of $f\left( x \right)=\frac{4}{x}$ at $x=-2$ is $f'\left( -2 \right)=-1$ and at $x=1$ is $f'\left( 1 \right)=-4$.
Work Step by Step
(a)
Consider the function, $f\left( x \right)=\frac{4}{x}$
Now, compute the derivate of $f\left( x \right)=\frac{4}{x}$ using the formula $f'\left( x \right)=\underset{h\to 0}{\mathop{\lim }}\,\frac{f\left( x+h \right)-f\left( x \right)}{h}$
To compute $f\left( x+h \right)$, substitute $x=x+h$ in the function $f\left( x \right)=\frac{4}{x}$.
$f'\left( x \right)=\underset{h\to 0}{\mathop{\lim }}\,\frac{\frac{4}{x+h}-\frac{4}{x}}{h}$
Now, simplify the above expression by taking the LCM of the denominator as follows:
$\begin{align}
& f'\left( x \right)=\underset{h\to 0}{\mathop{\lim }}\,\frac{\frac{4x-4\left( x+h \right)}{x\left( x+h \right)}}{h} \\
& =\underset{h\to 0}{\mathop{\lim }}\,\frac{4x-4x-4h}{hx\left( x+h \right)}
\end{align}$
Combine the like terms in the numerator, then divide numerator and denominator by h.
$f'\left( x \right)=\underset{h\to 0}{\mathop{\lim }}\,\frac{-4}{x\left( x+h \right)}$
Apply the limits and simplify,
$\begin{align}
& f'\left( x \right)=\frac{-4}{x\left( x+0 \right)} \\
& =-\frac{4}{{{x}^{2}}}
\end{align}$
Thus, the derivative of $f\left( x \right)=\frac{4}{x}$ at x is $f'\left( x \right)=-\frac{4}{{{x}^{2}}}$.
(b)
Consider the function, $f\left( x \right)=\frac{4}{x}$
From part (a), the derivative of $f\left( x \right)=\frac{4}{x}$ at x is $f'\left( x \right)=-\frac{4}{{{x}^{2}}}$.
To compute the slope of the tangent line at $x=-2$, substitute $x=-2$ in $f'\left( x \right)$.
$\begin{align}
& f'\left( -2 \right)=-\frac{4}{{{\left( -2 \right)}^{2}}} \\
& =-\frac{4}{4} \\
& =-1
\end{align}$
To compute the slope of the tangent line at $x=1$, substitute $x=1$ in $f'\left( x \right)$.
$\begin{align}
& f'\left( 1 \right)=-\frac{4}{{{\left( 1 \right)}^{2}}} \\
& =-\frac{4}{1} \\
& =-4
\end{align}$