randRangeNonZero(-4, 4) randRangeNonZero(-4, 4)

f(x) = expr(["+", ["*", A, ["^", "x", 2]], B])

What is the range of f(x)?

\{\, y \in \RR \mid y A > 0 ? "≥" : "≤" B \,\}

randRangeNonZero(-4, 4) randRangeNonZero(-4, 4) randRangeNonZero( -4, 4 )

f(x) = \begin{cases} 3 * A + B & \text{if $x = HOLE$} \\ expr(["+", ["*", A, ["^", "x", 2]], B]) & \text{otherwise} \end{cases}

What is the range of f(x)?

\{\, y \in \RR \mid y A > 0 ? "≥" : "≤" B \,\}

First consider the behavior for x \ne HOLE.

If x = HOLE, then f(x) = 3 * A + B, but the range does not change.

circle( [HOLE, 3 * A + B], 3 / 20, { fill: "red", stroke: "none" } ); circle( [HOLE, A * HOLE * HOLE + B], 3 / 20, { fill: "#fff", stroke: "red" } );
0

\{\, y \in \RR \mid y A > 0 ? ">" : "<" B \,\}

First consider the behavior for x \ne HOLE.

If x = HOLE, then f(x) = 3 * A + B, which eliminates f(x) = B from the range.

circle( [HOLE, 3 * A + B], 3 / 20, { fill: "red", stroke: "red" } ); circle( [HOLE, A * HOLE * HOLE + B], 3 / 20, { fill: "#fff", stroke: "red" } );

The new range is \{\, y \mid y A > 0 ? ">" : "<" B \,\}.

graphInit({ range: 10, scale: 20, tickStep: 1, axisArrows: "<->" }); style({ stroke: "#6495ED", arrows: null }) graph.pl = plot( function( x ) { return A * pow( x, 2 ); }, [-10, 10], { stroke: "red", strokeDasharray: "- " });

Consider the range of expr(["*", A, ["^", "x", 2]]).

The range of x^2 is \{\, y \mid y \ge 0 \,\}. Multiplying by A doesn't change the range.

The range of x^2 is \{\, y \mid y \ge 0 \,\}. Multiplying by A flips the range to \{\, y \mid y \le 0 \,\}.

Now B > 0 ? "add" : "subtract" abs( B ). The range becomes: \{\, y \mid y A > 0 ? "≥" : "≤" B \,\}.

graph.pl.remove(); graph.pl = plot( function( x ) { return A * pow( x, 2 ) + B; }, [-10, 10], { stroke: "red" });