Question about whether function is odd or even

discrete mathematicseven-and-odd-functionsfunctionssolution-verification

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

Best Answer

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). $$

In this example, the function is not an odd function.

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.