I have the following function: $\frac{s}{e^2}(e - s)^\alpha$

Where $e \in (0, 1)$ and $s \in (0, e)$. I want to maximize this function with respect to $e$ and $s$. Obviously the maximum value will depend on $\alpha$ and that is precisely what I want: the maximum value as a function of $\alpha$. Is there a way to compute this in Mathematica?

I have been trying to use the following code:

f[e_, s_, a_] := (s/e^2 ) (e - s)^a
Maximize[{f[e, s, a], 0 < e < 1, 0 < s < e}, {e, s}]

But this only works if I specify a value for $\alpha$. It does not give me what I want.

Now I am aware that the maximum value need not be defined everywhere. But that is one of the things that I want to know: for what values of $\alpha$ is the maximum defined. Moreover, I know that the maximum is defined when $\alpha \in [1, 2]$ but the above code does not work even when I impose that restriction.

So my question is can Mathematica do what I want it to do? If yes, how can I make it work? Any help will be greatly appreciated.


2 Answers 2


Need to be careful with possible zero denominators and real, non-integer powers.




and so




Then you can look at


Put your mouse cursor inside that plot and then press and hold the left mouse button while you drag the cursor around. That will let you reorient the plot in various directions so that you can inspect the line drawn on top of your function.

That seems to show that the maximum might not persist down to s==0, e==0, but if you include the Plot option PlotPoints->100 then it appears that the maximum does persist down to s==0, e==0.

Test that VERY carefully before you even think of trusting it


I think this can be done only numerically.

ClearAll[g, a, s, e];
g[a_?NumericQ]:=NMaximize[{(s/e^2)*(e - s)^a, 0 < e < 1, 0 < s < e}, {e, s},Method -> {"DifferentialEvolution", "SearchPoints" -> 100}]
g[1/Pi + 1]

0.203796, {e -> 0.983881, s -> 0.414744}}

Plot[g[a] // First, {a, 1, 2},PlotPoints -> 30]

Your Answer

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

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