Exercise Solution 2.17

We seek to fit a cubic polynomial on the interval [0, 2] and another cubic polynomial on the interval [2, 4]. These take forms:

[s1]

[s2]

These must satisfy conditions [2.113] to [2.116]. The first condition requires that

[s3]

[s4]

[s5]

[s6]

The second condition requires

[s7]

The third condition requires

[s8]

and the fourth condition requires

[s9]

[s10]

We have eight equations in eight unknowns. These can be expressed as

[s11]

which we solve to obtain

[s12]

Our two polynomials are

[s13]

[s14]