Group Abstract Group Abstract

Message Boards Message Boards

0
|
2.5K Views
|
9 Replies
|
5 Total Likes
View groups...
Share
Share this post:

I have problem to maximize a function

Posted 1 year ago

I have the below code, it does not give me the answer. can somebody help me?

POSTED BY: Reza rho
9 Replies

With version 12.0 I get an answer with this:

Maximize[{F[r, c], FunctionDomain[F[r, c], c]}, c]
POSTED BY: Gianluca Gorni
Posted 1 year ago
POSTED BY: Reza rho

From your input I get the answer

{0.993421, {c -> 0.698707}}

I am using version 14.0.

POSTED BY: Gianluca Gorni
Posted 1 year ago

i have version 12. currently can't updade it.

POSTED BY: Reza rho
Posted 1 year ago
POSTED BY: Jim Baldwin
Posted 1 year ago

thank you so much it worked.

POSTED BY: Reza rho
Posted 1 year ago

Adding in a restriction on $c$ so that you only get real numbers on $F$ seeems to work:

Subscript[M, r] = Maximize[{F[r, c], -1 < c < 1}, c]
(* {0.993421, {c -> 0.698707}} *)
POSTED BY: Jim Baldwin
Posted 1 year ago

this didnt work it gives the below error:

NMaximize::nnum: The function value -F[0.2,-0.868794] is not a number at {c} = {-0.868794}.

POSTED BY: Reza rho
Posted 1 year ago

Sounds like you'll need to use FindMaximum instead of Maximize.

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