# Problem 2-2: Evaluating Derivative of Functions and the Tangent Lines

Find the derivative of $f(x)$ and the equation of the tangent line at $x_0=-1$.

a) $f(x)=x^2$
b) $f(x)=x^3+x+1$
c) $f(x)=\frac{1}{x}$

Solution
The equation of the tangent line at ${x}_{0}$ is $y = f'(x_0) (x-x_0) + f(x_0)$.
a) $f(x)=x^2, f'(x)=2x$
$y = f'(x_0) (x-x_0) + f(x_0) = 2x_0 (x-x_0)+x_0^2 = 2x_0 x-x_0^2$
$y = -2x-1$.

b) $f(x)=x^3+x+1$

$f'(x)=3x^2+1$
$y=f'(x_0) (x-x_0) + f(x_0) =(3x_0^2+1) (x-x_0)+x_0^3+x_0+1=(3x_0^2+1)x-2x_0^3+1$
$y=4x+3$.

c) $f(x)=\frac{1}{x}=x^{-1}$
$f'(x)=-x^{-2}$ $f'(x)=-\frac{1}{x^2}$
$y=f'(x_0) (x-x_0) + f(x_0) =-\frac{1}{x_0^2}(x-x_0)+\frac{1}{x_0}=-\frac{1}{x_0^2} x +\frac{2}{x_0}$
$y = -x-2$