0
$\begingroup$

I am trying to maximize this function over the value "p":

    g2ces[p_, theta_, I_, a_, c1_]  := 
 theta*p*Min[I, 
    a*p^c1] + (theta*
     theta)*(((I - Min[I, a*p^c1])/a)^(1/c1)*(I - 
        Min[I, a*p^c1]) + ((I/a)^(1/c1))*I)

At the following other parameter values (which I take as an example), we get:

FindMaximum[{g2ces[p, 0.5, 2, 2.5, -2]}, p]

p = 1.25. This is the correct solution.

And plotting this over various "p" values gives:

    Plot[Evaluate@
  Table[g2ces[p, theta, 2, 2.5, -2], {theta, 0.5, 0.5,1}], {p, 0, 5}]

 and

This solution is analytically derived and a special case. This function is equivalent to the following function, "VDPces", which is easier for me to generalize (and thus I want to work with this version of the function instead of the "g2ces" one):

Rev[p_, I_, a_, c1_] := p*Min[I, a*p^c1]
V2ces[I_, a_, c1_]  := MaxValue[{Rev[p, I, a, c1]}, p]
VDPces[p_, theta_, I_, a_, c1_] := 
 theta*(Rev[p, I, a, c1] + 
     theta*V2ces[I - Min[I, a*p^c1], a, c1]) + (1 - theta)*(0 + 
     theta*V2ces[I, a, c1])

When I maxmimize this function, I get a different solution:

FindMaximum[{VDPces[p, 0.5, 2, 2.5, -2]}, p]

p = 1.11803 (incorrect)

and a different plot

Plot[Evaluate@
  Table[VDPces[p, theta, 2, 2.5, -2], {theta, 0.5, 0.5, 1}], {p, 0, 
  5}]

that looks like:

enter image description here

Obviously something is going wrong with the optimization.

$\endgroup$
4
  • $\begingroup$ is I the imaginary unit? $\endgroup$ – vi pa Jan 19 '20 at 23:56
  • $\begingroup$ No I is just another variable, no imaginary numbers. Set it equal to 2. $\endgroup$ – wolfsatthedoor Jan 20 '20 at 1:15
  • $\begingroup$ Nothing wrong with the maximization. The problem is the function definitions which are different. Show[Plot[{Evaluate[VDPces[p, 0.5, 2, 2.5, -2]], Evaluate[g2ces[p, 0.5, 2, 2.5, -2]]}, {p, 0, 2}]] $\endgroup$ – Cesareo Jan 20 '20 at 11:41
  • $\begingroup$ I pretty confident that theoretically these should be identical though is my point. In the g2ces, I just find a closed form solution for that particular function (a*p^c1). $\endgroup$ – wolfsatthedoor Jan 29 '20 at 4:44

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.