06.09.2021 Views

First Semester in Numerical Analysis with Julia, 2020a

First Semester in Numerical Analysis with Julia, 2020a

First Semester in Numerical Analysis with Julia, 2020a

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

CHAPTER 3. INTERPOLATION 123<br />

Si-1<br />

Si<br />

S0<br />

Sn-1<br />

x0 x1 xi-1 xi xi+1<br />

xn-1 xn<br />

Figure 3.6: Cubic spl<strong>in</strong>e<br />

The polynomial S i <strong>in</strong>terpolates the nodes (x i ,y i ), (x i+1 ,y i+1 ). Let<br />

S i (x) =a i + b i x + c i x 2 + d i x 3<br />

for i =0, 1, ..., n − 1. There are 4n unknowns to determ<strong>in</strong>e: a i ,b i ,c i ,d i ,asi takes on values<br />

from 0 to n − 1. Let’s describe the equations S i must satisfy. <strong>First</strong>, the <strong>in</strong>terpolation<br />

conditions, that is, the requirement that S i passes through the nodes (x i ,y i ), (x i+1 ,y i+1 ):<br />

S i (x i )=y i<br />

S i (x i+1 )=y i+1<br />

for i =0, 1, ..., n − 1, which gives 2n equations.<br />

smoothness:<br />

The next group of equations are about<br />

S ′ i−1(x i )=S ′ i(x i )<br />

S ′′<br />

i−1(x i )=S ′′<br />

i (x i )<br />

for i =1, 2, ..., n − 1, which gives 2(n − 1) = 2n − 2 equations. Last two equations are called<br />

the boundary conditions. There are two choices:<br />

• Free or natural boundary: S ′′<br />

0 (x 0 )=S ′′<br />

n−1(x n )=0

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

Saved successfully!

Ooh no, something went wrong!