Maximizing this parametric expression with a certain range of integer inputs Let $a,b$ be integers with $1 \le b < a \le n$ and $s,t$ be integers with $0 \le s < t \le m$
I would like to maximize the expression:
$b^s (a^{t-s} - b^{t-s})$
My intuition says this should happen when $a = n$, $b=1$, $s=0$, $t=m$, giving us $n^m -1$, is this correct or can it be larger?  If it is correct then how can we formally prove it?
Thanks in advance
 A: $f(a,b,s,t) = b^s(a^{t-s} - b^{t-s})$
It is pretty clear that as $a$ gets bigger, $f$ gets bigger.
and as $t$ gets bigger $f$ gets bigger.  What is less obvious is for what values of $b$ and $s$ to we maximize $f.$
As $b$ gets larger the $b^s$ gets larger and $(a^{t-s} - b^{t-s})$ gets smaller.  And when $b = a, f = 0.$  The maximum is somewhere in between.
Something very similar happens with s.
$\frac {\partial f}{\partial b} = s b^{s-1}(a^{t-s} - b^{t-s}) + b^s ( -(t-s)b^{t-s-1}) = 0\\
s b^{s-1}[sa^{t-s} - sb^{t-s}) -(t-s)b^{t-s}) = 0\\
sa^{t-s} = tb^{t-s}\\
b = (\frac st)^{\frac 1{t-s}} a$
$\frac {\partial f}{\partial s} =  (b^s\ln b) (a^{t-s} - b^{t-s}) + b^s(-a^{t-s}\ln a + b^{t-s}\ln b) = 0\\
b^s a^{t-s}(\ln b - \ln a)  = 0$
There is no value of s that will make this equal 0. (values of a and b can zero this out, but we are looking to maximize s.  $(\ln b - \ln a) < 0$ and (b^s a^{t-s}>0 
$\frac {\partial f}{\partial s} < 0$ The smaller s is the bigger f is.
$s = 0$ (as you had guessed),  $a = n, t = m,$ and $b = (\frac st)^{\frac 1{t-s}} a$
