What’s wrong with my graph input?

So I saw this picture on my book and it was left as an exercise to figure out.

This is what I have so far, but I’m not sure where I went wrong.

Plot[{t^3 – t}, {t, -1, 1}, PlotStyle -> Blue, Exclusions -> {t == 1},Exclusions -> {t == -1}, Exclusions -> {s == 2/(3*Sqrt[3])},Exclusions -> {s == -2/(3*Sqrt[3])}, ExclusionsStyle -> {Pink}]

I think somewhere I should use Epilog for that red dot, but with my original input incorrect, I cannot go any further.

=================

1

 

Look at GridLines instead of Exclusions…
– R. M.♦
Nov 12 ’13 at 23:00

  

 

@rm-rf is correct. Also, for the dots, all the fun is taken since you already have the coordinates… Anyway, Epilog -> {PointSize[Medium], Point[{-1/Sqrt[3], 2/(3 Sqrt[3])}]}. Show with a ListPlot and Plot would also work
– Sosi
Nov 12 ’13 at 23:30

  

 

Hm..I will try this and let you know of my new result.
– asik
Nov 12 ’13 at 23:31

=================

2 Answers
2

=================

I leave the legends to you:

f[t_] := t^3 – t;
Plot[f[t], {t, -1.5, 1.5}, GridLines -> (Transpose[#]),
GridLinesStyle -> Pink,
Epilog -> {PointSize[Large], Red, Point@#}] &@({u, f@u} /.
Solve[f’@u == 0, u])

  

 

If I wanted to change the color from the positive red restriction and negative restriction, how would I do that?PlotStyle->Purple would do the entire line but how would I restrict that?
– asik
Nov 13 ’13 at 0:03

  

 

@asik What book are you using?
– Dr. belisarius
Nov 13 ’13 at 0:11

  

 

Using various books/kindle – Wellin, Schaum, Roozbek (cannot remember name)…I read chapters, screenshot and capture ones I do not know or ones that are deemed difficult and do them at end of each month at once to test my knowledge
– asik
Nov 13 ’13 at 0:39

  

 

google has few good files online with sample if you want to try them out
– asik
Nov 13 ’13 at 0:40

  

 

@asik I hope you can understand. A lot of students come here asking for somebody else to do their homework. Here you can get a very good book (probably the better one) for free: mathematica.stackexchange.com/a/22724/193
– Dr. belisarius
Nov 13 ’13 at 0:54

This presents no advantage (at all) over belisarius (and I have voted for belisarius). I just post it to illustrate the multiplicity of ways of achieving the ‘same’ result. Choice dependent on aim, preferences etc. I have just used bland styling:

f[x_] := x^3 – x;
sol = {x, f@x} /. Solve[D[f[x], x] == 0, x];
cp1 = ContourPlot[f[x] – y == 0, {x, -2, 2}, {y, -2, 2},
MeshFunctions -> (3 #1^2 – 1 &), Mesh -> {{0.}},
MeshStyle -> Directive[Red, PointSize[Large]],
GridLines -> Transpose@sol];
cp2 = ContourPlot[f[x] – y, {x, -2, 2}, {y, -2, 2}, Contours -> {0.},
ContourShading -> False, MeshFunctions -> {#1 &, #2 &},
Mesh -> Transpose@N[sol],
Epilog -> {Red, PointSize[Large], Point@sol}];
GraphicsRow[{cp1, cp2}]