Spivak, Ch. 3 Functions, Problem 12c: when is $f \circ g$ even/odd, in the four cases when $f$ and $g$ can be either even or odd? This item of this question asks us to determine whether $f \circ g$ is even or odd, considering the four possible cases when $f$ and $g$ are each either even or odd.
I'm not sure how to write out the condition that $f\circ g$ is even/odd. If I know what the condition is, I can solve all four cases.
If $f \circ g$ is even, does this mean that$f(g(x))=f(-g(x))$ or that $f(g(x))=f(g(-x))$?
Here is one case.
Case 1: $f$ and $g$ both even
$$(f \circ g)(x) = f(g(x))=f(g(-x))=f(-g(-x))$$
We could have also written
$$f(g(x))=f(-g(x))$$
directly. This seems like the condition that $f \circ g$ is even, but I didn't have to use the fact that $g$ is even, so I am not sure if this is correct.
 A: Follow the definitions.
The function $f\circ g$ is even if:
$$
f\circ g (-x) = f\circ g(x),\quad x\in\mathbb{R}\tag{1}
$$
where for simplicity, we assume that the domain of both $f$ and $g$ is $\mathbb{R}$. By the definition of function compositions, (1) is the same as $f(g(-x))=f(g(x))$.
Thus if $g$ is even, (1) holds for whatever $f$.
If $g$ is odd, and $f$ is odd, one has
$$
f(g(-x))=f(-g(x))=f(g(x))
$$
and (1) also holds.
You can discuss other cases similarly.
In summary,

*

*if $g$ is even, then $f\circ g$ even no matter what $f$ is;

*if $g$ odd, then $f\circ g$  has the same parity as that of $f$.

A: What you have to do is to fill the following array, ie check the four cases :
$\begin{array}{c|c|c} \ {} & f \textrm{ even} & f \textrm{ odd} \\
\hline g \textrm{ even} & f \circ g \ ? & f \circ g \ ? \\
\hline g \textrm{ odd} & f \circ g \ ? & f \circ g \ ? \end{array}$
For example, assume $f$ and $g$ are both even. Take an arbitrary $x \in \mathbb{R}$, we have :
$$f\circ g(-x) = f(g(-x)) = f(g(x)) = f \circ g (x)$$
Hence, in this case $f \circ g$ is even.
A: Case 1: $f$ and $g$ both even
$$(f \circ g)(-x) = f(g(-x))=f(g(x))=(f \circ g)(x),$$ so $(f \circ g)$ is even.
Case 2: $f$ and $g$ both odd
$$(f \circ g)(-x) = f(g(-x))=f(-g(x))=-f(g(x))=-(f \circ g)(x),$$ so $(f \circ g)$ is odd.
Etc.
