maximize with assumptions on the parameters

 maximize with assumptions on the parameters

I am trying to maximize a function of two endogenous variables (Lf and Lo), where I have two exogenous parameters (T and p), which are positive. All variables should be real. I do it as following:

maxFo = Maximize[{Sqrt[24 - Lf - Lo] + Lo +  Sqrt[Lf] p Sqrt[T], 
         {Lf >= 0, Lf + Lo <= 24, 0 <= Lo <= 5,  T> 0, p > 0}}, 
         {Lf, Lo}, 

I have a difficulties understanding several points:

  1. Maximize[] returns a piecewise function that contains assumptions like p>0, but I’ve already specified this was indeed the case in Maximize[..., {..., p>0},...]. Why then does it still contain assumptions like p>0?

I then use the FullSimplify function to re-enter my constraints:

FullSimplify[maxFo, {T > 0, p > 0, 
  Element[p, Reals], Element[T, Reals], Element[Lf, Reals]}]

And then, I face the issue:

  1. The answer for Lf seems to contain a complex number (...2 i p...)? Why? I thought I specified both in Maximize and in FullSimplify I wanted real numbers? Is it wrong how I specify this in FullSimplify?


Let’s block ads! (Why?)

Recent Questions – Mathematica Stack Exchange