f

f'

f''

g(x) = (1 / 324 * x^(4)) - (1 / 27 * x^(3)) + (1 / 2 * x) + 2
P1 = Point(g)
P2 = Point(g)
x1: x(P1)
x2: x(P2)
f0(x) = If[x < x1, g(x)]
f1(x) = If[x1 ≤ x < x2, g(x)]
g1(x) = g'(x)
gl1: x = x1
gl2: x = x2
f2(x) = If[x2 ≤ x, g(x)]
A, B = TurningPoint(g(x))
g2(x) = g''(x)