I am reading "An Introduction to Numerical Analysis" by K. Atkinson, 2nd edition. On page 167, it states:
s''(x) = \frac{(x_{i+1}-x)M_i + (x-x_i)M_{i+1}}{h_i}
Integrating twice, the result in the textbook is:
$ s(x) = \frac{(x_{i+1}-x)^3 M_i + (x-x_i)^3 M_{i+1}}{6h_i} + C(x_{i+1}-x) + D(x-x_i)$
I am curious why there are not additional constants, $E$ and $F$ in the expression for $s(x)$.
I get,
$ s_1(x) = \int \frac{(x_{i+1}-x)M_i + (x-x_i)M_{i+1}}{h_i} dx$ $ = \int \frac{(x_{i+1}-x)M_i}{h_i} dx + \int \frac{(x-x_i)M_{i+1}}{h_i} dx$ $ = \int \frac{u M_i}{h_i} (-1) du + \int \frac{vM_{i+1}}{h_i} dv$ $ = \frac{u^2}{2h_i}M_i (-1) + C_1 + \frac{v^2 M_{i+1}}{2h_i} + C_2$ $ = \frac{(x_{i+1}-x)^2 M_i (-1)}{2h_i} + C_1 + \frac{(x-x_i)^2 M_{i+1}}{2h_i} + C_2$
$ s(x) = \int s_1(x) dx$ $ = \int \left[\frac{(x_{i+1}-x)^2 M_i (-1)}{2h_i} + C_1 \right]dx + \int \left[\frac{(x-x_i)^2 M_{i+1}}{2h_i} + C_2 \right]dx$ $ = \int \left[\frac{u^2 M_i (-1)}{2h_i} + C_1 \right]du (-1) + \int \left[\frac{v^2 M_{i+1}}{2 h_i} + C_2 \right]dv$ (Eq 0) $ = \int \left[\frac{u^2 M_i}{2 h_i} + C_1 \right]du + \int \left[\frac{v^2 M_{i+1}}{2 h_i} + C_2 \right]dv$ (Eq 1) $ = \frac{u^3 M_i}{6 h_i} + C_1 u + C_3 + \frac{v^3 M_{i+1}}{6 h_i} + C_2 v + C_4$ $ s(x) = \frac{(x_{i+1}-x)^3 M_i + (x-x_i)^3 M_{i+1}}{6h_i} + C_1(x_{i+1}-x) + C_2(x-x_i) + C_3 + C_4$
Note that in moving from (Eq 0) to (Eq 1), I did: $\int C_1 du (-1) = \int C_1 du$, since $C_1 $ is some constant. Note that the last equation matches the original equation from the text, except I have additional $C_3$ and $C_4$ terms. (Let $C_1 = C$, $C_2 = D$.) Can some please explain how to make my result match the result in the book?
Thanks.