I was recently trying to solve a basic Algebra II math problem that relates to Composite Functions. The question is as follows:
Find $[f\circ g](x)$ and $[g\circ f](x)$ if they exist. State the domain and range for each composed function.
The equations that were given were as follows:
$$f(x) = 2x$$ $$g(x) = x + 5$$
Obviously, to solve this problem, I did the following:
$$f(g(x)) = 2(x + 5)$$ $$[f\circ g](x) = 2x + 10$$ $$g(f(x)) = (2x) + 5$$ $$[g\circ f](x) = 2x + 5$$
When it came to finding the domain and range, I assumed that both would be all real numbers for both composite functions. However, when I checked the answer key, the domain for both composite functions were all real numbers, but the range for the first composite function was all even numbers, and the range for the second function all odd numbers. Now I understand the reasoning behind the range if the domain was all real integers, but the domain is all real numbers, so the range couldn't possibly be limited to even and odd numbers, since real numbers like $\sqrt{3}$ would obviously not result in an even or odd number for either function. Hence, my question:
Why are the ranges for both composite linear functions not all real numbers?
Please forgive me for breaking any rules of this website; This is my first time posting, and I tried to be as clear as possible!
EDIT
Sorry for being unclear before, but it seems that answers are assuming that the brackets are the entier function. However, this is just the notation that the book uses. Here is an example directly from the book:
$f(x) = 2a - 5, g(x) = 4a$. Find $[f\circ g](x)$ and list the domain the range of [the] composite function.
$$[f\circ g](x) = f[g(x)]$$ $$= f(4a)$$ $$= 2(4a - 5)$$ $$= 8a - 5$$ $$D = \{\text{all real numbers}\}$$ $$R = \{\text{all real numbers}\}$$