1

I'm not a mathematician but I have a question. I have some conditions that I want to create a function which holds that condition, Is there any way to build a mathematical function to satisfy this condition.The condition I need the function to hold is

$$ \frac{f(x + 2) + f(x)}2 \ge f(x + 1) $$

I think I asked my question wrong, I have a set of random and strickly increasing numbers, now I want to use some mathematical way to make them appear convex just like funxtion x^2, so I needed the function to satisfy the condition I noted above, but the real problem is that I want to make thease numbers to look convex, so is there anything I can use??

Thank you all

  • Take any convex function. – TZakrevskiy Mar 07 '14 at 08:44
  • @TZakrevskiy OP says (s)he isn't a mathematician. That sentence isn't even borderline helpful. – Guy Mar 07 '14 at 08:45
  • 2
    Um..... $f(x)=0$? –  Mar 07 '14 at 08:48
  • 1
    @John oh my god, I didn't even pay attention to equal to part of the $\ge$. This feels wrong though. :p – Guy Mar 07 '14 at 08:50
  • great catch though. upvoting your comment – Guy Mar 07 '14 at 08:50
  • @Mahdi Since there are so many functions that satisfy your property; if you give us a little more context we might be able to help you pick a suitable one. – DanielV Mar 07 '14 at 09:27
  • @DanielV Look, I have a set of positive integer values, something like {1, 3, 12, 13, 15, 18, 100, 120, ...}, there isn't any kind of relation between these numbers, they are completely random, now if you draw them on paper as values {(1, 1), (2, 3), (3, 12), (4, 13), (5, 15), ...} you see that the curve which passes through these points can be referred as a strictly increasing function, but it is somehow noisy like a rotated variation of sin function, I want to remove these noises and make it smooth, so I thought something like y = x^2 might be good if I could make the points to fit it. – Mehdi Ijadnazar Mar 08 '14 at 07:04
  • @DanielV I though of 2^x (x being elements in my number set) and it will do the job but the problem is that my number set ranges from 1 to near 20 billion and computing 2^20000000000 cannot be done easily, so I'm looking to another function that fits in my condition.. – Mehdi Ijadnazar Mar 08 '14 at 07:09

4 Answers4

1

$f(x) = x^2$ will do the job.

\begin{align} \frac{f(x+2)+f(x)}{2} &= \frac{(x+2)^2 + x^2}{2} \\ &= \frac{x^2 + 4x + 4 + x^2}{2} \\ &= x^2 + 2x + 2 \\ &> x^2 + 2x + 1 \\ &= (x+1)^2 \\ &= f(x+1). \\ \end{align}

oks
  • 1,345
  • 1
    It is useful to note, as pointed out by John, that any $f(x) = c$ is also valid. – Guy Mar 07 '14 at 08:54
  • 2
    Also any sum of suitable functions. So for instance $f_1(x)=c, f_2(x)=x^2, f_3(x)=exp(x)$ will all work, and so will, say $f_4(x) = c + x^2 + exp(x)$. – oks Mar 07 '14 at 08:58
  • 1
    A sinusoidal wave with a period that is an integer also satisfies this. – DanielV Mar 07 '14 at 09:29
1

This condition is satisfied by any convex function, i.e., a function satisfying $$ f\big(tx+(1-t)y\big)\le tf(x)+(1-t)f(y), $$ for all $t\in (0,1)$.

If $f$ is twice differentiable, then it is convex if and only if $$ f''(x)\ge 0, $$ for all $x$.

HENCE, try a function with non-negative 2nd derivative.

1

Your condition says that the function's value at $x+1$ is less than the average of its values at $x$ and $x+2$. In other words, at $x+1$, the function value must be below the "straight line" values between $x$ and $x+2$.

Functions with this sort of property are called "convex". Basically, this just means that the graph of the function looks "hollow" when viewed from above.

Many functions have this property. The simplest interesting one I can think of is $f(x) = x^2$.

bubba
  • 43,483
  • 3
  • 61
  • 122
1

There are many functions for which this condition holds, in general for function $f(x)$, and $0\leq\theta\leq 1$, if:

$$\theta f(z)+(1-\theta) f(y)\geq f(\theta z+(1-\theta)y)$$ then the function is called convex.

In your case, $\theta=1/2$, $z=x+1$, $z=x$.

You can find a list of convex functions here.

Alt
  • 2,592