randRangeNonZero(-4, 4) randRangeNonZero(-3, 3) randRangeNonZero(-6, 6) / 2 randRangeNonZero(-1, 1) randRange(0, 1) [ function(x) { return 0.25 * UP_ORIG * pow(x + X_ORIG, 2) + Y_ORIG; }, function(x) { return 0.02 * UP_ORIG * (pow(x + X_ORIG, 3) + 10 * pow(x + X_ORIG, 2)) + Y_ORIG; } ][N]
X_ORIG > 0 ? randRange(-6, -1) : randRange(1, 6) 1 1 0 expr(["*", "f", ["+", "x", X_SHIFT]])
  • f(x - X_SHIFT)
  • f(x) + X_SHIFT
  • f(x) - X_SHIFT

Function \red{g(x)} is shifted 1 unit left relative to \blue{f(x)}. Function \red{g(x)} is shifted abs(X_SHIFT) units left relative to \blue{f(x)}.

Function \red{g(x)} is shifted 1 unit right relative to \blue{f(x)}. Function \red{g(x)} is shifted abs(X_SHIFT) units right relative to \blue{f(x)}.

style({ stroke: BLACK, strokeWidth: 2, arrows: "->", }); path([[-X_ORIG, X_COEFFICIENT * Y_ORIG + Y_SHIFT], [-X_ORIG - X_SHIFT , X_COEFFICIENT * Y_ORIG + Y_SHIFT]]);

This means the value of \red{g} at a number x is the same as the value of \blue{f} at a number 1 more than x. This means the value of \red{g} at a number x is the same as the value of \blue{f} at a number abs(X_SHIFT) more than x.

This means the value of \red{g} at a number x is the same as the value of \blue{f} at a number 1 less than x. This means the value of \red{g} at a number x is the same as the value of \blue{f} at a number abs(X_SHIFT) less than x.

What would this sentence look like as an equation?

g(x) = ANSWER

0 1 1 randRangeNonZero(-6, 6) expr(["+", "f(x)", Y_SHIFT])
  • f(x + Y_SHIFT)
  • f(x - Y_SHIFT)
  • f(x) - Y_SHIFT

Function \red{g(x)} is shifted 1 unit up relative to \blue{f(x)}. Function \red{g(x)} is shifted abs(Y_SHIFT) units up relative to \blue{f(x)}.

Function \red{g(x)} is shifted 1 unit down relative to \blue{f(x)}. Function \red{g(x)} is shifted abs(Y_SHIFT) units down relative to \blue{f(x)}.

style({ stroke: BLACK, strokeWidth: 2, arrows: "->", }); path([[-X_ORIG, X_COEFFICIENT * Y_ORIG], [-X_ORIG, X_COEFFICIENT * Y_ORIG + Y_SHIFT]]);

Therefore, to find \red{g(x)} you can find \blue{f(x)} and add abs(Y_SHIFT).

Therefore, to find \red{g(x)} you can find \blue{f(x)} and subtract abs(Y_SHIFT).

Therefore g(x) = ANSWER.

0 randFromArray([-1, 1]) * randFromArray([1/3, 0.5, 2, 3]) 1 0 toFractionTex(X_COEFFICIENT) + "f(x)"
  • f(toFractionTex(1/X_COEFFICIENT)x)
  • f(toFractionTex(X_COEFFICIENT)x)
  • toFractionTex(1/X_COEFFICIENT)f(x)
  • toFractionTex(-1/X_COEFFICIENT)f(x)
  • toFractionTex(-X_COEFFICIENT)f(x)

Function \red{g(x)} is flipped vertically compared to \blue{f(x)}, so we should multiply by -1 reflect it over the x-axis.

This new function, \green{-f(x)} is closer to \red{g(x)}, but they are still not equal. What else do we need to do?

style({ stroke: GREEN, strokeDasharray: "- " }); plot( function(x) { return -FUNC(x); }, [-10, 10]);

Function \red{g(x)} is not flipped vertically compared to \blue{f(x)}, so does not have a negative coefficient.

Function \red{g(x)} is compressed vertically relative to \green{-f(x)} \blue{f(x)}, so must be multiplied by a number with a magnitude less than 1.

Function \red{g(x)} is stretched vertically relative to \green{-f(x)} \blue{f(x)}, so must be multiplied by a number with a magnitude greater than 1.

Therefore g(x) = ANSWER.
0 1 randFromArray([-1, 1]) * randFromArray([1/3, 0.5, 2, 3]) 0 "f(" + toFractionTex(Y_COEFFICIENT) + "x)"
  • f(toFractionTex(1/Y_COEFFICIENT)x)
  • f(toFractionTex(-1/Y_COEFFICIENT)x)
  • f(toFractionTex(-Y_COEFFICIENT)x)
  • toFractionTex(1/Y_COEFFICIENT)f(x)
  • toFractionTex(Y_COEFFICIENT)f(x)

Function \red{g(x)} is flipped horizontally compared to \blue{f(x)}, so we should multiply x by -1 reflect it over the y-axis.

This new function, \green{f(-x)} is closer to \red{g(x)}, but they are still not equal. What else do we need to do?

style({ stroke: GREEN, strokeDasharray: "- " }); plot( function(x) { return FUNC(-x); }, [-10, 10]);

Function \red{g(x)} is stretched horizontally relative to \green{f(-x)} \blue{f(x)}, so must be multiplied by a number with a magnitude less than 1.

Function \red{g(x)} is compressed horizontally relative to \green{f(-x)} \blue{f(x)}, so must be multiplied by a number with a magnitude greater than 1.

Therefore g(x) = ANSWER.

\red{g(x)} is a transformation of \blue{f(x)}. The graph below shows \blue{f(x)} as a solid blue line and \red{g(x)} as a dotted red line.

What is \red{g(x)} in terms of \blue{f(x)}?

graphInit({ range: 10, scale: 20, labelStep: 1, axisArrows: "<->" }) style({ stroke: BLUE, strokeWidth: 2, arrows: null }); plot(function(x) { return FUNC(x); }, [-10, 10]); style({ stroke: RED, strokeDasharray: '- ' }); plot(function(x) { return X_COEFFICIENT * FUNC(Y_COEFFICIENT * x + X_SHIFT) + Y_SHIFT; }, [-10, 10]);

ANSWER