Convex Functions: Find $f,g$ Satisfying f(x)=g(x) iff x is an Integer

  • Context: MHB 
  • Thread starter Thread starter evinda
  • Start date Start date
  • Tags Tags
    Convex Functions
Click For Summary
SUMMARY

The discussion focuses on finding two convex functions, \( f \) and \( g \), defined as \( f,g: \mathbb{R} \to \mathbb{R} \), such that \( f(x) = g(x) \) if and only if \( x \) is an integer. The proposed function \( f(x) = e^x \) is analyzed alongside a suitable \( g(x) \) that interpolates between integers. The final suggestion for \( g(x) \) is a piecewise function that equals \( e^x \) at integers and linearly interpolates between them otherwise, ensuring convexity. The convexity of \( g \) is justified through its linear segments and the properties of its second derivative.

PREREQUISITES
  • Understanding of convex functions
  • Familiarity with piecewise functions
  • Knowledge of linear interpolation
  • Basic calculus, including derivatives
NEXT STEPS
  • Explore the properties of convex functions in detail
  • Learn about piecewise function construction and applications
  • Study linear interpolation techniques and their mathematical implications
  • Investigate the role of derivatives in determining function behavior
USEFUL FOR

Mathematicians, students studying real analysis, and anyone interested in the properties of convex functions and their applications in optimization problems.

evinda
Gold Member
MHB
Messages
3,741
Reaction score
0
Hello! (Wave)

I want to find two convex functions $f,g: \mathbb{R} \to \mathbb{R}$ such that $f(x)=g(x)$ iff $x$ is an integer.I have thought of the following two functions $f(x)=e^x$, $g(x)=1$.

Then at the $\Rightarrow$ direction, we would have $f(x)=g(x) \Rightarrow e^x=1 \Rightarrow x=0 \in \mathbb{Z}$.

Right?

At the other direction, we cannot pick $0$, we have to pick an arbitrary integer. Right? If so, then it does not hold that $f(x)=g(x)$...

So do we have to pick other $f,g$ ? (Thinking)
 
Physics news on Phys.org
evinda said:
Hello!

I want to find two convex functions $f,g: \mathbb{R} \to \mathbb{R}$ such that $f(x)=g(x)$ iff $x$ is an integer.I have thought of the following two functions $f(x)=e^x$, $g(x)=1$.

Then at the $\Rightarrow$ direction, we would have $f(x)=g(x) \Rightarrow e^x=1 \Rightarrow x=0 \in \mathbb{Z}$.

Right?

At the other direction, we cannot pick $0$, we have to pick an arbitrary integer. Right? If so, then it does not hold that $f(x)=g(x)$...

So do we have to pick other $f,g$ ?

Hey evinda! (Happy)

Indeed, we will have to pick other $f,g$.
I'm assuming that $f$ and $g$ have to be different functions. Do they?
Either way, it means that $f$ and $g$ have to be the same at every integer $x$.

Can we find a function $g$ that is suitable if for instance $f(x)=e^x$? (Thinking)
 
Klaas van Aarsen said:
Hey evinda! (Happy)

Indeed, we will have to pick other $f,g$.
I'm assuming that $f$ and $g$ have to be different functions. Do they?

I assume so, too.

Klaas van Aarsen said:
Either way, it means that $f$ and $g$ have to be the same at every integer $x$.

Can we find a function $g$ that is suitable if for instance $f(x)=e^x$? (Thinking)

(Thinking) Do we have to pick a function containing $\ln{x}$ ? I haven't thought of a suitable function so far...
 
evinda said:
I assume so, too.

Do we have to pick a function containing $\ln{x}$ ? I haven't thought of a suitable function so far...

How about a piecewise function that consists of line segments? (Thinking)
 
Klaas van Aarsen said:
How about a piecewise function that consists of line segments? (Thinking)

So you mean that we pick a function that equals $e^x$ for $x \geq 0$ and $e^{-x}$ for $x<0$ ? (Thinking)
 
evinda said:
So you mean that we pick a function that equals $e^x$ for $x \geq 0$ and $e^{-x}$ for $x<0$ ? (Thinking)

I was thinking of a function that equals $e^x$ if $x$ is an integer, and otherwise linearly interpolates between the nearest integers. (Thinking)
 
Klaas van Aarsen said:
I was thinking of a function that equals $e^x$ if $x$ is an integer, and otherwise linearly interpolates between the nearest integers. (Thinking)

You mean that we pick this $g(x)$ ?

$$g(x)=\begin{cases}e^x & \text{ if } x\in \mathbb{Z} \\ e^{\lfloor x\rfloor}+(x-\lfloor x\rfloor)\frac{e^{\lceil x\rceil}-e^{\lfloor x\rfloor}}{\lceil x\rceil-\lfloor x\rfloor} & \text{ if } x\notin \mathbb{Z}\end{cases}$$
 
evinda said:
You mean that we pick this $g(x)$ ?

$$g(x)=\begin{cases}e^x & \text{ if } x\in \mathbb{Z} \\ e^{\lfloor x\rfloor}+(x-\lfloor x\rfloor)\frac{e^{\lceil x\rceil}-e^{\lfloor x\rfloor}}{\lceil x\rceil-\lfloor x\rfloor} & \text{ if } x\notin \mathbb{Z}\end{cases}$$

Yep. That would work, wouldn't it? (Thinking)
 
Klaas van Aarsen said:
Yep. That would work, wouldn't it? (Thinking)

Why is $g$ convex?

Also both directions are trivial, aren't they?

The $\Leftarrow$ direction is implied by definition and if $f(x)=g(x)$ we have to have that $x \in \mathbb{Z}$ since otherwise the equality wouldn't hold. Right? (Thinking)
 
  • #10
evinda said:
Why is $g$ convex?

Also both directions are trivial, aren't they?

The $\Leftarrow$ direction is implied by definition and if $f(x)=g(x)$ we have to have that $x \in \mathbb{Z}$ since otherwise the equality wouldn't hold. Right? (Thinking)

Right!

Suppose wlog that $x < y$.
$g$ is convex because:
  • If $x$ and $y$ are between the same consecutive integers, then the graph between them is a straight line, which counts as convex.
  • Otherwise they are on different line segments and $y$ is on a line segment with a higher slope since the second derivative of $f$ is positive everywhere. Consequently the line that connects them is above all line segments in between.
(Thinking)
 

Similar threads

  • · Replies 24 ·
Replies
24
Views
4K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 23 ·
Replies
23
Views
3K
  • · Replies 0 ·
Replies
0
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K