This is likely a silly question, but I cannot seem to wrap my head around the following:
I am trying to determine whether the following function is even or odd: $f(x) = \frac{x}{x+1}$.
I pass $-x$ as input to the function to get: $f(-x) = \frac{-x}{-x+1}$.
The book I am using (Stewart Calculus 8th Edition) equates this to: $\frac{x}{x-1}$.
Thus, the equation is neither even or odd. However, what is the logic behind this last step?
By definition, if $f(-x)=f(x)$ then $f$ is even, and if $f(-x)=-f(x)$ then $f$ is odd.
From your calculation, you found: $f(-x) = \dfrac{-x}{-x+1}$. This can be rewritten as follows \begin{align*} f(-x) &= \frac{-x}{-x+1}\\ &= \frac{-(-x)}{-(-x+1)}\\ &= \frac{x}{x-1}, \end{align*} where in the second equality I multiplied both the numerator and the denominator of the fraction by $-1$. So, $f(x)$ is neither even nor odd.