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 ) $._("if") $._("otherwise")

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.

Since 3 * A + BB, the range is still \{\, y \in \RR \mid y ≤ B \,\}.

Since 3 * A + BB, the range is still \{\, y \in \RR \mid y ≥ B \,\}.

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

So the range of f(x) is \{\, y \in \RR \mid y > B \,\}.

So the range of f(x) is \{\, y \in \RR \mid y < 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 \in \RR \mid y \ge 0 \,\}.
Multiplying by A doesn't change the range.

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

To get expr(["+", ["*", A, ["^", "x", 2]], B]), we add abs(B). To get expr(["+", ["*", A, ["^", "x", 2]], B]), we subtract abs( B ). So the range becomes: \{\, y \in \RR \mid y ≥ B \,\}. So the range becomes: \{\, y \in \RR \mid y ≤ B \,\}.

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