Could I get a hint or a clue on how to solve this problem?
Problem:
($f$ is even if $f(-x)=f(x)$ and $f$ is odd if $f(-x)=-f(x)$.)
Suppose $f$ is a function defined on all of $\mathbb{R}$
(a) Check whether $g(x) = \frac{(f(x))+(f(-x))}{2}$ is even, odd or neither.
(b) Use (a) as inspiration to show that you can always write a function $f$ as a sum of an odd and an even function
So since $f$ is a function defined on all of $\mathbb{R}$, that would imply that $f$ is not even? Right? Like if $f(x)=x^2$ (an even function) then $f$ would not be defined on on all of $\mathbb{R}$. So should I assume that $f$ is odd or neither? And where do I go on from there??
First, for checking whether or not $g(x)$ is even or odd, plug in $-x$ for $x$, or equivalently, $x\mapsto -x$. The function is even because $g(x)=g(-x)$.
Second, $$\begin{align*}f(x)&=\frac{f(x)}{2}+\frac{f(x)}{2}\\&=\frac{f(x)}{2}+\frac{f(x)}{2}+\frac{f(-x)}{2}-\frac{f(-x)}{2}\\&=\frac{f(x)}{2}+\frac{f(-x)}{2}+\frac{f(x)}{2}-\frac{f(-x)}{2} \end{align*}$$
Can you finish from here?