title: Mathematica - Find Maximum value NDSolve Plot
body: <p>After numerically solving a differential equation and plotting the results I would like to determine  the single maximum value in the plotted range but do not know how.  </p>
  
  <p>The code below works for numerically solving the differential equation and plotting the results.</p>
  
  <pre><code>s = NDSolve[{x''[t] + x[t] - 0.167 x[t]^3 == 0.005 Cos[t + -0.0000977162*t^2/2], x[0] == 0, x'[0] == 0}, x, {t, 0, 1000}]
  
  Plot[Evaluate[x[t] /. s], {t, 0, 1000}, 
  Frame -&gt; {True, True, False, False}, FrameLabel -&gt; {"t", "x"}, FrameStyle -&gt; Directive[FontSize -&gt; 15], Axes -&gt; False]
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/65FDY.png" alt="Mathematica graphics"></p>