f(x) = expr(["+", ["*", A, ["^", "x", 2]], B])
What is the range of f(x)
?
\{\, y \in \RR \mid y
A > 0 ? "≥" : "≤"
B
\,\}
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.
\{\, 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.
The new range is \{\, y \mid y A > 0 ? ">" : "<" B \,\}
.
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 \,\}
.