По отдельности всё понятно, но ускользает один момент - как на одном графике совместить.
Вот, код, который раскрашивает экстремум ф-ции на интервале.
Код:
Clear[f, x, pts];
f[x_] := -5.2*Exp[-0.32*x] + 5*Exp[-x]
pts = Point[{x, f[x]}] /. Last[FindMinimum[f[x], {x, 0, 20}]];
Plot[f[x], {x, 0, 20},
 Epilog -> {Style[pts, Red, PointSize[Medium]]},
 PlotRange -> {{0, 21}, {0.5, -2.2}},
 AxesStyle -> Arrowheads[Automatic],
 GridLines -> Automatic,
 GridLinesStyle -> Directive[Dashed], 
 AxesLabel -> {Style["t", Medium], Style["z", Medium]}]
Вот, который красит все точки.
Код:
 Clear[z, t, points];
z[t_] := -5.2*Exp[-0.32*t] + 5*Exp[-t];
points[tcoord_List] := Map[Point[{#, z[#]}] &, tcoord];
pts = {1, 2, 3, 4, 5, 6, 7, 8, 
   t /. Last[FindMinimum[z[t], {t, 0, 20}]]};
Plot[{z[t]}, {t, 0, 20}, 
 AxesLabel -> {Style["t", Medium], Style["z", Medium]}, 
 AxesStyle -> Arrowheads[Automatic],
 PlotRange -> All, 
 GridLines -> Automatic,
 GridLinesStyle -> Directive[Dashed],
 PlotStyle -> {{Blue}}, 
 Epilog -> {PointSize[Medium], Red, points[pts]}]
Мне нужно покрасить одним цветом экстремум и другим все остальные.
Как это совместить?