2
$\begingroup$

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.

  • 0
    Note that in the line $\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$, you can merge the $C_1$ and $C_2$ into a single arbitrary constant...2011-09-15

1 Answers 1

2

First, $C_3$ and $C_4$ can be added to make a single constant, which we can call $C_5$. Then $C_5$ can be absorbed into $C_1$ and $C_2$. If you change $C_1$ and $C_2$ to $C_1+C_6$ and $C_2+C_6$, the term in $x$ is not changed, while the constant term is increased by $C_6(x_{i+1}-x_i)$. So as long as $x_{i+1} \ne x_i$ we can choose an appropriate $C_6$.

  • 0
    @Ross Millikan: I see now. First solve for $C$ and $D$. That required 2 (point, value) pairs. At either pair, decrease the value of both $C$ and $D$ by some known fixed value, $C_6$. At either pair, if we decrease both $C$ and $D$, the resulting value decreases by $C_6(x_{i+1}-x_i)$, where $x_{i+1}$ and $x_i$ are both known. Then, we can solve for $C_6$.2011-09-15