randFromArray(["Even", "Odd", "Neither"])
makeFunc(SOL) getUseablePoints(FUNC, SOL) randFromArray(X_VALUES)

f(x) is graphed below.

graphInit({ range: 10, scale: 20, tickStep: 1, axisArrows: "<->" }); style({ stroke: BLUE }); plot(function(x) { return FUNC(x); }, [-10, 10]); style({ stroke: RED });
style( { strokeWidth: 2 }, function() { path([[ PT, 0], [ PT, FUNC(PT)]]); path([[-PT, 0], [-PT, FUNC(-PT)]]); } ); style( { strokeDasharray: "." }, function() { path([[0, FUNC(PT)], [PT, FUNC(PT)]]); path([[0, FUNC(-PT)], [-PT, FUNC(-PT)]]); } );

\qquad f(\blue{PT}) \approx \red{roundTo(1, FUNC(PT))}
\qquad f(\blue{-PT}) \approx \red{roundTo(1, FUNC(-PT))}

f(\blue{PT}) \neq f(\blue{-PT}), so f(x) is not even.

f(\blue{PT}) \neq -f(\blue{-PT}), so f(x) is not odd.

Therefore f(x) is neither.

style( { strokeWidth: 2 }, function() { path([[ x, 0], [ x, FUNC(x)]]); path([[-x, 0], [-x, FUNC(-x)]]); } ); style( { strokeDasharray: "." }, function() { path([[0, FUNC(x)], [x, FUNC(x)]]); path([[0, FUNC(-x)], [-x, FUNC(-x)]]); } );

\qquad f(\blue{x}) \approx \red{roundTo(1, FUNC(x))}
\qquad f(\blue{-x}) \approx \red{roundTo(1, FUNC(-x))}

f(x) is odd because f(x) = -f(-x). (For all x values, not just the ones we checked!)

f(x) is even because f(x) = f(-x). (For all x values, not just the ones we checked!)

makeEquation(SOL) function(x){ return FUNC.evaluate(x); } getUseablePoints(CALLABLE_FUNC, SOL) !(FUNC.terms.length === 1 && (FUNC.terms[0].variableString === '' || FUNC.terms[0].variableString === 'x1'))
f(x) = FUNC

Let's try a value for x to see if f(x) fits the definition.

\qquad f(\blue{X_VALUES[0]}) = FUNC.getEvaluateString(X_VALUES[0], 'blue')
\qquad f(\blue{X_VALUES[0]}) = \red{CALLABLE_FUNC(X_VALUES[0])}
\qquad f(\blue{-X_VALUES[0]}) = FUNC.getEvaluateString(-X_VALUES[0], 'blue')
\qquad f(\blue{-X_VALUES[0]}) = \red{CALLABLE_FUNC(-X_VALUES[0])}

f(\blue{X_VALUES[0]}) \neq f(\blue{-X_VALUES[0]}), so f(x) is not even.

f(\blue{X_VALUES[0]}) \neq -f(\blue{-X_VALUES[0]}), so f(x) is not odd.

Therefore f(x) is neither.

Let's try a value for x to see if f(x) fits the definition.

\qquad f(\blue{1}) = FUNC.getEvaluateString(1, 'blue')
\qquad f(\blue{1}) = \red{CALLABLE_FUNC(1)}
\qquad f(\blue{-1}) = FUNC.getEvaluateString(-1, 'blue')
\qquad f(\blue{-1}) = \red{CALLABLE_FUNC(-1)}

Let's try another value for x.

\qquad f(\blue{2}) = FUNC.getEvaluateString(2, 'blue')
\qquad f(\blue{2}) = \red{CALLABLE_FUNC(2)}
\qquad f(\blue{-2}) = FUNC.getEvaluateString(-2, 'blue')
\qquad f(\blue{-2}) = \red{CALLABLE_FUNC(-2)}

f(x) is odd because f(x) = -f(-x). (For all x values, not just the ones we checked!)

f(x) is even because f(x) = f(-x). (For all x values, not just the ones we checked!)

Is f(x) even, odd, or neither?

SOL

A function is considered even if f(x) = f(-x) for all values of x.
A function is considered odd if f(x) = -f(-x) for all values of x.