# Khan/khan-exercises

Switch branches/tags
Nothing to show
Fetching contributors…
Cannot retrieve contributors at this time
324 lines (269 sloc) 13.4 KB
 Even and odd functions
randFromArray([["Even", i18n._("Even")], ["Odd", i18n._("Odd")], ["Neither", i18n._("Neither")]])
makeFunc(SOL_KEY) getUseablePoints(FUNC, SOL_KEY) randFromArray(X_VALUES)

According to the visible range of the graph, is f(x) even, odd, or neither?

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 });

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

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)]]); } );

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)]]); } );

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_KEY) getNegativeFunction(FUNC) function(x){ return FUNC.evaluate(x); } getUseablePoints(CALLABLE_FUNC, SOL_KEY) FUNC.terms.length !== 1 || FUNC.terms[0].variableString !== ''

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

f(x) = FUNC

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

What is f(\blue{-x})?

f(\blue{-x}) = NEG_FUNC1

f(\blue{-x}) = NEG_FUNC2

f(\blue{-x}) = -(FUNC)

f(\blue{-x}) = -f(x)

Therefore, f(x) is odd.

f(\blue{-x}) = f(x)

Therefore, f(x) is even.

f(-x) \neq f(x), since the signs of the terms with odd powers are different. f(-x) \neq -f(x) since the signs of the terms with even powers are the same.

Therefore, f(x) is neither odd nor even.

SOL_TEXT

• Even
• Odd
• Neither