(i) f(g(x)). Let y=g(x), and z=f(x). In each case x is just any quantity we put in the parenthetical argument (what's in the parentheses, in other words), so we can also write z=f(y). But y=g(x) so z=f(g(x)). An example makes this clearer. Let y=g(x)=x2+1 and let z=f(x)=3x. So z=f(y)=3y.
Substituting for y: z=3(x2+1)=3x2+3. So f(g(x))=3x2+3.
Now give x any value, let x=2, for example, and we want f(g(2)). If f(g(x))=3x2+3=15 (when x=2), then let's take it step by step.
First find g(x)=x2+1=5 when x=2. So g(2)=5. Now we need f(g(2)) and we know that f(x)=3x=3g(2)=3×5=15.
So f(g(x)) is simply a chain process. We start with g(x) and work outwards to f.
(ii) The domain of the above example is the domain of 3x2+3. We need to find the range of x values we can plug into this formula. In this case x can have any value at all and we could represent this fact by saying that x can be any value in the interval (-∞,∞), or, in words, any value from negative infinity to infinity, completely unbounded.
Not all functions will be unbounded. For example, y=√x only allows positive values of x so the (interval) domain for x is [0, ∞). The square opening bracket means that the lower bound of the interval is included, so in this case, 0 is the lower bound. The round closing bracket means that the upper bound is not included, and when applied to infinity it just means that x cannot be equal to infinity because infinity is a concept not a numerical quantity, and infinity cannot be attained.
Another example of a limited domain is when we have a fraction in which the denominator can have zero value for certain x values. Take y=g(x)=3x/(x2-5x+4) for example. x2-5x+4=(x-4)(x-1) and this is zero when x=4 and when x=1, so these values must be excluded from the domain for g, which would be expressed by 3 intervals (-∞,1), (1,4), (4,∞). So we can't find f(g(x)) for x=1 or 4. This limitation is passed from function g to f. But f(x) may also have a limited domain: if f(x)=log(x) then g(x) has also to be strictly positive (x>0), making the domain of f (0,1), (4,∞) and f(x)=log(3x/(x2-5x+4)). Note that (1,4) is excluded because between x=1 and 4 the denominator becomes negative so the whole expression in parentheses also becomes negative and the log of a negative number isn't valid. You can see from this example how the domain of a compound function can be affected by the combined domains of its functions.