# Basic composite function

If $f(x)={1\over x}$ and $g(x)=\sin(x)$

Just checking if I'm understanding this correctly. Are the formulas below correct?

$$f(g(x))={1\over \sin(x)}\\ g(f(x))=\sin\left({1\over x}\right)$$

And their domains for both would be: $(x\ne0)$?

• Almost all correct. For the first, there are a lot more $x$ to exclude, all integer multiples of $\pi$. – André Nicolas Sep 4 '15 at 5:39

Almost there. The first is not defined at integer multiples of $\pi$. If we agree on calling $D_{\phi}$ the domain of the function $\phi(x)$, then we can say $D_{f\circ g} = \mathbb{R}−\{k\pi | k\in \mathbb{Z}\}.$
• @stuart: $\sin(k\pi)=0$ for any integer $k$. Since $f(g(x))$ has this at the denominator, we need to exclude those values too from its domain. – Vincenzo Oliva Sep 4 '15 at 5:56
The domain for the second one is OK, because $\frac1x$ is defined for all nonzero real numbers, and $\sin \frac1x$ will then also be defined for all nonzero numbers because $\sin x$ is defined for all real $x$.
You are also correct in that $\frac{1}{\sin x}$ is not defined for $x=0$, but you should not have stopped there.
$$\frac{1}{f(x)}$$ is undefined whenever $f(x) = 0$, and $\sin x = 0$ has more than one solution. For example, because $\sin \pi = 0$, you know that $\frac{1}{\sin \pi}$ is also not defined.