f(x)=\left\{\begin{array}\ x+3  & \mbox{ si }& x<-1\x^2+x & \mbox{si}& x≥-1\-x+8& \mbox{si}&x<2}\end{array}

(x,f(x))

f(x)

x

f = If(x < -1.0, x + 3.0, If[x ≤ 2.0, x^(2.0) + x, -1.0 * x + 8.0])
P: (-1.0 * 1.0, f(-1.0 * 1.0))
Q: (2.0, f(2.0))
A = Intersect(b, a)
c = Segment(A, P)
B = Intersect(b, yAxis)
d = Segment(A, B)
C = Point(f)
e = OrthogonalLine(C, xAxis)
D = Intersect(xAxis, e)
g = Segment(C, D)
h = OrthogonalLine(C, yAxis)
E = Intersect(h, yAxis)
i = Segment(C, E)