Group Abstract Group Abstract

Message Boards Message Boards

Use the result of a numerical solution in FindRoot

Posted 3 years ago
POSTED BY: Pierre Sens
2 Replies
Posted 3 years ago

Works great. I figured it was a simple question. Thanks,

POSTED BY: Pierre Sens

Try NumericQ:

ClearAll[f, min];
f[x_, a_] := x - x^2 + a/3 x^3;
min[a_?NumericQ] := FindMinimum[{f[x, a], x >= 0}, x][[1]];
FindRoot[min[a] == 0, {a, 1}]
(*  {a -> 0.75}   *)

See https://support.wolfram.com/12502 for a discussion of ?NumericQ.

POSTED BY: Michael Rogers
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard