3

I'll state a question from my textbook below:

Given $f(x) = \frac 1 {x-1}$. Find the points of discontinuity of the composite function $y = f[f(x)]$.

Clearly, $f(x)$ is not defined at $x=1$. But that is not the case with $y = \frac {x-1}{2-x}$. Calculating the limit and the value of $y$ at $x=1$ we even find that it is continuous at this point. The graph of $y$ gives the same idea.

enter image description here

But my textbook says that it is discontinuous at $x=1$. I know this is because the continuity of the composite function $f\circ g$ at $c$ requires the continuity of $g$ at $c$. That is exactly what I can't understand. Why? I don't understand what does $f\circ g$ have to do with the continuity of $g$ at any point, say $c$? It only needs $g$ to be defined at $c$, right? Do you have an example that illustrates the importance of continuity of a function $g$ at $c$ for the continuity of the composite function $f\circ g$ at $c$?

Bernard
  • 179,256
  • In order to find the value of the composite function $f \circ f$ at $1$, you first calculate $f(1)$ and then $f(f(1))$. The first value is not defined, so the composite function is not defined. – Eivind Apr 17 '18 at 13:54
  • A bad habit of your textbook: as $f$ isn't defined in $x=1$ it can't be neither continuous nor discontinuous. – Michael Hoppe Apr 17 '18 at 14:02
  • @MichaelHoppe I thought a function is always discontinuous at a point where it is not defined. – Shinsekai no Kami Apr 17 '18 at 15:29
  • @SamInuyashaANMF Of course not, see https://math.stackexchange.com/questions/1482787/can-we-talk-about-the-continuity-discontinuity-of-a-function-at-a-point-which-is/1482900#1482900 – Michael Hoppe Apr 17 '18 at 21:53
  • @MichaelHoppe I thought there's a difference between $f(x) = \frac 1x$ and $g(x) = \frac 1x, x \ne 0$. $0$ is in the domain of $f$, whereas it is not in the domain of $g$. So, $f$ is discontinuous at $x = 0$, whereas there's no point in discussing continuity of $g$ at $x = 0$ since the point is not even in its domain. – Shinsekai no Kami Apr 18 '18 at 06:59

2 Answers2

5

The answer is that the function $$ f(f(x)) = \frac{1}{\frac{1}{x - 1} - 1} $$ is not the same as $$ \frac{x - 1}{2 - x}. $$ They give the same outputs for all $x$ in the domain of $f(f(x))$, but the second function has $1$ in its domain. The reason is that the limit of $f(f(x))$ exists at $1$, but it does not have a value. The second function just fills in the value with the limit. When you manipulate $f(f(x))$ to reduce it to the second function, you probably multiplied by $x - 1$ or something. You were making the implicit assumption that $x - 1 \neq 0$. But, it could be. So, you changed the function at that point in your work.

Then $f(f(x))$ is not continuous at $x = 1$, because there is a division by $0$ error when you attempt to calculate it. But, in order to be continuous it needs both the limit and no computation error.

J126
  • 17,707
  • 1
    It doesn't only need those limits, but a defined value of $f(1)$ as well. Continuity at $x= isn't a question at all. – Michael Hoppe Apr 17 '18 at 14:06
  • Supposing a random function $g$ defined, but not continuous, at $c$, will $f \circ g$ be continous at $c$ for another random function $f$ [which is continuous at $g(c)$], such that $f[g(c)] = \lim \limits_{x \to g(c)} f(x)$? – Shinsekai no Kami Apr 17 '18 at 15:26
  • 1
    @SamInuyashaANMF: Better late than never. Just let $f$ be a constant function. – J126 Mar 17 '22 at 22:36
  • @J126 I'm not sure if you're replying to my comment here or talking about the original question. If I take it to be a reply to my comment, then yes $f ∘ g$ is continuous at $c$. But isn't this a particular case? Will $f ∘ g$ be continuous even if $f$ is not a constant function? – Shinsekai no Kami Jun 23 '22 at 10:51
  • 1
    @ShinsekainoKami I misread your comment a little. I didn't see the "random" before $f$. It wouldn't work if $g$ is bad enough. When you try to make $| f(g(x)) - f(g(c))|$ go to $0$ as $|x - c|$ goes to $0$, it won't work out if $f(g(x))$ jumps around. – J126 Jun 29 '22 at 03:26
  • @J126 I think you've answered my question here. Just to confirm, does that mean that $f ∘ g$ can be continuous at $x=c$ even if $g$ is not continuous (but defined) at $x=c$? This is my main doubt. Rewording my question, is the continuity of $g$ at a point a necessary condition for the continuity of $f ∘ g$ at that point? Since you said, it wouldn't work if $g$ is bad enough. So it might work if $g$ is good enough? – Shinsekai no Kami Jun 29 '22 at 10:03
  • 1
    @ShinsekainoKami If $f$ is a constant function, then $f \circ g$ will be a constant function, no matter what $g$ is. So, $f \circ g$ will be continuous. For something less trivial, you could have $g$ be a non-continuous bijection, with $f = g^{-1}$. So, the continuity of $g$ is not necessary. – J126 Jul 02 '22 at 03:47
5

Technically, if $f(x) = \frac{1}{x-1}$, then $$f\circ f(x) = \frac{1}{\left(\frac{1}{x-1}\right)-1} = \frac{1}{\left(\frac{2-x}{x-1}\right)}$$ This is not the same as $$g(x) = \frac{x-1}{2-x}$$ They are the same almost everywhere, where the only point they differ is $x=1$ ($f\circ f$ is not defined there whereas $g$ is). In general, a fraction $1/(a/b) = b/a$ if you can assume $b\not=0$. Otherwise, such an operation is not defined.

  • 3
    This is a good answer, and teaches a general rule at the same time. I will use this in the fall when I teach Calculus. $+1$ – J126 Apr 17 '18 at 14:01
  • Supposing a random function $g$ defined, but not continuous, at $c$, will $f \circ g$ be continous at $c$ for another random function $f$ [which is continuous at $g(c)$], such that $f[g(c)] = \lim \limits_{x \to g(c)} f(x)$? – Shinsekai no Kami Apr 17 '18 at 15:26
  • 1
    @SamInuyashaANMF I don't know what you mean about "random" but here is a counter example I think that works. Let $g(x)$ be the Dirchlet function, that is $g(x) =1$ if $x$ is rational and $=0$ if $x$ is irrational. Obviously $g$ is not continuous anywhere. Then let $f(x) = x$. Clearly this is continuous at any $g(c)$ but $f\circ g$ is certainly not continuous. – welshman500 Apr 17 '18 at 16:40
  • @welshman500 I get your point. Suppose $g(x) = x$, if $x \ne 1$ and $g(x) = 0$, if $x = 1$. Let $f(x) = \frac {x-1}{x-1}$. Here, $g$ is discontinuous at $x = 1$ but $f \circ g$ is continuous. So continuity of $g$ at $c$ is not always necessary, right? But yes, you gave the right example to show the importance of the continuity of $g$. Thanks! – Shinsekai no Kami Apr 18 '18 at 06:54