Section 2.1
Univariate Calculus
Andy Long

#3, p. 110

f[x_]:=4x-x^2
xmin=0
xmax=2
Plot[f[x],{x,xmin,xmax}]
fp[x_]=D[f[x],x]
Manipulate[
xmin=1-b;
xmax=1+b;
slope=fp[1];
Plot[{f[x],slope(x-1)+f[1]},{x,xmin,xmax},PlotLabel->f[x]]
,{{b,1,"Shift"},.001,1}
]

#10, p. 110

f[x_]:=1/Sqrt[x]
xmin=0.5
xmax=5
Plot[f[x],{x,xmin,xmax}]
fp[x_]=D[f[x],x]
Manipulate[
slope=fp[b];
Plot[{f[x],slope(x-b)+f[b]},{x,xmin,xmax},PlotLabel->slope,PlotRange->{0,1.5}]
,{{b,1,"Location"},xmin,xmax}
]