Message Boards Message Boards

0
|
8981 Views
|
5 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Minimizing a expression to determine a parameter

Posted 9 years ago

Hi, I have a complicated expression involving exponential terms. I want to find out the positive value of the only parameter for which the expression would be at minima. Use of "Minimize" operation results in the error message "Overflow occurred in computation" The expression is available in the attached file. thanks

Attachments:
POSTED BY: S G
5 Replies
Posted 9 years ago

Simple methods find one extremum, which is a maximum:

In[2]:= f = F /. D -> 1. 10^-24 d // Simplify;

In[3]:= df = D[f, d] // Simplify;

In[4]:= extremum = d /. (sol = Solve[df == 0, d, Reals][[1]])

During evaluation of In[4]:= Solve::ratnz: Solve was unable to solve the system with inexact coefficients. The answer was obtained by solving a corresponding exact system and numericizing the result. >>

Out[4]= 3154.42

In[5]:= d2f = D[df, d] // Simplify;

In[6]:= (* extremum is a maximum *)
d2f /. sol

Out[6]= -2.05399*10^-8

In[7]:= (* with value *)
f /. sol

Out[7]= -1.88228

In[8]:= Plot[f, {d, extremum/10, 10 extremum}]

enter image description here

POSTED BY: David Keith
Posted 9 years ago

And

In[11]:= NMaximize[f, d]

Out[11]= {-1.88228, {d -> 3154.42}}

In[15]:= hl = Limit[f, d -> Infinity]

Out[15]= -2.06531

In[16]:= ll = Limit[f, d -> -Infinity]

Out[16]= -3.87339

In[23]:= Plot[f, {d, -50000, 50000}, 
 Prolog -> {Red, Line[{{-50000, ll}, {0, ll}}], 
   Line[{{0, hl}, {50000, hl}}]}, AxesLabel -> {"10^24 D", "F"}]

enter image description here

POSTED BY: David Keith

Are you sure that your expression has a minimum? It seems to me that the infimum is attained as D tends to -Infinity. The structure of your expression is clearer if treated this way:

coeffs = Cases[F, _Real, All] // Union;
subst1 = Thread[coeffs -> Table[c[i], {i, Length[coeffs]}]];
c0 = (coeffs[[-4]]/12);
subst5 = Map[Reverse, 
   Cases[Rationalize[subst1[[1 ;; 9]]], Except[_Real -> _]]];
subst2 = Thread[
   Table[c[i], {i, 10, 13}] -> c[0]*Rationalize[coeffs[[-4 ;;]]/c0]];
subst3 = subst1 /. subst2;
F2 = Simplify[F /. subst3 /. subst5]
subst4 = c[0] (-D + c[2]) :> Log[x];
F3 = FullSimplify[F2 /. subst4]
F4 = F3 /. Map[Reverse, subst1]
Plot[F4, {x, -1.98^(1/15), 5}]

where x == Exp[c[0] (-D + c[2])] is a new variable.

POSTED BY: Gianluca Gorni
Posted 9 years ago
POSTED BY: Jim Baldwin

Your expression involves high powers of the parameter. I think that's why you're getting overflow. Also, note that you're actually using NMinimize because your expression does not have infinite precision.

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

Group Abstract Group Abstract