Given two functions as:

f(x) = x2-x-1 and g(x) = 3/x
Find fog(x) also find the domain of f, g and fog

2 answers

domain of f : any real number
domain of g : any real number except x ≠ 0

fog
= f(g(x))
= f(3/x)
- (3/x)^2 - 3/x - 1

clearly the domain of fog is any real number, except x≠0
last line in calculation should say

= (3/x)^2 - 3/x - 1