Skip to main content
added 503 characters in body
Source Link
Akku14
  • 17.4k
  • 15
  • 32

With additional information, that second derivative is negative (which NMaximize should know anyway), you get the right result.

Edit: I think, this works, because second derivative reproduces the Sin and Cos term with same but negative prefactor, so that NMaximize can eliminate these terms.

NMaximize[{f[t], D[f[t], {t, 2}] < 0}, t]

(*  {0.0108751, {t -> 17.0718}}    *)

Edit2

Even Maximizedoes the job easily if you restrict t a little bit away from zero.

Maximize[{f[t], 10^-6 < t < 100}, t, Reals]

You get a root expression for t which you can use for further analytical calculations.

{t -> Root[{-998 E^(1/50 (-5 + 2    Sqrt[5]) #1) + 
  501 Sqrt[5] E^(1/50 (-5 + 2 Sqrt[5]) #1) - 
  998 E^(-(1/50) (5 + 2 Sqrt[5]) #1) - 
  501 Sqrt[5] E^(-(1/50) (5 + 2 Sqrt[5]) #1) + 1996 Cos[#1] - 
  400 Sin[#1] &, 17.0718136738254647391}]}

With additional information, that second derivative is negative (which NMaximize should know anyway), you get the right result.

Edit: I think, this works, because second derivative reproduces the Sin and Cos term with same but negative prefactor, so that NMaximize can eliminate these terms.

NMaximize[{f[t], D[f[t], {t, 2}] < 0}, t]

(*  {0.0108751, {t -> 17.0718}}    *)

With additional information, that second derivative is negative (which NMaximize should know anyway), you get the right result.

Edit: I think, this works, because second derivative reproduces the Sin and Cos term with same but negative prefactor, so that NMaximize can eliminate these terms.

NMaximize[{f[t], D[f[t], {t, 2}] < 0}, t]

(*  {0.0108751, {t -> 17.0718}}    *)

Edit2

Even Maximizedoes the job easily if you restrict t a little bit away from zero.

Maximize[{f[t], 10^-6 < t < 100}, t, Reals]

You get a root expression for t which you can use for further analytical calculations.

{t -> Root[{-998 E^(1/50 (-5 + 2    Sqrt[5]) #1) + 
  501 Sqrt[5] E^(1/50 (-5 + 2 Sqrt[5]) #1) - 
  998 E^(-(1/50) (5 + 2 Sqrt[5]) #1) - 
  501 Sqrt[5] E^(-(1/50) (5 + 2 Sqrt[5]) #1) + 1996 Cos[#1] - 
  400 Sin[#1] &, 17.0718136738254647391}]}
added 140 characters in body
Source Link
Akku14
  • 17.4k
  • 15
  • 32

With additional information, that second derivative is negative (which NMaximize should know anyway), you get the right result.

Edit: (don't know ifI think, this always works), because second derivative reproduces the Sin and Cos term with same but negative prefactor, so that NMaximize can eliminate these terms.

NMaximize[{f[t], D[f[t], {t, 2}] < 0}, t]

(*  {0.0108751, {t -> 17.0718}}    *)

With additional information, that second derivative is negative (which NMaximize should know anyway), you get the right result. (don't know if this always works)

NMaximize[{f[t], D[f[t], {t, 2}] < 0}, t]

(*  {0.0108751, {t -> 17.0718}}    *)

With additional information, that second derivative is negative (which NMaximize should know anyway), you get the right result.

Edit: I think, this works, because second derivative reproduces the Sin and Cos term with same but negative prefactor, so that NMaximize can eliminate these terms.

NMaximize[{f[t], D[f[t], {t, 2}] < 0}, t]

(*  {0.0108751, {t -> 17.0718}}    *)
Source Link
Akku14
  • 17.4k
  • 15
  • 32

With additional information, that second derivative is negative (which NMaximize should know anyway), you get the right result. (don't know if this always works)

NMaximize[{f[t], D[f[t], {t, 2}] < 0}, t]

(*  {0.0108751, {t -> 17.0718}}    *)