# Thread: convex functions

1. ## convex functions

For $x\in[0,1]$ and $0 \leq f(x)\leq x$ EDIT: and f(0)=0 and f(1)=1

Is it possible for f to be convex but not increasing?

And,

Is it possible for f to be increasing but not convex?

I'm pretty sure the first question is a "no", but how about the second one? If the answer is yes could you please provide an example?

Thanks

2. Originally Posted by HD09
For $x\in(0,1)$ and $0 < f(x)\leq x$

Is it possible for f to be convex but not increasing?

And,

Is it possible for f to be increasing but not convex?

I'm pretty sure the first question is a "no", but how about the second one? If the answer is yes could you please provide an example?

Thanks
The answer to both questions is "yes". The function $f(x)= x^2$ is convex for all x but is decreasing for x< 0. The function $f(x)= -x^2$ is not convex for any x but is increasing for x< 0.

3. Originally Posted by HD09
For $x\in(0,1)$ and $0 < f(x)\leq x$
!!!

4. bump...

5. and again...

6. Originally Posted by HD09
For $x\in(0,1)$ and $0 < f(x)\leq x$

Is it possible for f to be convex but not increasing?

And,

Is it possible for f to be increasing but not convex?

I'm pretty sure the first question is a "no", but how about the second one? If the answer is yes could you please provide an example?

Thanks
We first need a little lemma

Lemma: $x\ge\ln(x)\quad \forall x\in\mathbb{R}$

Proof: Let $f(x)=x-\ln(x)$. For $x\in(0,1)$ $f(x)>0$ trivially (why?). So let $x\ge1$. $f(0)=1$ and $f'(x)=1-\frac{1}{x}$ which is clearly greater than 0 for all positive $x\quad\blacksquare$

Using this lemma we see that $0<\ln(x)\le x\quad x\in(0,1)$. Also $f'(x)=\frac{1}{x}>0\quad x\in(0,1)$ but $f''(x)=\frac{-1}{x^2}<0\quad x\in(0,1)$ which answers your second question.

7. Originally Posted by Drexel28
Using this lemma we see that $0<\ln(x)\le x\quad x\in(0,1)$. Also $f'(x)=\frac{1}{x}>0\quad x\in(0,1)$ but $f''(x)=\frac{-1}{x^2}<0\quad x\in(0,1)$ which answers your second question.
ln(x) is negative for all x in (0,1) !!

But I see the gist of what you're saying... a function with that shape could be increasing but not convex and satisfy the requirements I said...

OK, I'm edditing the original post with extra conditions for f.

Now is convexity the same as "increasingness"?

8. Hey, I don't set at the computer all day!

Okay, you want an example of an increasing function that stays within the triangle with vertices (0,0), (1, 0), (1,1), that is increasing but not always convex. Take, as a "middle" point, (1/2, 1/4). The function f(x)= $x^2$ has graph that goes from (0,0) to (1/2, 1/4) and is always increasing (and convex). Further it has slope 2(1/2)= 1 at (1/2, 1/4). Now smoothly attach another function to that:
Take a cubic, $ax^3+ bx^2+ cx+ d$ that
1) passes through (1/2, 1/4)
2) has slope 1 at (1/2, 1/4)
3) passes through (1, 1)
4) has slope 1 at (1, 1)

Those are 4 conditions that will allow us to determine the four coefficients, a, b, c, and d.
The graph passes through (1/2, 1/4): $\frac{a}{8}+ \frac{b}{4}+ \frac{c}{2}+ d= \frac{1}{4}$.

The slope at (1/2, 1/4) is 1: \frac{3a}{4}+ b+ c= 1[/tex].

The graph passes through (1,1): a+ b+ c+ c= 1.

The slope at (1,1) is 1: 3a+ 2b+ c= 1.

Solving form a, b, c, and d and attaching that cubic to $x^2$ should give a function which is always increasing but is becomes "non-convex" somewhere between x= 1/2 and x= 1.

9. Very nice, thanks a lot.

(And I'm assuming I was right and that a convex function with those restrictions must be increasing?)

10. Originally Posted by HD09
ln(x) is negative for all x in (0,1) !!

But I see the gist of what you're saying... a function with that shape could be increasing but not convex and satisfy the requirements I said...

OK, I'm edditing the original post with extra conditions for f.

Now is convexity the same as "increasingness"?
Aha! Sorry about that. But in my stupidity was something nice.

Notice that $0 eventually on $(0,1)$. So then $f'(x)=\frac{-1}{x},f''(x)=\frac{1}{x^2}$ which answers your first question in the affirmiative.

11. But I want $f(x)\leq x$ for ALL x in (0,1) ... (and f(0)=0 and f(1)=1)