0
$\begingroup$

Could anyone provide some hints for solving:

$\underset{n} {\mathrm{argmin}} \frac{a}{r + ns} + \sum_{i=0}^{n-1}\frac{b}{r + is}$ for $n \in \{1,2,3,\ldots\}$

The problem is part of a coding exercise, but I was curious whether an analytic solution could be derived.

$\endgroup$
1
  • $\begingroup$ sry, I realize this is not a research level question. it is probably better suited for the 'Mathematics' forum. $\endgroup$ Commented Dec 16, 2014 at 13:51

2 Answers 2

2
$\begingroup$

Let $$ F(n) = \dfrac{a}{r+ns} + \sum_{i=0}^{n-1} \dfrac{b}{r+is}$$ I'll assume $a,b,r,s > 0$. Note that $$F(n+1) - F(n) = \dfrac{bs n + b r+ bs - as}{(ns + r + s)(ns + r)}$$ So you want the least positive integer $n$ (if any) such that $b s n + br + bs - as \ge 0$, i.e. $n = \left\lceil \dfrac{a}{b} - \dfrac{r}{s} - 1\right\rceil$ if that is positive, otherwise $n=1$.

$\endgroup$
0
$\begingroup$

The summation equals: $$ \frac{a}{n s+r}+\frac{b \psi ^{(0)}\left(n+\frac{r}{s}\right)-b \psi ^{(0)}\left(\frac{r}{s}\right)}{s}, $$ and its derivative with respect to $n$ equals $$ \frac{b \psi ^{(1)}\left(n+\frac{r}{s}\right)}{s}-\frac{a s}{(n s+r)^2} $$ ($\psi$ is the polygamma function). I would not expect a closed form for the solution of $$ \frac{b \psi ^{(1)}\left(n+\frac{r}{s}\right)}{s}=\frac{a s}{(n s+r)^2}, $$ but who can say...

$\endgroup$
0

Not the answer you're looking for? Browse other questions tagged .