2
$\begingroup$

I need a function $f(x)$ with the following properties -

  1. It should be monotonically non-decreasing.
  2. For $x \geq 1$, $x + \frac{1}{x} - f(x) < \epsilon$ where $\epsilon$ is an extremely small positive real number.
  3. It should look simple. I know this sounds like a very vague requirement, but I hope the meaning of "simple" is clear to some extent. For example, the function should definitely not have a piecewise definition. One should be able to write it by using not more than 15 characters, etc. etc.

Can anyone think of such a function? It's fine even if the above requirements are satisfied only for positive values of $x$.

$\endgroup$
5
  • 1
    $\begingroup$ $f(x)=x+1$ works. $\endgroup$ Sep 27, 2010 at 7:44
  • $\begingroup$ $f(x) = x + \frac{1}{1+|x-1|}$ satisfies (1) and what you probably mean by (2). But maybe for (3) you want something differentiable? $\endgroup$ Sep 27, 2010 at 8:38
  • 1
    $\begingroup$ What's wrong with $f= x + \frac 1 x - \frac \varepsilon 2 $ ? $\endgroup$ Sep 27, 2010 at 10:31
  • $\begingroup$ @Piero - The function you mention is not monotone non-decreasing over $(0,\infty)$ as required. $\endgroup$ Sep 27, 2010 at 12:26
  • 1
    $\begingroup$ Right. He wants the inequality over $x>1$ but the monotonicity over $x>0$. $\endgroup$ Sep 27, 2010 at 12:43

2 Answers 2

13
$\begingroup$

This may be more than 15 symbols, but $$ f(x)= x + \frac{1}{1+(x+\delta-1)^{2n/(2n-1)}} $$ where $\delta>0$ is small and $n$ is large. For $n=2$ and $\delta=1/10$ it looks like this:

alt text (source)


EDIT:

Motivation

The idea is that we want $y=x+g(x)$ where $g$ is a bell curve of some sort, say $g(x)=e^{-x^2}$. Something that is a little more reminiscent of $1/x$ is $$ g_{1,1}(x)=\frac{1}{1+x^2} $$ but the $x^2$ term means that the rate of approach to $1/x$ is not so good. On the other hand $$ g_{\infty,0}(x)=\frac{1}{1+|x-1|} $$ would be perfect, were it differentiable. The formula $$ g_{n,\delta}(x)= \frac{1}{1+(x+\delta-1)^{2n/(2n-1)}} $$ gives something that looks like the latter from far away ($n=\infty$, $\delta=0$), and like the former from up close ($n=\delta=1$). Note that $|a|=(a^2)^{1/2}$.

EDIT #2:

Or...

Here is a plot of Gowers' more general solution (in another answer to this question), for this specific case, together with the original curve:

alt text (source)

$\endgroup$
1
  • $\begingroup$ Awesome. This works, thanks! Can you give me some idea about how you came up with this by the way? $\endgroup$ Sep 27, 2010 at 17:45
5
$\begingroup$

Here's a general way of doing something like this. One way we could achieve what we want is to multiply the function x+1/x by something that's very like a step function -- 0 up to 1 and 1 from then on.

Now to get a step function in a nice clean way a simple method is to take a Gaussian that's centred at 1 and has very small variance, and integrate it. Multiplying the resulting function by x+1/x should do the trick.

If you don't count the integral of $e^{-x^2}$ as nice, then you have to find another function that looks like a step function. Something based on $\tan^{-1}(x)$ should do the trick. At a guess, $(\tan^{-1}(1000(x-1))+\pi/2)/\pi$ ought to be OK.

$\endgroup$
1
  • 1
    $\begingroup$ The hyperbolic tangent would probably work nicely as well. $\endgroup$ Sep 28, 2010 at 3:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.