# Continuity of composite functions

The continuity theorem for composite functions states that if $f(x)$ is continuous at $x = a$ and $g(x)$ is continuous at $x = a$ , then the composite function $f\circ g$ and $g\circ f$ are also necessarily continuous at $x = a$. My question is why doesn't it work for the functions $\sin x$ and $[x]$. To be specific, let $f(x) = \sin x$ ; $g(x) = [x]$ G.I.F. At $x = \pi/2$ both $f(x)$ and $g(x)$ are continuous but the composite function $g\circ f$ is discontinuous. Doesn't this violate the above theorem ? Any help will be much appreciated. Thanks

• $g$ have to be continuous in $f(a).$ – sti9111 Jun 29 '15 at 1:47

The theorem, as you stated it, is not true! Notice that for the function $f \circ g$ to be defined, the image of $g$ must be in the domain of $f$, and if $a$ is in the domain of $f$, it's not necessarly true that it' is in the domain of $g$. However, what is true is that if $f$ is continuous at $a$, and $g$ is continuous at $f(a)$, then $g \circ f$ is continuous at a.