Example of function satisfying for fixed $t\in (0,1)$ inequality $f(tx+(1-t)y) \leq tf(x)+(1-t)f(y)$

I would like to know an example of function $f: \mathbb{R} \rightarrow \mathbb{R}$ which is not convex but satisfies for fixed $t\in (0,1)$ the following inequality: $$f(tx+(1-t)y) \leq t f(x)+(1-t)f(y) \textrm{ for all } x,y \in \mathbb{R}.$$

I know only that such functions have to be discontinuous everywhere.

• @JavaMan: Possibly Alex means that there is at least one $t\in(0,1)$ such that $f$ satisfies the inequality. – Brian M. Scott Jan 13 '12 at 17:50
• A function is convex iff satisfies this inequality for all $t\in(0,1)$ and all $x,y$. But in my question $t$ is fixed for. For example $t$ may be $t=\frac{1}{3}$. – Alex Jan 13 '12 at 17:53
• Answers to this question suggest that for $t=1/2$ (i.e. for midpoint convex or Jensen convex functions) some form of AC is needed: A counterexample for Big Rudin's Chapter 3 Exercise 4 – Martin Sleziak Jan 13 '12 at 17:53
• Thanks. But I know that additive discontinuous function satisfies this inequality with $t=\frac{1}{2}$. I look for example for another $t$. – Alex Jan 13 '12 at 17:58
• Examples based on a Hamel basis of $\mathbb R$ over $\mathbb Q$ will satisfy your inequality for all rational $t$. – Robert Israel Jan 13 '12 at 23:14

Lemma 1. Let $D\subseteq\mathbb R^n$ be a convex compact set. Let $f:D\to\mathbb R$ be an $\alpha$-convex function for some fixed $\alpha\in(0,1)$, i.e. assume that $$f(\alpha x+(1-\alpha)y)\le \alpha f(x)+(1-\alpha)f(y) \qquad (\ast)$$ holds for all $x,y\in D$. Then $f$ is also Jensen convex, i.e. $(\ast)$ is satisfied with $\alpha=\frac12$.
Based on the above result, it suffices to consider $t=\frac12$. It was explained in this answer that some form of AC is needed to construct non-convex Jensen convex function. (Since every measurable Jensen convex function is convex.)