0
$\begingroup$

My expression is

NMaximize[{\[Sigma],0<=\[Sigma]<=Sqrt[\[Gamma]^2-4 EllipticK[Tan[\[Alpha]]]^2 (1+Tan[\[Alpha]])]&&-4 (1+Tan[\[Alpha]])+\[Gamma]^2/EllipticK[Tan[\[Alpha]]]^2>0&&2/\[Gamma] EllipticK[Tan[\[Alpha]]]>1&&-\[Pi]/2<=\[Alpha]<=0&& 0<=\[Gamma]<=\[Pi] && {\[Sigma],\[Alpha],\[Gamma]}\[Element]Reals},{\[Sigma],{\[Alpha],-\[Pi]/2,0},{\[Gamma],0,\[Pi]}},MaxIterations->1000,WorkingPrecision->100]

I got this

Greater::nord: Invalid comparison with 6.4759 -5.13344 I attempted.

LessEqual::nord: Invalid comparison with 0. +8.44407 I attempted.

NMaximize::bcons: The following constraints are not valid: {([Sigma]|[Alpha]|[Gamma])[Element][DoubleStruckCapitalR],(2 EllipticK[Tan[[Alpha]]])/[Gamma]>1,[Gamma]^2/EllipticK[Tan[[Alpha]]]^2-4 (1+Tan[[Alpha]])>0,0<=[Gamma],0<=[Sigma],-([Pi]/2)<=[Alpha],[Alpha]<=0,[Gamma]<=[Pi],[Sigma]<=Sqrt[[Gamma]^2-4 EllipticK[Tan[[Alpha]]]^2 (1+Tan[[Alpha]])]}. Constraints should be equalities, inequalities, or domain specifications involving the variables.

I followed this answer for a simple set of intervals. I this case maybe there are 1/0 problems, I dont know.

$\endgroup$
  • 1
    $\begingroup$ If $\alpha>-\pi/4$, then the expression Sqrt[γ^2 - 4 EllipticK[Tan[α]]^2 (1 + Tan[α])] becomes complex. You can't compare complex numbers (that's what the Greater::nord and LessEqual::nord errors are saying). $\endgroup$ – imas145 Apr 13 at 9:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.