0

x

1

0

show input-output

g(x) = (1.5 * x) + 1
f(x) = x - 3
h = Expand(g(f(x)))
D = Point(xAxis)
A = Point(xAxis)
a = OrthogonalLine(A, xAxis)
E = Point(a)
C = Point(a)
input: y(E) / y(C)
c = Ray(A, D)
B = Point(c)
u = Vector(A, B)
B' = Translate(B, u)
b = OrthogonalLine(B, xAxis)
xbottom = -9 (slider from -9 to 9, step 1)
xtop = 9 (slider from xbottom to 9, step 1)
gap = 1 (slider from 0.2 to 2, step 0.1)
n: (xtop - xbottom) / gap + 1
inputs = Sequence(xbottom + (i * gap), i, 0, n)
outputs: f(inputs)
arrows = Sequence(Segment[(x(A), (y(C) * Element[inputs, i])), (x(B), (y(C) * Element[outputs, i]))], i, 0, n)
rightticks = Sequence(Segment[(x(B), (y(C) * Element[inputs, i])), (x(B) + 0.3, (y(C) * Element[inputs, i]))], i, 0, n)
leftticks = Sequence(Segment[(x(A), (y(C) * Element[inputs, i])), (x(A) - 0.3, (y(C) * Element[inputs, i]))], i, 0, n)
pairs = Sequence((Element[inputs, i], Element[outputs, i]), i, 1, n)
b' = Translate(b, u)
rightticks' = Translate(rightticks, u)
outputs_2: g(outputs)
arrows_2 = Sequence(Segment[(x(B), (y(C) * Element[outputs, i])), (x(B'), (y(C) * Element[outputs_2, i]))], i, 0, n)
L: (x(B'), (h(input) * y(C)))
arrow = Segment(E, L)
text1: "x=" + (LaTeX[input]) + ""
output: h(input)
text2: "g(f(x))=" + (LaTeX[output]) + ""
d = false