I need some help with this Q.

Determine all the values of a, b, c, d, e such that the following function is a cubic spline:

f(x) = a[(x-2)^2] + b[(x-1)^3] for x in (-infi, 1]

c[(x-2)^2] for x in [1,3]

d[(x-2)^2] + e[(x-3)^2] for xin [3, infi)

Please Please help!