If a function is linear, I know that this should be true: f(x2)−f(x1)=f(bar x) Where bar x is the point exactly in between x1 and x2. Now, I know from looking at their graphs that the same shouldn't be true for logarithmic and exponential functions. That is, for logarithmic functions: f(x2)−f(x1)<f(bar x) And for exponential functions: f(x2)−f(x1)>f(bar x)

schnelltcr

schnelltcr

Answered question

2022-08-12

Linear functions versus Logarithmic and Exponential functions
If a function is linear, I know that this should be true:
f ( x 2 ) f ( x 1 ) = f ( x ¯ )
Where x ¯ is the point exactly in between x 1 and x 2 . Now, I know from looking at their graphs that the same shouldn't be true for logarithmic and exponential functions. That is, for logarithmic functions:
f ( x 2 ) f ( x 1 ) < f ( x ¯ )
And for exponential functions:
f ( x 2 ) f ( x 1 ) > f ( x ¯ )
I'm not a mathematician by formation, but I feel like it should be possible to prove this without having to look at their graph. Does anyone know how to do this?

Answer & Explanation

vladinognm

vladinognm

Beginner2022-08-13Added 13 answers

Your statements are hinting at something called convexity; however, your notation is a bit off: as it is now, the statements don't hold even for simple cases. I'm going to assume that you intended to talk about convexity and answer myself :)
A function is said to be convex if, for any two points x and y and any λ [ 0 , 1 ], then
f ( λ x + ( 1 λ ) y ) λ f ( x ) + ( 1 λ ) f ( y ) .
Note, in particular, that this means that the value of the function at the midpoint of x and y is smaller than the midpoint of the values of the function at x and y:
f ( x + y 2 ) f ( x ) + f ( y ) 2 .
If a function is not convex it may be concave, if
f ( λ x + ( 1 λ ) y ) λ f ( x ) + ( 1 λ ) f ( y ) .
If a function is both convex and concave, then it is linear. Note that there are functions that are neither convex nor concave!
In the examples you allude to, we have that the linear function is (clearly) linear, so
f ( λ x + ( 1 λ ) y ) = λ f ( x ) + ( 1 λ ) f ( y ) .
Let's look at the exponential function f ( x ) = e x ; this is a convex function, so in this case we would have
e λ x + ( 1 λ ) y λ e x + ( 1 λ ) e y .
The general proof requires derivatives and Taylor expansions; however, for the midpoint, the proof is very easy. In this case we have to prove that
e x + y 2 e x + e y 2 ,
for all x and y. Consider the following steps
e x + y 2 e x + e y 2
2 e x + y 2 e x + e y
2 e x / 2 e y / 2 e x + e y
0 e x 2 e x / 2 e y / 2 + e y
0 ( e x / 2 e y / 2 ) 2
Note that the right hand side is a square, so the inequality holds for all x and y!
The logarithm function, on the other hand, is concave, so the reverse inequality holds: for all positive x and y,
log ( x + y 2 ) log ( x ) + log ( y ) 2 .
We can easily prove this with the following chain of inequalities:
log ( x + y 2 ) log ( x ) + log ( y ) 2
x + y 2 exp ( log ( x ) + log ( y ) 2 )
x + y 2 exp ( log ( x ) 2 ) exp ( log ( y ) 2 )
x + y 2 exp ( log ( x ) ) exp ( log ( y ) )
x + y 2 x y
x + y 2 x y
x + y 2 x y 0
( x y ) 2 0 ,
which, again, is true for all (positive) x and y!

Do you have a similar question?

Recalculate according to your conditions!

Ask your question.
Get an expert answer.

Let our experts help you. Answer in as fast as 15 minutes.

Didn't find what you were looking for?