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

Discussion Overview

The discussion revolves around finding two convex functions, \( f \) and \( g \), defined from \( \mathbb{R} \) to \( \mathbb{R} \), such that \( f(x) = g(x) \) if and only if \( x \) is an integer. Participants explore various function forms and properties, including piecewise definitions and linear interpolation, while examining the implications of convexity.

Discussion Character

  • Exploratory
  • Technical explanation
  • Conceptual clarification
  • Debate/contested

Main Points Raised

  • Some participants propose using \( f(x) = e^x \) and \( g(x) = 1 \), but question whether this satisfies the condition for all integers.
  • There is a suggestion that \( f \) and \( g \) need to be different functions, yet they must equal each other at every integer \( x \).
  • One participant considers whether a function containing \( \ln{x} \) might be suitable.
  • Another idea is to use a piecewise function consisting of line segments to meet the requirements.
  • A specific piecewise function is proposed where \( g(x) \) equals \( e^x \) for integers and linearly interpolates between the nearest integers for non-integers.
  • Concerns are raised about the convexity of the proposed function \( g \) and whether both directions of the equality are trivial.
  • Participants discuss the implications of convexity, noting that if \( x \) and \( y \) are between the same consecutive integers, the graph is a straight line, and if on different segments, the slopes must be considered.

Areas of Agreement / Disagreement

Participants generally agree that \( f \) and \( g \) must be the same at integer points, but there is no consensus on the specific forms of these functions or the necessity of their differences. The discussion remains unresolved regarding the best approach to define \( g \) while ensuring convexity.

Contextual Notes

Participants express uncertainty about the specific forms of \( f \) and \( g \) and the implications of convexity in their proposed functions. The discussion includes various assumptions about the properties of the functions without reaching a definitive conclusion.

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
5K
  • · 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