n = 1 (slider from 1 to 3, step 1)
nminus1: n - 1
ymax = 4.2
ymin = -1
xmax = 7
gsub(t) = (t^(n) * ℯ^(1 - t))
tmin: x(Intersect[gsub, If[n ≟ 2, y = ymax, y = ymin], (-0.2784645427610743, -1.0000000000000024)])
g = Function(gsub, tmin, xmax)
n_t = 0 (slider from 0 to 3, step 1)
P2 = Point(g)
P3 = Point(g)
P1 = Point(g)
gprime(t) = (((n * t^(n - 1)) - t^(n)) * ℯ^(1 - t))
dx = 1
xmin = -2
a = 2.718281828459045
m1: gprime(x(P1))
m2: gprime(x(P2))
m3: gprime(x(P3))
L1(t) = y(P1) + (m1 * (t - x(P1)))
L2(t) = y(P2) + (m2 * (t - x(P2)))
L3(t) = y(P3) + (m3 * (t - x(P3)))
x1: x(P1)
x2: x(P2)
x3: x(P3)