02.05.2014 Views

PENELOPE 2003 - OECD Nuclear Energy Agency

PENELOPE 2003 - OECD Nuclear Energy Agency

PENELOPE 2003 - OECD Nuclear Energy Agency

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Appendix B<br />

Numerical tools<br />

B.1 Cubic spline interpolation<br />

In this section we follow the presentation of Maron (1982). Suppose that a function<br />

f(x) is given in numerical form, i.e. as a table of values<br />

f i = f(x i ) (i = 1, . . . , N). (B.1)<br />

The points (knots) x i do not need to be equispaced, but we assume that they are in<br />

(strictly) increasing order<br />

x 1 < x 2 < · · · < x N .<br />

(B.2)<br />

A function ϕ(x) is said to be an interpolating cubic spline if<br />

1) It reduces to a cubic polynomial within each interval [x i , x i+1 ], i.e. if x i ≤ x ≤ x i+1<br />

ϕ(x) = a i + b i x + c i x 2 + d i x 3 ≡ p i (x) (i = 1, . . . , N − 1). (B.3)<br />

2) The polynomial p i (x) matches the values of f(x) at the endpoints of the i-th interval,<br />

p i (x i ) = f i , p i (x i+1 ) = f i+1 (i = 1, . . . , N − 1), (B.4)<br />

so that ϕ(x) is continuous in [x 1 , x N ].<br />

3) The first and second derivatives of ϕ(x) are continuous in [x 1 , x N ]<br />

p ′ i (x i+1) = p ′ i+1 (x i+1) (i = 1, . . . , N − 2), (B.5)<br />

p ′′<br />

i (x i+1 ) = p ′′<br />

i+1(x i+1 ) (i = 1, . . . , N − 2). (B.6)<br />

Consequently, the curve y = ϕ(x) interpolates the table (B.1) and has a continuously<br />

turning tangent.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!