0

0

1

1

x

f(x)

x

y

0

1

h(x)=g(f(x))

f

g

A = (-2, 0)
a = OrthogonalLine(A, xAxis)
b = OrthogonalLine(A, a)
B = Point(b)
c = OrthogonalLine(B, b)
C = Point(a)
d = OrthogonalLine(C, a)
D = Intersect(c, d)
f(x) = x / 3 - 2
E = Point(a)
in: y(E) / y(C)
out: f(in)
F = Point({x(B), (out * y(D))})
e = Segment(E, F)
G = Point({in, out})
H = Point({x(G), 0})
I = Point({0, y(G)})
i = Segment(G, I)
J = Point({x(B) + Distance[A, B], 0})
j = OrthogonalLine(J, d)
K = Intersect(d, j)
g(x) = x / 2 - 1
out_2: g(out)
L = Point({x(J), (out_2 * y(D))})
k = Segment(F, L)
l = Segment(E, L)
h(x) = g(f(x))