Manipulate[
If[fcn===Log&&a<.001,a=.001];
(*set height of inset text for slope*)
m=Max[Abs[fcn[5]],Abs[fcn[6]]];
(*change domain for log*)
If[fcn[2]==Log[2],left=.001,left=-8];
(*change plotrange for log and trig functions*)
Which[fcn[2]==Log[2],r={-2,3},fcn[Pi/4]==Sin[Pi/4],r={-2,2},True,r=Automatic];

GraphicsRow[

(*first row - function*){Show[Plot[fcn[x],{x,left,8},PlotStyle->Thickness[.007],ImageSize->Scaled[.7],PlotRange->{{-8,12},r},PlotLabel ->Style[Framed[Row[{"function ",Style["f",Italic],"(",Style["x",Italic],")"," = ",ToString[fcn[x],TraditionalForm]}],Background->LightGray],14],Epilog-> Inset[Style[Row[{Style["m", Italic]," = ",NumberForm[N[fcn'[a]],{4,2}]}],14,Background->LightRed],{10,m/2}]],
ListPlot[{{a,fcn[a]}},PlotStyle->{Black,PointSize[Large]}],
Plot[fcn[a]+fcn'[a]*(x-a),{x,a-2,a+2},
PlotStyle->{Red,Thickness[.012],Opacity[.6]}],PlotRangePadding->1],

(*second row - derivative*)
Show[
Plot[fcn'[x],{x,left,8},PlotStyle->Thickness[.007] ,ImageSize->Scaled[.7],PlotRange->{{-8,12},r},PlotLabel ->Style[Framed[Row[{"derivative ",Style["f'",Italic],"(",Style["x",Italic],")"}],Background->LightGray],14],Epilog-> Inset[Style[Row[{Style["y", Italic]," = ",NumberForm[N[fcn'[a]],{4,2}]}],14,Background->LightRed],{10,fcn'[a]}]],
Graphics[{Dashed,Red,Line[{{0,fcn'[a]},{a,fcn'[a]}}]}],
ListPlot[{{a,fcn'[a]}},PlotStyle->{PointSize[Large],Red}],PlotRangePadding->1]},ImageSize->{600,300}],

{{a,1,"x"},Dynamic[If[fcn===Log,.001,-8]],8,Appearance->"Labeled"},
{{fcn,(#^2)&,"function"},
{Identity->ToString[x,TraditionalForm],
((#^2)&)->ToString[x^2,TraditionalForm],
((#^3)&)->ToString[x^3,TraditionalForm],
Sin->ToString[Sin[x],TraditionalForm],
Cos->ToString[Cos[x],TraditionalForm],
Exp->ToString[Exp[x],TraditionalForm],
Log-> ToString[Log[x],TraditionalForm]},
ControlType->SetterBar},TrackedSymbols->Manipulate]

Manipulate[
myf[x_]:=Evaluate[InterpolatingPolynomial[pts, x]];
fder[x_]:=Evaluate[D[myf[x], x]];
Plot[{myf[x], fder[x]}, {x, -2, 2},PlotStyle-> Thick, PlotRange->10,ImageSize->{500,300}], {{pts,(SeedRandom[123]; Table[{RandomReal[{k, k+.8}], RandomReal[{-2, 2}]}, {k, -2, 1.2, .8}])},{-2,-10},{2,10}, Locator},TrackedSymbols->True]

g[x_]:=(1/100)(x^2)
t[f_,a_,x_]:=f[a]+f'[a](x-a)

statue=Graphics[{RGBColor[.49,0,0],Thickness[0.015],Line[{{100,50},{100,60}}],
PointSize[0.03],Point[{100,61}],
Thickness[0.01],Line[{{100,50},{95,40}}],
Thickness[0.01],Line[{{100,50},{105,40}}],
Thickness[0.007],Line[{{100,60},{95,50}}],
Thickness[0.007],Line[{{100,60},{105,50}}],
RGBColor[.79,.71,.26],PointSize[0.02],Point[{100,50}]}
];
lsg=Solve[g'[x]==((50-(1/100)(x^2))/(100-x)),x]; xlsg=x/.lsg;
p1={xlsg[[1]],g[xlsg[[1]]]};
p2={xlsg[[2]],g[xlsg[[2]]]};

Manipulate[Show[{
Plot[g[x],{x,-120,180},PlotRange->{-20,300},PlotStyle->Black,Axes->True],
Plot[t[g,xc,x],{x,xc,170},PlotStyle->{{Thick,RGBColor[.79,.71,.26]}},Axes->True,PlotRange->{-20,300}],
If[sw2,Plot[t[g,xc,x],{x,-120,xc},PlotStyle->{{Thick,RGBColor[.79,.71,.26],Dashed}},Axes->True,PlotRange->{-20,300}],{}],
Plot[t[g,xc,x],{x,xc-(6/(Sqrt[1+((g'[xc])^2)])),Min[xc+(6/(Sqrt[1+((g'[xc])^2)])),173]},PlotStyle->{Thickness[0.03],RGBColor[.6,.73,.36]}],
statue,
If[sw1,Show[Graphics[{RGBColor[.6,.73,.36],PointSize[0.02],Point[p1]}]],{}],If[sw3,Show[Graphics[{RGBColor[.49,0,0],Dashed,Line[{{xc,g[xc]},{100,50 },{100,g[xc]},{xc,g[xc]}}]}],{}],
If[sw2∧sw1,Show[Graphics[{RGBColor[.6,.73,.36],PointSize[0.02],Point[p2]}]],{}]
]},ImageSize->{400,400},AspectRatio->1,PlotRegion->{{0,1},{0,1}},PlotRangePadding->None,ImageMargins->0],
{{xc,-100,"car position"},-119.9,173},
{{sw1,False,"show solution"},{True,False}},
{{sw2,False,"show tail lights"},{True,False}},
{{sw3,False,"show mathematical background"},{True,False}},
TrackedSymbols:>{sw1,sw2,sw3,xc},SaveDefinitions->True
]