Derivative of f(x) = (x^2) + 2x + 4.
 f’(x) =  2x + 2

f3[x_]=x^2 + 2x + 4;
Manipulate[Show[
Plot[{f3[x], f3[a] + f3'[a](x - a)}, {x, -8, 8}],
Plot[ f3'[x], {x, -8.01, a}, PlotStyle -> Thick],
Graphics[{Line[{{a, f3[a]}, {a, f3'[a]}}], PointSize[Medium],
Red, Point[{a, f3[a]}], Blue,  Point[{a, f3'[a]}]}],
PlotRange ->{-20,80}], {a, -8, 8}]

Second Derivative of f(x) = (x^2) + 2x + 4.
 f’(x) =  2x + 2, f’’(x) = 2

f3[x_]=x^2 + 2x + 4;
Manipulate[Show[
Plot[{f3[x], f3[a] + f3'[a](x - a)}, {x, -8, 8}],
Plot[ f3'[x], {x, -8.01, a}, PlotStyle -> Thick],
Plot[ f3'[b] + f3''[b](x - b), {x, -8, 8}],
Plot[ f3''[x], {x, -8.01, b}, PlotStyle -> {Green,Thick}],
Graphics[{Line[{{a, f3[a]}, {a, f3'[a]}}], PointSize[Medium],
Red, Point[{a, f3[a]}], Blue,  Point[{a, f3'[a]}]}],
Graphics[{Line[{{b, f3'[b]}, {b, f3''[b]}}], PointSize[Medium],
Red, Point[{b, f3'[b]}], Blue,  Point[{b, f3''[b]}]}],
PlotRange ->{-20,80}], {a, -8, 8},{b, -8, 8}]

Second Derivative of f(x) = (x^4) - 2(x^2)
 f’(x) =  4(x^3) - 4x, f’’(x) = 12(x^2) - 4

f4[x_]=x^4 - 2x^2;
Manipulate[Show[
Plot[{f4[x], f4[a] + f4'[a](x - a)}, {x, -2, 2}],
Plot[ f4'[x], {x, -2.01, a}, PlotStyle -> {Orange,Thick}],
Plot[ f4'[b] + f4''[b](x - b), {x, -2, 2}],
Plot[ f4''[x], {x, -2.01, b}, PlotStyle -> {Green,Thick}],
Graphics[{Line[{{a, f4[a]}, {a, f4'[a]}}], PointSize[Medium],
Red, Point[{a, f4[a]}], Blue,  Point[{a, f4'[a]}]}],
Graphics[{Line[{{b, f4'[b]}, {b, f4''[b]}}], PointSize[Medium],
Red, Point[{b, f4'[b]}], Blue,  Point[{b, f4''[b]}]}],
PlotRange ->{-4,6}], {a, -2, 2},{b, -2, 2}]

Graph with a sharp point; derivative D.N.E. at x = 1.

fseca[x_]:=Piecewise[{{(Sqrt[x]), x>1}, {x^2, x ≤1}}];secLinea[a_,k_][x_]:=fseca[a]+((fseca[a+k]-fseca[a])/k)(x-a);secLine2a[a_,k1_][x_]:=fseca[a]+((fseca[a+k1]-fseca[a])/k1)(x-a);
graph4=Plot[fseca[x], {x, 0, 3},PlotStyle->{Thick,Blue}, AxesLabel->{x,Y}, PlotLabel->{{ "y = (Sqrt[x]),  x>1"},{ "y = x^2,    x ≤1"} } ];Manipulate[
Show[graph4,Plot[secLinea[1,h][x],{x,0,3}, PlotStyle->{Red}],
Plot[secLine2a[1,h1][x],{x,0,3}, PlotStyle->{Green}],
 Graphics[{PointSize[Large],Red, Point[{1,fseca[1]}]}],
Graphics[{PointSize[Large],Red, Point[{1+h,fseca[1+h]}]}],
Graphics[{PointSize[Large],Red, Point[{1+h1,fseca[1+h1]}]}],
Graphics[Text["P", {1-.1,1+.1}]],
Graphics[Text["Q", {1+h+.01,fseca[1+h]+.15}]],
Graphics[Text["(Subscript[Q, 1])", {1+h1+.01,fseca[1+h1]+.15}]]
],{h, 1.5, 0.001}, {h1, -1, -0.001}]