In the following optimization problem, consider equation (1)

\begin{align}

\max_{0 < t \leq 1} f(t) = t\left(1-\dfrac{t}{m}\right)\left(1-\dfrac{t}{mn}\right)^{d-2} \ \ \ \ \ \ (1)

\end{align}

How can I maximize such that $\max_{f(t)}$ given $ 0 \leq f(t) \leq 1$.

I have to solve equation (1) such that $f(t)$ always remains $0 \leq f(t) \leq 1$. I know the $t^{**}$ below gives the solution for the optimization problem, but it lies outside feasible solution. But for some of the solutions, $t >1$. (see figure 1 for example). How can I limit it? (note that $m$ and $n$ are variables, while $d$ is a constant)

$50 \leq m\times n\leq 1000$

$10 \leq d\leq 1500$

[![enter image description here][1]][1]

**Solution**:

\begin{align}

f'(t) = -\dfrac{mn^2\left(1-\frac{t}{mn}\right)^d\left(dt^2+\left(\left(1-d\right)m-2mn\right)t+m^2n\right)}{\left(t-mn\right)^3}

\end{align}

letting $ f'(t) = 0$, we get

\begin{equation}

t^* = \dfrac{m\sqrt{4n^2-4n+d^2-2d+1}+2mn+\left(d-1\right)m}{2d}

\end{equation}

or

\begin{equation*}

t^{**} = -\dfrac{m\sqrt{4n^2-4n+d^2-2d+1}-2mn+\left(1-d\right)m}{2d}

\end{equation*}