# ArgMin returning unsolved solution

I have been trying to get the ArgMin function to work so that I can find the value of $$s$$ that minimizes this function:

$$f(s)=e^{-sa}\left(pe^s+(1-p)\right)^n\style{font-family:inherit;}{\text{, where }} 0

This is what I have tried:

ArgMin[{Exp[-s*a]*(p*Exp[s]+(1-p))^n,0<p<1,0<a<1,p<a,n>0,n \[Element] Integers},s]


But it just outputs exactly what I entered: I am expecting this as the answer:

$$\underset{s>0}{\operatorname{ArgMin}}\left[f(s)\right]=\text{Solve}\left[\left(\frac{d}{ds}f(s)\right)==0,s\right]\Longrightarrow e^s=\frac{a(1-p)}{np(1-a)}$$

$$\Longrightarrow \underset{s>0}{\operatorname{ArgMin}}\left[f(s)\right]=\text{ln}\left[\frac{a(1-p)}{np(1-a)}\right]$$

I get the correct output "Log", when I specify values:

f[p_,a_,n_]:=ArgMin[{Exp[-s*a]*(p*Exp[s]+(1-p))^n,0<p<1,0<a<1,p<a,n>0,s>0,n \[Element] Integers},s];
Print[f[1/2,3/4,1]]


This has me thinking that the symbolic answer that I want is there but how do I get it printed that way?

• ArgMin only works for functions that give a numeric output. The documentation should be more precise about this. – Natas Aug 21 at 19:15
• @Natas So does that mean I will have to make an ArgMin function from scratch that works with symbolic input? – Landon Aug 25 at 6:02
• Yes, that would be the conclusion. Note however that the reason for this not being implemented is because it is difficult to find a solution that works for all possible input. You could always just take the derivative, set it to zero and check if it makes sense. Solve[D[Exp[-s*a]*(p*Exp[s] + (1 - p))^n, s] == 0, s](*{{s\[Rule]Log[(a (-1+p))/((a-n) p)]}}*) – Natas Aug 25 at 6:46