The function f and g are defined by
$$ f(x) = (x-2)(4-x), 0 \le x \le 4 $$ $$ g(x) = |x-2|, 0 \lt x \le A $$
(i) Find the range of values of A for which the composite function $fg$ is defined.
(ii) If $ A = 5 $, find the range of values of x for which $ f(x) < g(x) $.
I have attempted the question already but I am unsure whether the answers are right or not.
Attempt (i):
In order for $fg$ to be defined, the range of g(x) must be within the domain of f(x).
Therefore, $ 0 \le g(x) \le 4 $.
$ 0 \le |x-2| \le 4 $
$ |x-2| \ge 0 $ or $ |x-2| \le 4 $
. . .
So, $ -2 \le x \le 6 $.
Since the domain of g(x) is $ 0 \lt x \le A $, so the domain fg must be $ 0 \lt x \le 6 $.
Am I right until this point? If so, $ A = 6 $. However, the question asked for range of values of A and not a specific value.
Attempt (ii):
$ f(x) < g(x) $
$ (x-2)(4-x) \lt |x-2| $
Therefore,
$ x-2 \gt (x-2)(4-x) $ or $ x-2 \lt -(x-2)(4-x) $.
. . .
So, $ x \lt 2, x \gt 3 $ or $ x \gt 5 $.
However if $ A = 5 $, then x cannot be more than 5.
Thus, $ x \lt 2 $ or $ 3 \lt x \le 5 $.