# Popcorn-kind function (I suppose)

• Dec 23rd 2008, 10:18 AM
james_bond
Popcorn-kind function (I suppose)
$f(x)=\begin{cases} \frac{q}{q+1}\mbox{ if }x=\frac{p}{q}\mbox{ is a rational number}\\ 0\mbox{ if }x\mbox{ is irrational or }0 \end{cases}$
It is assumed here that $\gcd(p,q) = 1$ and $q > 0$ so that the function is well-defined and nonnegative.

I have to show that there is no such closed interval on which $f(x)$ has maximum although it is bounded.
• Dec 23rd 2008, 10:23 AM
HallsofIvy
Quote:

Originally Posted by james_bond
$f(x)=\begin{cases} \frac{q}{q+1}\mbox{ if }x=\frac{p}{q}\mbox{ is a rational number}\\ 0\mbox{ if }x\mbox{ is irrational or }0 \end{cases}$
It is assumed here that $\gcd(p,q) = 1$ and $q > 0$ so that the function is well-defined and nonnegative.

I have to show that there is no such closed interval on which $f(x)$ has maximum although it is bounded.

You need to show that within any interval, you can find p/q with both p and q arbitrarily large so that q/(q+1) is arbitrarily close to 1: but never equal to 1.
• Dec 23rd 2008, 10:28 AM
james_bond
Quote:

Originally Posted by HallsofIvy
You need to show that within any interval, you can find p/q with both p and q arbitrarily large so that q/(q+1) is arbitrarily close to 1: but never equal to 1.

Thx I understand but how can I do that? Little confused :S
• Dec 23rd 2008, 01:53 PM
HallsofIvy
Quote:

Originally Posted by james_bond
Thx I understand but how can I do that? Little confused :S

Let a and b be numbers with a< b. If a< p/q< b, for integers p and q (at least q positive), then aq< p< bq. How large does (b-a)q have to be? How large does q have to be for that to be possible? Do you see that for arbitrarily large q it is always possible?