1
$\begingroup$

I am trying to solve the following optimization problem in Mathematica:

Minimize[{y0 + y2 m2, ForAll[x, y0+y2 x^2 >= Boole[x>0]]}, {y0,y2}]

Unfortunately, it just throws it back at me when I type it in.

I feel like this should be within what Mathematica can solve, being mostly about second-degree polynomials and simple range checks.

Is there some way I might convince Mathematica of this? Perhaps some assumptions I can add?

Ideally, I would like to generalize the above to fourth-degree polynomials as well. I wonder if there are some documented limits on which optimization problems are within the scope of Mathematica?

$\endgroup$
2
$\begingroup$

The Resolve command should be added in your code:

Minimize[{y0 + y2 *m2,Resolve[ForAll[x,y0 + y2 x^2 >= Boole[x> 0]], Reals]},{y0,y2}]

$$\left\{ \begin{array}{cc} \{ & \begin{array}{cc} 1 & \text{m2}=0\lor \text{m2}>0 \\ -\infty & \text{True} \\ \end{array} \\ \end{array} ,\left\{\text{y0}\to \begin{array}{cc} \{ & \begin{array}{cc} 1 & \text{m2}=0\lor \text{m2}>0 \\ \text{Indeterminate} & \text{True} \\ \end{array} \\ \end{array} ,\text{y2}\to \begin{array}{cc} \{ & \begin{array}{cc} 1 & \text{m2}=0 \\ 0 & \text{m2}>0 \\ \text{Indeterminate} & \text{True} \\ \end{array} \\ \end{array} \right\}\right\} $$

| improve this answer | |
$\endgroup$
  • $\begingroup$ Thank you very much! $\endgroup$ – Thomas Ahle May 7 at 11:58

Your Answer

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

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