# Question about whether function is odd or even

If x is an odd number, would the function $$2020^x + x^{2020}$$ be odd or even?

I'm currently having trouble figuring out the answer to this question. Currently I believe the result would be odd, since an even number raised to an odd power results in an even number, while an odd number raised to an even power results in an odd number. The sum of an even and an odd is odd, therefore the function will produce odd outputs when x is an odd input.

However, when I try and test the outputs using a function, the result is undefined, so I cannot tell for sure if I'm correct. Any clarification on my answer and insight would be appreciated.

Edit- I

• If $x$ is given this function is constant and hence even. Jul 27 '20 at 22:18
• if you test x=1 however, the output is 2020+1, which results in an odd output Jul 27 '20 at 22:22
• But the result is a constant and hence an even function. I don't think you understand what the parity of a function is defined to mean. Jul 27 '20 at 22:24
• @dumon__, welcome to Mathematics Stack Exchange. Are you asking whether a function is odd or even, or whether an expression is an odd or even number? Jul 27 '20 at 22:25
• @PeterForeman I seem to have misunderstood the question. You are correct when you say that the function is even. Thank you for pointing this out to me. I did not realize that the question was asking if the actual function was even or odd, rather I thought it was asking whether the solutions it produced were even or odd Jul 27 '20 at 22:31

If you think of the expression $$2020^x + x^{2020}$$ as telling you the value of a function $$f$$ at a variable point $$x$$ then that function is an odd function if and only if for every value of $$x$$ $$f(x) = f(-x).$$
That has nothing to do with the value of the function when $$x$$ is an odd integer.
It happens to be true that when $$x$$ is a positive odd integer, $$2020^x$$ is even and $$x^{2020}$$ is odd, so their sum is an odd number.
When $$x$$ is a negative odd integer, $$2020^x$$ is not an integer and $$x^{2020}$$ is odd, so their sum is not an integer and so is neither even nor odd.