If I have a function of 3 positive variables, $k$, $m$ and $n$, how can I find what value of $k$ minimises this function (in terms of $m$ and $n$)?
The particular function I'm interested in is this:
$$y = \left(1-e^\frac{-km}{n}\right)^k$$
So I would be looking for an answer in the form of $k = f(n, m)$ which minimises $y$. I just don't know where to start. I've come across this exercise in a data mining/algorithms textbook so I suspect it doesn't require much calculus, but I can't figure out a way to approach this.
I can see that as k increases, $1-e^\frac{-km}{n}$ approaches 1, but we are also raising that quantity to the power $k$.
$$y = \left(1-\exp(-ak) \right)^k$$
$$\ln y = k \ln (1-\exp(-ak))$$
$$\frac{d\ln y}{dk}=\ln(1-\exp(-ak)) + \frac{k(a\exp(-ak))}{1-\exp(-ak)}=0$$
Let $ak = x$.
We want to solve for $$ \frac{x\exp(-x)}{1-\exp(-x)}=-\ln(1-\exp(-x))$$
$$x\exp(-x)=-\ln(1-\exp(-x))^{1-\exp(-x)}$$
Let $z=1-\exp(-x)$, where $0<z<1$, then we have $$ x=-\ln (1-z)$$
and we want to solve for
$$-(1-z)\ln (1-z)=-z\ln z$$
$$\ln (1-z)^{1-z}=\ln z^z$$
Applying $W$-lambert function, we get $1-z=z$ and hence $z=0.5$.
$$x=\ln 2$$
$$k = \frac{\ln 2}a=\frac{n\ln 2}{m}$$