{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

program2

# program2 - 2.1.d Implement a routine that constructs the...

This preview shows page 1. Sign up to view the full content.

Program 2 Foundations of Computational Math 2 Spring 2011 Due date: 11:59 PM Friday, 2/18/11 Problem 2.1 In this exercise you will implement two interpolating spline algorithms as code and demon- strate their use. Assume you are given distinct points x 0 , . . . , x n , a function f ( x ), and where appropriate its first and second derivatives f ( x ) and f ′′ ( x ). 2.1.a . Implement a routine that constructs the interpolating cubic spline s ( x ) as de- termined by Ts ′′ = d where s ′′ is a vector containing s ′′ i 0 i n and a routine that evaluates the resulting spline at any value x . 2.1.b . Implement a routine that constructs the interpolating cubic spline s ( x ) as de- termined by ˜ Ts = ˜ d where s is a vector containing s i 1 i n - 1 and a routine that evaluates the resulting spline at any value x . 2.1.c . Both types of boundary conditions s ′′ 0 = f ′′ ( x 0 ) , s ′′ n = f ′′ ( x n ) and s 0 = f ( x 0 ) , s n = f ( x n ) should be supported by both codes.
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 2.1.d . Implement a routine that constructs the interpolating cubic spline s ( x ) in terms of the linear combination of cubic B-splines and a routine that evaluates the resulting spline at any value x . You need only support boundary conditions of the type s ′ = f ′ ( x ) , s ′ n = f ′ ( x n ) in this code. You may restrict the x i to be uniformly separated for this code, i.e., h = x i-x i − 1 . 2.1.e . Apply each code with f ( x ) taken to be di±erent cubic polynomials, i.e., not just f ( x ) = x 3 , with the various boundary conditions and discuss the results. 2.1.f . Apply each code with various boundary conditions to f ( x ) = β 1 + αx 2 on [-1 , 1] with various choices of α and β . and discuss the results. 1...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online