Find a function so that the composition is continuous

In summary, we have discussed the continuity of a function $f$ with real constants $a,b,c$ and have found that for $a=3, b=-2, c=-\frac{1}{2}$, the function is continuous at $x=1$ and $x=2$. We then explored the possibility of finding a continuous function $g$ such that $f\circ g$ or $g\circ f$ is continuous on the whole real number line. We determined that for $g\circ f$ to be continuous, $g$ must be continuous at $f(1)$ and for $g\circ f$ to be continuous, $g$ must be continuous at $f(2)
  • #1
mathmari
Gold Member
MHB
5,049
7
Hey! :eek:

For which real constants $a,b,c$ is the following function $f$ continuous on $\mathbb{R}$ ?
$$f(x)=\begin{cases}1+x^2 & \text{ for } x\leq 1, \\ ax-x^3 & \text{ for } 1<x< 2 \\ b & \text{ for } x=2\\ cx^2 & \text{ for } x>2\end{cases}$$
For $a=1, b=-6, c=-\frac{3}{2}$ the function $f$ is discontinuous at $x_0=1$. Are there continuous functions $g:\mathbb{R}\rightarrow \mathbb{R}$, such that $f\circ g$ or $g\circ f$ is continuous on whole $\mathbb{R}$ ?

We have to check the continuity at the points $x=1$ and $x=2$.

We consider the point $x=1$:

We have that $\lim_{x\rightarrow 1^-}f(x)=\lim_{x\rightarrow 1^-}(1+x^2)=2$, $\lim_{x\rightarrow 1^+}f(x)=\lim_{x\rightarrow 1^+}(ax-x^3)=a-1$ and $f(1)=1+1^2=2$.

So that the function is continuous at $x=1$ it must hold $a-1=2\Rightarrow a=3$.

We consider the point $x=2$:

We have that $\lim_{x\rightarrow 2^-}f(x)\overset{ a=3 }{ = } \lim_{x\rightarrow 2^-}(3x-x^3)=6-8=-2$, $\lim_{x\rightarrow 2^+}f(x)=\lim_{x\rightarrow 2^+}(cx^2)=4c$ and $f(2)=b$.

So that the function is continuous at $x=2$ it must hold $-2=4c=b$. So we get $b=-2$ and $c=-\frac{1}{2}$.

Is everything correct?

For $a=1, b=-6, c=-\frac{3}{2}$ we get the function $$f(x)=\begin{cases}1+x^2 & \text{ for } x\leq 1, \\ x-x^3 & \text{ for } 1<x< 2 \\ -6 & \text{ for } x=2\\ -\frac{3}{2}x^2 & \text{ for } x>2\end{cases}$$

How can we find (or check if there exist) continuous functions $g$ such that $f\circ g$ or $g\circ f$ is continuous on whole $\mathbb{R}$ ?
 
Physics news on Phys.org
  • #2
mathmari said:
Is everything correct?

Hey mathmari! (Smile)

Yep. (Nod)

mathmari said:
For $a=1, b=-6, c=-\frac{3}{2}$ we get the function $$f(x)=\begin{cases}1+x^2 & \text{ for } x\leq 1, \\ x-x^3 & \text{ for } 1<x< 2 \\ -6 & \text{ for } x=2\\ -\frac{3}{2}x^2 & \text{ for } x>2\end{cases}$$

How can we find (or check if there exist) continuous functions $g$ such that $f\circ g$ or $g\circ f$ is continuous on whole $\mathbb{R}$ ?

What do we get if we apply the definition of continuity to $g\circ f$ for some unknown function $g$? (Wondering)
 
  • #3
I like Serena said:
What do we get if we apply the definition of continuity to $g\circ f$ for some unknown function $g$? (Wondering)

Let $a$ be an arbitrary point.

We want that $f(g(x))$ is continuous at each $a$, so $f$ is continuous at each $g(a)$.

We know that $g$ is a continuos function. So it will be continuous at each $a$.
That means that for all $\epsilon>0$ there is some $\delta>0$ such that $$|x-a|<\delta \Rightarrow|g(x)-g(a)|<\epsilon$$

Since $f$ is continuous at $g(a)$ we have that for all $\tilde{\epsilon} > 0$ there is some $\tilde{\delta}$ such that $$|g(x) - g(a)| < \tilde{\delta} \Rightarrow |f(g(x))-f(g(a))|<\tilde{\epsilon}$$

For $\epsilon=\tilde{\delta}$ we have the following:

For all $\epsilon > 0$ there is some $\delta > 0$ and a $\tilde{\delta}> 0$ such that $$|x-a| < \delta\Rightarrow |g(x)-g(a)|<\tilde{\delta}\Rightarrow |f(g(x)) - f(g(a))|<\epsilon$$
right? (Wondering)
 
  • #4
mathmari said:
Let $a$ be an arbitrary point.

We want that $f(g(x))$ is continuous at each $a$, so $f$ is continuous at each $g(a)$.

We know that $g$ is a continuos function. So it will be continuous at each $a$.
That means that for all $\epsilon>0$ there is some $\delta>0$ such that $$|x-a|<\delta \Rightarrow|g(x)-g(a)|<\epsilon$$

Since $f$ is continuous at $g(a)$ we have that for all $\tilde{\epsilon} > 0$ there is some $\tilde{\delta}$ such that $$|g(x) - g(a)| < \tilde{\delta} \Rightarrow |f(g(x))-f(g(a))|<\tilde{\epsilon}$$

For $\epsilon=\tilde{\delta}$ we have the following:

For all $\epsilon > 0$ there is some $\delta > 0$ and a $\tilde{\delta}> 0$ such that $$|x-a| < \delta\Rightarrow |g(x)-g(a)|<\tilde{\delta}\Rightarrow |f(g(x)) - f(g(a))|<\epsilon$$
right? (Wondering)

Let's not jump to $\epsilon$-$\delta$ definitions of limits. (Worried)What we need for continuity of $g\circ f$ is that $\lim_{x\to x_0} g(f(x)) = g(f(x_0))$.
More specifically in our case that means that:
$$\lim_{x\to 1^+} g(f(x)) = \lim_{x\to 1^-} g(f(x)) = g(f(1))$$
What do we require from $g$ for that to be true? (Wondering)
 
  • #5
I like Serena said:
What we need for continuity of $g\circ f$ is that $\lim_{x\to x_0} g(f(x)) = g(f(x_0))$.
More specifically in our case that means that:
$$\lim_{x\to 1^+} g(f(x)) = \lim_{x\to 1^-} g(f(x)) = g(f(1))$$
What do we require from $g$ for that to be true? (Wondering)

$g$ has to continuous at $f(1)=2$, right? (Wondering)
 
  • #6
mathmari said:
$g$ has to continuous at $f(1)=2$, right? (Wondering)

Not quite, since f is not continuous at 1. (Thinking)
 
  • #7
I like Serena said:
Not quite, since f is not continuous at 1. (Thinking)

Do we maybe take as $g$ a constant function? Then we would have that $g(x)=C$ and $g(f(x))=C$, which is continuous everywhere? (Wondering)
 
  • #8
mathmari said:
Do we maybe take as $g$ a constant function? Then we would have that $g(x)=C$ and $g(f(x))=C$, which is continuous everywhere? (Wondering)

But $f$ is not continuous is it?
So if $g$ is a constant function, $g\circ f$ won't be continuous either would it?

Suppose we substitute the relevant parts of $f$ into the limit expression... (Thinking)
 
  • #9
I like Serena said:
Suppose we substitute the relevant parts of $f$ into the limit expression... (Thinking)

Do you mean the following?

$$\lim_{x\to 1^+} g(f(x)) =\lim_{x\to 1^+} g(x-x^3) \\ \lim_{x\to 1^-} g(f(x)) = \lim_{x\to 1^-} g(1+x^2) $$

So, it must hold that $$\lim_{x\to 1^+} g(x-x^3)= \lim_{x\to 1^-} g(1+x^2)$$ right? (Wondering)
 
Last edited by a moderator:
  • #10
Indeed. And since g is continuous, we can evaluate those limits, can't we? (Wondering)
 
  • #11
I like Serena said:
Indeed. And since g is continuous, we can evaluate those limits, can't we? (Wondering)

Ah yes. So, we get $$\lim_{x\to 1^+} g(x-x^3)= \lim_{x\to 1^-} g(1+x^2)\Rightarrow g\left (\lim_{x\to 1^+}(x-x^3)\right )= g\left (\lim_{x\to 1^-} (1+x^2)\right )\Rightarrow g(0 )= g(2)$$ right?

Such a function is for example $g(x)=x\cdot (x-2)$, isn't it?

(Wondering)
 
  • #12
mathmari said:
Ah yes. So, we get $$\lim_{x\to 1^+} g(x-x^3)= \lim_{x\to 1^-} g(1+x^2)\Rightarrow g\left (\lim_{x\to 1^+}(x-x^3)\right )= g\left (\lim_{x\to 1^-} (1+x^2)\right )\Rightarrow g(0 )= g(2)$$ right?

Such a function is for example $g(x)=x\cdot (x-2)$, isn't it?

Yep.

And I'm just realizing that I was wrong before. If $g$ is a constant function, $g\circ f$ will also be a constant function and therefore continuous. (Blush)
 
  • #13
I like Serena said:
Yep.

And I'm just realizing that I was wrong before. If $g$ is a constant function, $g\circ f$ will also be a constant function and therefore continuous. (Blush)

Ah ok!

If $g$ is a constant, $g(x)=C$. then we have that $g(f(x))=C$ and a constant function is everywhere continuous, right?

Is it possible that $f\circ g$ is continuous for some function $g$ ?

Can we take here also a constanst function? When $g(x)=C$ then we have that $f\circ g(x)=f(g(x))=f(C)$, which is also constant, right?

(Wondering)
 
  • #14
Yep.
 
  • #15
But can $C$ be also $1$ ?

Then we would have $f\circ g(x)=f(g(x))=f(1)=2$, or isn't $f(1)=2$ ? (Wondering)
 
  • #16
Sure. That's all correct. (Nod)
 
  • #17
mathmari said:
Do you mean the following?

$$\lim_{x\to 1^+} g(f(x)) =\lim_{x\to 1^+} g(x-x^3) \\ \lim_{x\to 1^-} g(f(x)) = \lim_{x\to 1^-} g(1+x^2) $$

So, it must hold that $$\lim_{x\to 1^+} g(x-x^3)= \lim_{x\to 1^-} g(1+x^2)$$ right? (Wondering)

mathmari said:
Ah yes. So, we get $$\lim_{x\to 1^+} g(x-x^3)= \lim_{x\to 1^-} g(1+x^2)\Rightarrow g\left (\lim_{x\to 1^+}(x-x^3)\right )= g\left (\lim_{x\to 1^-} (1+x^2)\right )\Rightarrow g(0 )= g(2)$$ right?

Such a function is for example $g(x)=x\cdot (x-2)$, isn't it?

(Wondering)

Could we do that also for $f\circ g$ ?

$$\lim_{x\to 1^+} f(g(x)) =\lim_{x\to 1^+} (g(x)-g^3(x))=g(1)-g^3(1) \\ \lim_{x\to 1^-} g(f(x)) = \lim_{x\to 1^-} (1+g^2(x))=1+g^2(1)$$

So we have to find a function $g$ such that $g(1)-g^3(1)=1+g^2(1)$.

Which function could that be? (Wondering)
 
  • #18
mathmari said:
Could we do that also for $f\circ g$ ?

$$\lim_{x\to 1^+} f(g(x)) =\lim_{x\to 1^+} (g(x)-g^3(x))=g(1)-g^3(1) \\ \lim_{x\to 1^-} g(f(x)) = \lim_{x\to 1^-} (1+g^2(x))=1+g^2(1)$$

So we have to find a function $g$ such that $g(1)-g^3(1)=1+g^2(1)$.

Which function could that be? (Wondering)

I'm afraid that for $f\circ g$ it's a little more complicated.
In this case it's not $x$ that has to approach $1^+$, but $g(x)$. (Worried)

Suppose that there is some $x_0$ such that $g(x_0)=1$ and $g$ is increasing in $x_0$.

Then
$$\lim_{{x\to x_0}^+} f(g(x)) = \lim_{y\to 1^+} f(y) =\lim_{y\to 1^+} (y-y^3)=0 \\
\lim_{{x\to x_0}^-} f(g(x)) = \lim_{y\to 1^-} f(y) =\lim_{y\to 1^-} (1+y^2)=2
$$
That meanst that $f\circ g$ would not be continuous in $x_0$ then.

So $g$ can't have a function value of $1$ where $g$ is monotone as well.
However, $g$ might still have a function value of $1$ if it is a (global) extreme. (Thinking)
 
  • #19
I like Serena said:
I'm afraid that for $f\circ g$ it's a little more complicated.
In this case it's not $x$ that has to approach $1^+$, but $g(x)$. (Worried)

Suppose that there is some $x_0$ such that $g(x_0)=1$ and $g$ is increasing in $x_0$.

Then
$$\lim_{{x\to x_0}^+} f(g(x)) = \lim_{y\to 1^+} f(y) =\lim_{y\to 1^+} (y-y^3)=0 \\
\lim_{{x\to x_0}^-} f(g(x)) = \lim_{y\to 1^-} f(y) =\lim_{y\to 1^+} (1+y^2)=2
$$
That meanst that $f\circ g$ would not be continuous in $x_0$ then.
So, is $f\circ g$ continuous only when $g$ is a constant function? (Wondering)
 
  • #20
mathmari said:
So, is $f\circ g$ continuous only when $g$ is a constant function?

$f$ has jump discontinuities in $1$ and $2$.
That means that $g$ cannot 'cross' those values.
But for instance $g(x)= 3 + x^2$ will work.
And $g(x)= 2 + x^2$ will also work since $\lim_{x\to 2^+} f(x) = f(2)$. (Thinking)
 
  • #21
I like Serena said:
$f$ has jump discontinuities in $1$ and $2$.
That means that $g$ cannot 'cross' those values.
But for instance $g(x)= 3 + x^2$ will work.
And $g(x)= 2 + x^2$ will also work since $\lim_{x\to 2^+} f(x) = f(2)$. (Thinking)

Ah I see! Thank you so much! (Yes)
 

FAQ: Find a function so that the composition is continuous

What is the definition of composition in mathematics?

The composition of two functions f and g, denoted as f o g, is a new function that applies the output of g as the input of f. In other words, the output of g becomes the input of f.

How do you determine if a composition of two functions is continuous?

A composition of two functions is continuous if both functions are individually continuous and the domain of the inner function is a subset of the domain of the outer function.

Can a composition of two discontinuous functions be continuous?

Yes, it is possible for a composition of two discontinuous functions to be continuous. This can occur when the discontinuity of one function is "cancelled out" by the other function.

Are all continuous functions composable?

No, not all continuous functions are composable. In order for a composition of two functions to be continuous, both functions must have compatible domains and the inner function must map to the domain of the outer function.

Can a composition of two functions with different domains be continuous?

Yes, a composition of two functions with different domains can be continuous if the inner function's domain is a subset of the outer function's domain and both functions are individually continuous.

Similar threads

Replies
8
Views
1K
Replies
4
Views
2K
Replies
21
Views
2K
Replies
2
Views
668
Back
Top