From: Kaba on
Hi,

Let

n in N (positive integers)
s in R+ (positive reals)

f : [1, n] sub N -> R :
f(m) = m^2 (s - 1)^2 / n + 2 m^2 (s - 1) / n + m

Problem:

1) Find m_min which minimizes f

2) Find m_max which maximizes f

Any ideas?

--
http://kaba.hilvi.org
From: Tonico on
On Oct 4, 2:31 pm, Kaba <n...(a)here.com> wrote:
> Hi,
>
> Let
>
> n in N (positive integers)
> s in R+ (positive reals)
>
> f : [1, n] sub N -> R :
> f(m) = m^2 (s - 1)^2 / n + 2 m^2 (s - 1) / n + m
>
> Problem:
>
> 1) Find m_min which minimizes f
>
> 2) Find m_max which maximizes f
>
> Any ideas?



Yes: what about adding some parentheses to understand clearly what is
numerator and what ia denominator? This is the least one could expect
from a graduate student...

Tonio
From: Kaba on
Tonico wrote:
> On Oct 4, 2:31 pm, Kaba <n...(a)here.com> wrote:
> > Hi,
> >
> > Let
> >
> > n in N (positive integers)
> > s in R+ (positive reals)
> >
> > f : [1, n] sub N -> R :
> > f(m) = m^2 (s - 1)^2 / n + 2 m^2 (s - 1) / n + m
> >
> > Problem:
> >
> > 1) Find m_min which minimizes f
> >
> > 2) Find m_max which maximizes f
> >
> > Any ideas?
>
>
>
> Yes: what about adding some parentheses to understand clearly what is
> numerator and what ia denominator? This is the least one could expect
> from a graduate student...

Sorry:) I have been writing a lot of stuff using the AsciiMath notation
lately, under which there is no ambiguity, and I then wrote that
expression automatically.

The function is:

f(m) = (m^2 (s - 1)^2 / n) + 2 (m^2 (s - 1) / n) + m

Meanwhile, I figured out that

f(m) = (m^2 (s^2 + 1) / n) + m

Let us expand the domain of f to reals, then:

f'(m) = (2 m (s^2 + 1) / n) + 1

f'(m) = 0
=>
m = -n / (2 (s^2 + 1)) < 0 < 1

Since f is also a quadratic with a positive leading coefficient, f is
increasing in [1, n].

=> m_min = f(1), m_max = f(n)

--
http://kaba.hilvi.org
From: Tonico on
On Oct 4, 4:05 pm, Kaba <n...(a)here.com> wrote:
> Tonico wrote:
> > On Oct 4, 2:31 pm, Kaba <n...(a)here.com> wrote:
> > > Hi,
>
> > > Let
>
> > > n in N (positive integers)
> > > s in R+ (positive reals)
>
> > > f : [1, n] sub N -> R :
> > > f(m) = m^2 (s - 1)^2 / n + 2 m^2 (s - 1) / n + m
>
> > > Problem:
>
> > > 1) Find m_min which minimizes f
>
> > > 2) Find m_max which maximizes f
>
> > > Any ideas?
>
> > Yes: what about adding some parentheses to understand clearly what is
> > numerator and what ia denominator? This is the least one could expect
> > from a graduate student...
>
> Sorry:) I have been writing a lot of stuff using the AsciiMath notation
> lately, under which there is no ambiguity, and I then wrote that
> expression automatically.
>
> The function is:
>
> f(m) = (m^2 (s - 1)^2 / n) + 2 (m^2 (s - 1) / n) + m
>
> Meanwhile, I figured out that
>
> f(m) = (m^2 (s^2 + 1) / n) + m
>

How did you figure that? You wrote:

f(m) = (m^2 (s - 1)^2 / n) + 2 (m^2 (s - 1) / n) + m =

(m^2/n)[(s-1)^2 + 2(s-1)] + m = (m^2)/n)(s-1)(s+1) + m =

(m^2/n)(s^2 - 1) + m , and from here:

f'(m) = (2m/n)(s^2 - 1) + 1 = 0 <==> m = n/[2(1-s^2)] ==> there's

only one critic point at m = n/[2(1-s^2)].

The function f(m) is a parabola (and thus its extreme point is its
vertex), but we can't even say whether it is convez upwards or
downwards since this depends on its quadratic coefficient (s^2 - 1)/
n, which can be zero (s = 1) or negative or positive, depending on s <
1 or s > 1.

Tonio



> Let us expand the domain of f to reals, then:
>
> f'(m) = (2 m (s^2 + 1) / n) + 1
>
> f'(m) = 0
> =>
> m = -n / (2 (s^2 + 1)) < 0 < 1
>
> Since f is also a quadratic with a positive leading coefficient, f is
> increasing in [1, n].
>
> => m_min = f(1), m_max = f(n)
>
> --http://kaba.hilvi.org- Hide quoted text -
>
> - Show quoted text -

From: Kaba on
Tonico wrote:
> > The function is:
> >
> > f(m) = (m^2 (s - 1)^2 / n) + 2 (m^2 (s - 1) / n) + m
> >
> > Meanwhile, I figured out that
> >
> > f(m) = (m^2 (s^2 + 1) / n) + m
> >
>
> How did you figure that? You wrote:

I made an error in derivation.

> f(m) = (m^2 (s - 1)^2 / n) + 2 (m^2 (s - 1) / n) + m =
>
> (m^2/n)[(s-1)^2 + 2(s-1)] + m = (m^2)/n)(s-1)(s+1) + m =
>
> (m^2/n)(s^2 - 1) + m , and from here:
>
> f'(m) = (2m/n)(s^2 - 1) + 1 = 0 <==> m = n/[2(1-s^2)] ==> there's
>
> only one critic point at m = n/[2(1-s^2)].
>
> The function f(m) is a parabola (and thus its extreme point is its
> vertex), but we can't even say whether it is convez upwards or
> downwards since this depends on its quadratic coefficient (s^2 - 1)/
> n, which can be zero (s = 1) or negative or positive, depending on s <
> 1 or s > 1.

That's right. I'll restrict the problem such that:

s in [0, 1[ sub R. Further, n in N, n >= 2.

Let

m = n / [2(1 - s^2)]

Then:

m >= 1
<=>
n / [2(1 - s^2)] >= 1
<=>
n / 2 >= 1 - s^2
<=>
s^2 >= 1 - n / 2
<=>
true

And:

m <= n
<=>
n / [2(1 - s^2)] <= n
<=>
1 / 2 <= 1 - s^2
<=>
s^2 <= 1 / 2
<=>
s <= 1 / sqrt(2)

If s > 1 / sqrt(2), then f is decreasing in [1, n]. Thus
m_min = f(n)
m_max = f(1)

Otherwise, if s <= 1 / sqrt(2):
m_min = min {f(floor(m)), f(floor(m) + 1)}
m_max = max {f(1), f(n)}

Right?

In the latter case:

m_min = min {f(floor(m)), f(floor(m) + 1)} =
f(floor(m)), if m - floor(m) <= 1 / 2
f(floor(m) + 1), otherwise

m_max = max {f(1), f(n)} =
f(1), if s >= 1 / sqrt(n + 1)
f(n), otherwise

--
http://kaba.hilvi.org