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 124<br />

• Clamped boundary: S 0(x ′ 0 )=f ′ (x 0 ) and S n−1(x ′ n )=f ′ (x n )<br />

Each boundary choice gives another two equations, br<strong>in</strong>g<strong>in</strong>g the total number of equations to<br />

4n. There are 4n unknowns as well. Do these systems of equations have a unique solution?<br />

The answer is yes, and a proof can be found <strong>in</strong> Burden, Faires, Burden [4]. The spl<strong>in</strong>e<br />

obta<strong>in</strong>ed from the first boundary choice is called a natural spl<strong>in</strong>e, and the other one is<br />

called a clamped spl<strong>in</strong>e.<br />

Example 64. F<strong>in</strong>d the natural cubic spl<strong>in</strong>e that <strong>in</strong>terpolates the data (0, 0), (1, 1), (2, 0).<br />

Solution. We have two cubic polynomials to determ<strong>in</strong>e:<br />

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

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

The <strong>in</strong>terpolation equations are:<br />

S 0 (0) = 0 ⇒ a 0 =0<br />

S 0 (1) = 1 ⇒ a 0 + b 0 + c 0 + d 0 =1<br />

S 1 (1) = 1 ⇒ a 1 + b 1 + c 1 + d 1 =1<br />

S 1 (2) = 0 ⇒ a 1 +2b 1 +4c 1 +8d 1 =0<br />

We need the derivatives of the polynomials for the other equations:<br />

The smoothness conditions are:<br />

S ′ 0(x) =b 0 +2c 0 x +3d 0 x 2<br />

S ′ 1(x) =b 1 +2c 1 x +3d 1 x 2<br />

S 0 ′′ (x) =2c 0 +6d 0 x<br />

S 1 ′′ (x) =2c 1 +6d 1 x<br />

The natural boundary conditions are:<br />

S ′ 0(1) = S ′ 1(1) ⇒ b 0 +2c 0 +3d 0 = b 1 +2c 1 +3d 1<br />

S ′′<br />

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

1 (1) ⇒ 2c 0 +6d 0 =2c 1 +6d 1<br />

S ′′<br />

0 (0) = 0 ⇒ 2c 0 =0<br />

S ′′<br />

1 (2) = 0 ⇒ 2c 1 +12d 1 =0

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

Saved successfully!

Ooh no, something went wrong!