1
$\begingroup$

I have a multivariate function that I seek to maximize (ideally symbolically):

The function has the form:

$\frac{(-j*a)}{8 (-(b/2) - j (c-d-e)) ((j*b*c)/2 - (j*b*d)/2 + c*d - d^2 + a^2/4))}$

(where j is the imaginary number) I want to find the maximums of the real and imaginary parts. When I try to find them with the code:

Maximize[Im[function], {a, b, c, d, e}]

It tells me that my solution is indeterminate and that my maximum is at infinity. I believe that this issue is due to the function "blowing up" if all the values in the denominator are zero. So I wanted to write a code that ignores these cases when the parameters are zero.

I did this by adding

  Maximize[Im[function], a>0, b>0, c>0,d>0, e>0, {a, b, c, d, e}]

In doing so, Mathematica "hangs" and I never get an answer.

Any ideas or suggestions for how I should proceed? Should I give up on finding a symbolic solution and go straight to using a numerical solver? It seems like a simple enough function that finding a maximum doesn't /seem/ impossible but maybe my intuition is wrong..

The code that hangs is:

fun = -((I a)/(
   8 (-(b/2) - I (c - d - e)) ((I b c)/2 - (I b d)/2 + c d - d^2 + 
      a^2/4)));
imFUN = ComplexExpand[Im[fun]] // Simplify
Maximize[imFUN , 
 a > 0 && b > 0 && c > 0 && d > 0 && e > 0,  {a, b, c, d, e}]
$\endgroup$
2
  • $\begingroup$ Please provide copyable code. Otherwise, many people (myself included) will not try to answer your question. $\endgroup$
    – Carl Woll
    Mar 6, 2019 at 0:26
  • $\begingroup$ Thanks for the feedback, I added copyable code. $\endgroup$ Mar 6, 2019 at 0:32

2 Answers 2

2
$\begingroup$

Since $\texttt{imFUN} \rightarrow \infty$ as $\{b,c,e\}\rightarrow0$, $a\ne0$, and $a^2=4d^2$, making $\{b,c,e\}$ arbitrarily small will make $\texttt{imFUN}$ arbitrarily large, so it is not surprising that Mathematica cannot find a maximum.

$\endgroup$
2
$\begingroup$

Using NMaximize indicates that the objective function is probably unbounded:

NMaximize[{imFUN, a>0 && b>0 && c>0 && d>0 && e>0}, {a, b, c, d, e}, MaxIterations->100]
NMaximize[{imFUN, a>0 && b>0 && c>0 && d>0 && e>0}, {a, b, c, d, e}, MaxIterations->200]
NMaximize[{imFUN, a>0 && b>0 && c>0 && d>0 && e>0}, {a, b, c, d, e}, MaxIterations->300]

NMaximize::cvdiv: Failed to converge to a solution. The function may be unbounded.

{5726.59, {a -> 0.21148, b -> 0.000813153, c -> 2.17324, d -> 2.1732, e -> 0.}}

NMaximize::cvdiv: Failed to converge to a solution. The function may be unbounded.

{2.16255*10^8, {a -> 0.211743, b -> 3.55842*10^-9, c -> 2.17226, d -> 2.17226, e -> 0.}}

NMaximize::cvdiv: Failed to converge to a solution. The function may be unbounded.

{5.98731*10^12, {a -> 0.211742, b -> 7.03351*10^-13, c -> 2.17226, d -> 2.17226, e -> 0.}}

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.