differentiation, critical number and graph sketching Consider the graph of the function $$f(x) = x^2-x-12$$
(a) Find the equation of the secant line joining the points $(-2, -6)$ and $(4, 0)$. 
(b) Use the Mean Value Theorem to determine a point c in the interval $(-2, 4)$ such
that the tangent line at c is parallel to the secant line. 
(c) Find the equation of the tangent line through c. 
(d) Sketch the graph of $f$, the secant line, and the tangent line on the same axes. 

I used $m= \dfrac{y_2-y_1}{x_2-x_1}$ to get the slope.
$$m =\frac{0-(-6)}{4-(-2)}=\dfrac66=1$$
or $m=\dfrac{f(b)-f(a)}{b-a}$ and it gave me $1$
then differentiating:
$$f'(x)= 2x-1=1 \leadsto 2x=1+1\leadsto 2x=2\leadsto x=1$$

a) Say the point $(x,y)$ is on the secant line between points $(-2,6)$, $(4,0)$. So the equation of the secant line will be
$$\frac{y-(-6)}{x-(-2)}=\frac{0-(-6)}{4-(-2)}\Rightarrow\frac{y+6}{x+2}=1\Rightarrow y=x-4$$
As you see the slope of the secant line is $1$.
b) If the tangent line is parallel to secant line then  the slope of tangent line at $c$ has same slope with secant line that is:
$$f'(c)=1\Rightarrow2c-1=1\Rightarrow c=1$$
Now if you substitute $c=1$ into $f$ you will find $f(c)=-12$. So the tanget line is tangent to $f$ at $(1,-12)$
c) The equation of tangent line at $(x_0,y_0)$ is $y-y_0=f'(x_0)(x-x_0)$. So the equation of tangent at $(1,-12)$ will be 
$$y-(-12)=f'(1)(x-1)\Rightarrow y+12=x-1\Rightarrow y=x-13$$
d) For plotting you can use wolframalpha
