Finding closed-form maximum of a function with no obvious root

72 Views Asked by At

I have the below function:

$$\pi(x) = \frac{s_0\cdot \left(1-\left(\frac{s_1}{s_1+x \cdot \lambda}\right)^{k}\right) \cdot r_1}{s_0\cdot \left(1-\left(\frac{s_1}{s_1+x \cdot \lambda}\right)^{k}\right) \cdot \gamma+ r_0}- x$$ with:

  • $x, s_0, s_1, r_0, r_1 \in R^+$
  • $\lambda, \gamma \in [0,1]$
  • $k \in \{0.25, 4\}$

I am trying to find the $x$ that maximises $\pi(x)$ for both k values (by graphing the function on Desmos, one can see there exists a maximum).

I have tried to solve $\frac{d\pi(x)}{dx}=0$ but there is no root afaik.

What else should I try? How to find the maximum with a closed form formula?

EDIT: adding my reasoning on finding the root by solving $\frac{d\pi(x)}{dx}=0$, notations inspired from comments.

We solve $\frac{d \pi(x)}{dx} = 0$ i.e. $$ \frac{\left(s_{0}\cdot r_{1}\cdot r_{0}\cdot\lambda\cdot k\cdot\left(\frac{s_{1}}{s_{1}+\lambda\cdot x}\right)^{1+k}\right)}{s_{1}\cdot\left(s_{0}\cdot\gamma\cdot\left(\left(\frac{s_{1}}{s_{1}+\lambda\cdot x}\right)^{k}-1\right)-r_{0}\right)^{2}}-1=0$$

$$\left(s_{0}\cdot r_{1}\cdot r_{0}\cdot\lambda\cdot k\cdot\left(\frac{s_{1}}{s_{1}+\lambda\cdot x}\right)^{1+k}\right) = s_{1}\cdot\left(s_{0}\cdot\gamma\cdot\left(\left(\frac{s_{1}}{s_{1}+\lambda\cdot x}\right)^{k}-1\right)-r_{0}\right)^{2}$$

We introduce:

  • $a=s_{0}\cdot r_{1}\cdot r_{0}\cdot\lambda \cdot k$
  • $y=s_1+\lambda \cdot x$

and rewrite $$ \pm\sqrt{a} \cdot s_1^{\frac{k}{2}} \cdot y^{-\frac{k+1}{2}} = s_0 \cdot \gamma \cdot \left(\left(\frac{s_{1}}{y}\right)^{k}-1\right)-r_{0} $$ $$ \pm \sqrt{a} \cdot s_1^{\frac{k}{2}} \cdot y^{-\frac{k+1}{2}} - s_0 \cdot \gamma \cdot s_{1}^k \cdot y^{-k} + s_0 \cdot \gamma +r_{0} =0 $$

and going one step further:

$$A \cdot y^{-\frac{k+1}{2}} + B \cdot y^{-k} + C= 0$$ with:

  • $A=\pm \sqrt{s_{0} \cdot r_{1} \cdot r_{0} \cdot \lambda \cdot k \cdot s_1^k}$
  • $B = - s_0 \cdot \gamma \cdot s_{1}^k$
  • $C=s_0 \cdot \gamma +r_{0}$

We still have $k \in \{0.25, 4\}$ which for me makes it difficult to solve.

Note: One comment states this could be solved as a general trinomial via series expansion, which I do not yet master, what is the approach to get there?