- #1
carey1000
- 2
- 0
Dear forum members:
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.
The code below works for numerically solving the differential equation and plotting the results.
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 -> {True, True, False, False}, FrameLabel -> {"t", "x"}, FrameStyle -> Directive[FontSize -> 15], Axes -> False]
Thank you!
Carey
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.
The code below works for numerically solving the differential equation and plotting the results.
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 -> {True, True, False, False}, FrameLabel -> {"t", "x"}, FrameStyle -> Directive[FontSize -> 15], Axes -> False]
Thank you!
Carey