Setting these two expressions equal to each other and rewriting yields
(h1s0+2h1s1+3u0-3u1)/h1h1=(-2h2s1-h2s2-3u1+3u2)/h2h2
or (grouping sk's and uk's)
(2s1+s2)/h2+(2s1+s0)/h1=3/(h2h2)(u2-u1)+3/(h1h1)(u1-u0)
OR
(1/h1)s0 + (2/h1 + 2/h2)s1 + (1/h2)s2
= (3/h2h2)u2 + (3/h1h1 - 3/h2h2)u1 - (3/h1h1)u0
As you can probably tell, the pattern is similar to the one for x values 0, 1,
2, . . . except the h's appear.
The general pattern shows itself:
(1/h(k-1))s(k-2)+(2/h(k-1) + 2/h(k))s(k-1)+(1/h(k))s(k)
=3{[u(k)/(h(k)^2)] +[1/h(k-1)^2 - 1/h(k)^2]u(k-1) - u(k-2)/(h(k-1)^2)}
for k>=2